1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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,
}
}
}