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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Provides details about a specified Amazon Route&nbsp;53 hosted zone, including the four name servers assigned to the hosted zone. A hosted zone represents a collection of records that can be managed together, belonging to a single parent domain name.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AwsRoute53HostedZoneDetails {
    /// <p>An object that contains information about the specified hosted zone.</p>
    pub hosted_zone: ::std::option::Option<crate::types::AwsRoute53HostedZoneObjectDetails>,
    /// <p>An object that contains information about the Amazon Virtual Private Clouds (Amazon VPCs) that are associated with the specified hosted zone.</p>
    pub vpcs: ::std::option::Option<::std::vec::Vec<crate::types::AwsRoute53HostedZoneVpcDetails>>,
    /// <p>An object that contains a list of the authoritative name servers for a hosted zone or for a reusable delegation set.</p>
    pub name_servers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>An array that contains one <code>QueryLoggingConfig</code> element for each DNS query logging configuration that is associated with the current Amazon Web Services account.</p>
    pub query_logging_config: ::std::option::Option<crate::types::AwsRoute53QueryLoggingConfigDetails>,
}
impl AwsRoute53HostedZoneDetails {
    /// <p>An object that contains information about the specified hosted zone.</p>
    pub fn hosted_zone(&self) -> ::std::option::Option<&crate::types::AwsRoute53HostedZoneObjectDetails> {
        self.hosted_zone.as_ref()
    }
    /// <p>An object that contains information about the Amazon Virtual Private Clouds (Amazon VPCs) that are associated with the specified hosted zone.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.vpcs.is_none()`.
    pub fn vpcs(&self) -> &[crate::types::AwsRoute53HostedZoneVpcDetails] {
        self.vpcs.as_deref().unwrap_or_default()
    }
    /// <p>An object that contains a list of the authoritative name servers for a hosted zone or for a reusable delegation set.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.name_servers.is_none()`.
    pub fn name_servers(&self) -> &[::std::string::String] {
        self.name_servers.as_deref().unwrap_or_default()
    }
    /// <p>An array that contains one <code>QueryLoggingConfig</code> element for each DNS query logging configuration that is associated with the current Amazon Web Services account.</p>
    pub fn query_logging_config(&self) -> ::std::option::Option<&crate::types::AwsRoute53QueryLoggingConfigDetails> {
        self.query_logging_config.as_ref()
    }
}
impl AwsRoute53HostedZoneDetails {
    /// Creates a new builder-style object to manufacture [`AwsRoute53HostedZoneDetails`](crate::types::AwsRoute53HostedZoneDetails).
    pub fn builder() -> crate::types::builders::AwsRoute53HostedZoneDetailsBuilder {
        crate::types::builders::AwsRoute53HostedZoneDetailsBuilder::default()
    }
}

/// A builder for [`AwsRoute53HostedZoneDetails`](crate::types::AwsRoute53HostedZoneDetails).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct AwsRoute53HostedZoneDetailsBuilder {
    pub(crate) hosted_zone: ::std::option::Option<crate::types::AwsRoute53HostedZoneObjectDetails>,
    pub(crate) vpcs: ::std::option::Option<::std::vec::Vec<crate::types::AwsRoute53HostedZoneVpcDetails>>,
    pub(crate) name_servers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) query_logging_config: ::std::option::Option<crate::types::AwsRoute53QueryLoggingConfigDetails>,
}
impl AwsRoute53HostedZoneDetailsBuilder {
    /// <p>An object that contains information about the specified hosted zone.</p>
    pub fn hosted_zone(mut self, input: crate::types::AwsRoute53HostedZoneObjectDetails) -> Self {
        self.hosted_zone = ::std::option::Option::Some(input);
        self
    }
    /// <p>An object that contains information about the specified hosted zone.</p>
    pub fn set_hosted_zone(mut self, input: ::std::option::Option<crate::types::AwsRoute53HostedZoneObjectDetails>) -> Self {
        self.hosted_zone = input;
        self
    }
    /// <p>An object that contains information about the specified hosted zone.</p>
    pub fn get_hosted_zone(&self) -> &::std::option::Option<crate::types::AwsRoute53HostedZoneObjectDetails> {
        &self.hosted_zone
    }
    /// Appends an item to `vpcs`.
    ///
    /// To override the contents of this collection use [`set_vpcs`](Self::set_vpcs).
    ///
    /// <p>An object that contains information about the Amazon Virtual Private Clouds (Amazon VPCs) that are associated with the specified hosted zone.</p>
    pub fn vpcs(mut self, input: crate::types::AwsRoute53HostedZoneVpcDetails) -> Self {
        let mut v = self.vpcs.unwrap_or_default();
        v.push(input);
        self.vpcs = ::std::option::Option::Some(v);
        self
    }
    /// <p>An object that contains information about the Amazon Virtual Private Clouds (Amazon VPCs) that are associated with the specified hosted zone.</p>
    pub fn set_vpcs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AwsRoute53HostedZoneVpcDetails>>) -> Self {
        self.vpcs = input;
        self
    }
    /// <p>An object that contains information about the Amazon Virtual Private Clouds (Amazon VPCs) that are associated with the specified hosted zone.</p>
    pub fn get_vpcs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AwsRoute53HostedZoneVpcDetails>> {
        &self.vpcs
    }
    /// Appends an item to `name_servers`.
    ///
    /// To override the contents of this collection use [`set_name_servers`](Self::set_name_servers).
    ///
    /// <p>An object that contains a list of the authoritative name servers for a hosted zone or for a reusable delegation set.</p>
    pub fn name_servers(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.name_servers.unwrap_or_default();
        v.push(input.into());
        self.name_servers = ::std::option::Option::Some(v);
        self
    }
    /// <p>An object that contains a list of the authoritative name servers for a hosted zone or for a reusable delegation set.</p>
    pub fn set_name_servers(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.name_servers = input;
        self
    }
    /// <p>An object that contains a list of the authoritative name servers for a hosted zone or for a reusable delegation set.</p>
    pub fn get_name_servers(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.name_servers
    }
    /// <p>An array that contains one <code>QueryLoggingConfig</code> element for each DNS query logging configuration that is associated with the current Amazon Web Services account.</p>
    pub fn query_logging_config(mut self, input: crate::types::AwsRoute53QueryLoggingConfigDetails) -> Self {
        self.query_logging_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>An array that contains one <code>QueryLoggingConfig</code> element for each DNS query logging configuration that is associated with the current Amazon Web Services account.</p>
    pub fn set_query_logging_config(mut self, input: ::std::option::Option<crate::types::AwsRoute53QueryLoggingConfigDetails>) -> Self {
        self.query_logging_config = input;
        self
    }
    /// <p>An array that contains one <code>QueryLoggingConfig</code> element for each DNS query logging configuration that is associated with the current Amazon Web Services account.</p>
    pub fn get_query_logging_config(&self) -> &::std::option::Option<crate::types::AwsRoute53QueryLoggingConfigDetails> {
        &self.query_logging_config
    }
    /// Consumes the builder and constructs a [`AwsRoute53HostedZoneDetails`](crate::types::AwsRoute53HostedZoneDetails).
    pub fn build(self) -> crate::types::AwsRoute53HostedZoneDetails {
        crate::types::AwsRoute53HostedZoneDetails {
            hosted_zone: self.hosted_zone,
            vpcs: self.vpcs,
            name_servers: self.name_servers,
            query_logging_config: self.query_logging_config,
        }
    }
}