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
                                      */

/// ForwardingRuleServiceDirectoryRegistration : Describes the auto-registration of the Forwarding Rule to Service Directory. The region and project of the Service Directory resource generated from this registration will be the same as this Forwarding Rule.

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct ForwardingRuleServiceDirectoryRegistration {
    /// Service Directory namespace to register the forwarding rule under.
    #[serde(rename = "namespace", skip_serializing_if = "Option::is_none")]
    pub namespace: Option<String>,
    /// Service Directory service to register the forwarding rule under.
    #[serde(rename = "service", skip_serializing_if = "Option::is_none")]
    pub service: Option<String>,
    /// [Optional] Service Directory region to register this global forwarding rule under. Default to \"us-central1\". Only used for PSC for Google APIs. All PSC for Google APIs Forwarding Rules on the same network should use the same Service Directory region.
    #[serde(
        rename = "serviceDirectoryRegion",
        skip_serializing_if = "Option::is_none"
    )]
    pub service_directory_region: Option<String>,
}

impl ForwardingRuleServiceDirectoryRegistration {
    /// Describes the auto-registration of the Forwarding Rule to Service Directory. The region and project of the Service Directory resource generated from this registration will be the same as this Forwarding Rule.
    pub fn new() -> ForwardingRuleServiceDirectoryRegistration {
        ForwardingRuleServiceDirectoryRegistration {
            namespace: None,
            service: None,
            service_directory_region: None,
        }
    }
}
