gcloud-sdk 0.30.0

Async Google gRPC/REST APIs and the client implementation hiding complexity of GCP authentication based on Tonic middleware and Reqwest.
Documentation
use serde::{Deserialize, Serialize}; /*
                                      * Cloud DNS API
                                      *
                                      * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
                                      *
                                      * The version of the OpenAPI document: v1
                                      *
                                      * Generated by: https://openapi-generator.tech
                                      */

use crate::google_rest_apis::dns_v1::models;

/// Policy : A policy is a collection of DNS rules applied to one or more Virtual Private Cloud resources.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Policy {
    #[serde(
        rename = "alternativeNameServerConfig",
        skip_serializing_if = "Option::is_none"
    )]
    pub alternative_name_server_config: Option<Box<models::PolicyAlternativeNameServerConfig>>,
    /// A mutable string of at most 1024 characters associated with this resource for the user's convenience. Has no effect on the policy's function.
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// Allows networks bound to this policy to receive DNS queries sent by VMs or applications over VPN connections. When enabled, a virtual IP address is allocated from each of the subnetworks that are bound to this policy.
    #[serde(
        rename = "enableInboundForwarding",
        skip_serializing_if = "Option::is_none"
    )]
    pub enable_inbound_forwarding: Option<bool>,
    /// Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set.
    #[serde(rename = "enableLogging", skip_serializing_if = "Option::is_none")]
    pub enable_logging: Option<bool>,
    /// Unique identifier for the resource; defined by the server (output only).
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
    pub kind: Option<String>,
    /// User-assigned name for this policy.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// List of network names specifying networks to which this policy is applied.
    #[serde(rename = "networks", skip_serializing_if = "Option::is_none")]
    pub networks: Option<Vec<models::PolicyNetwork>>,
}

impl Policy {
    /// A policy is a collection of DNS rules applied to one or more Virtual Private Cloud resources.
    pub fn new() -> Policy {
        Policy {
            alternative_name_server_config: None,
            description: None,
            enable_inbound_forwarding: None,
            enable_logging: None,
            id: None,
            kind: None,
            name: None,
            networks: None,
        }
    }
}