use serde::{Deserialize, Serialize}; /*
                                      * Compute Engine API
                                      *
                                      * Creates and runs virtual machines on Google Cloud Platform.
                                      *
                                      * The version of the OpenAPI document: v1
                                      *
                                      * Generated by: https://openapi-generator.tech
                                      */

use crate::google_rest_apis::compute_v1::models;

/// BackendServiceLocalityLoadBalancingPolicyConfig : Container for either a built-in LB policy supported by gRPC or Envoy or a custom one implemented by the end user.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BackendServiceLocalityLoadBalancingPolicyConfig {
    #[serde(rename = "customPolicy", skip_serializing_if = "Option::is_none")]
    pub custom_policy:
        Option<Box<models::BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy>>,
    #[serde(rename = "policy", skip_serializing_if = "Option::is_none")]
    pub policy: Option<Box<models::BackendServiceLocalityLoadBalancingPolicyConfigPolicy>>,
}

impl BackendServiceLocalityLoadBalancingPolicyConfig {
    /// Container for either a built-in LB policy supported by gRPC or Envoy or a custom one implemented by the end user.
    pub fn new() -> BackendServiceLocalityLoadBalancingPolicyConfig {
        BackendServiceLocalityLoadBalancingPolicyConfig {
            custom_policy: None,
            policy: None,
        }
    }
}
