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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes the DNS options for an endpoint.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DnsOptions {
    /// <p>The DNS records created for the endpoint.</p>
    pub dns_record_ip_type: ::std::option::Option<crate::types::DnsRecordIpType>,
    /// <p>Indicates whether to enable private DNS only for inbound endpoints.</p>
    pub private_dns_only_for_inbound_resolver_endpoint: ::std::option::Option<bool>,
}
impl DnsOptions {
    /// <p>The DNS records created for the endpoint.</p>
    pub fn dns_record_ip_type(&self) -> ::std::option::Option<&crate::types::DnsRecordIpType> {
        self.dns_record_ip_type.as_ref()
    }
    /// <p>Indicates whether to enable private DNS only for inbound endpoints.</p>
    pub fn private_dns_only_for_inbound_resolver_endpoint(&self) -> ::std::option::Option<bool> {
        self.private_dns_only_for_inbound_resolver_endpoint
    }
}
impl DnsOptions {
    /// Creates a new builder-style object to manufacture [`DnsOptions`](crate::types::DnsOptions).
    pub fn builder() -> crate::types::builders::DnsOptionsBuilder {
        crate::types::builders::DnsOptionsBuilder::default()
    }
}

/// A builder for [`DnsOptions`](crate::types::DnsOptions).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct DnsOptionsBuilder {
    pub(crate) dns_record_ip_type: ::std::option::Option<crate::types::DnsRecordIpType>,
    pub(crate) private_dns_only_for_inbound_resolver_endpoint: ::std::option::Option<bool>,
}
impl DnsOptionsBuilder {
    /// <p>The DNS records created for the endpoint.</p>
    pub fn dns_record_ip_type(mut self, input: crate::types::DnsRecordIpType) -> Self {
        self.dns_record_ip_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The DNS records created for the endpoint.</p>
    pub fn set_dns_record_ip_type(mut self, input: ::std::option::Option<crate::types::DnsRecordIpType>) -> Self {
        self.dns_record_ip_type = input;
        self
    }
    /// <p>The DNS records created for the endpoint.</p>
    pub fn get_dns_record_ip_type(&self) -> &::std::option::Option<crate::types::DnsRecordIpType> {
        &self.dns_record_ip_type
    }
    /// <p>Indicates whether to enable private DNS only for inbound endpoints.</p>
    pub fn private_dns_only_for_inbound_resolver_endpoint(mut self, input: bool) -> Self {
        self.private_dns_only_for_inbound_resolver_endpoint = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether to enable private DNS only for inbound endpoints.</p>
    pub fn set_private_dns_only_for_inbound_resolver_endpoint(mut self, input: ::std::option::Option<bool>) -> Self {
        self.private_dns_only_for_inbound_resolver_endpoint = input;
        self
    }
    /// <p>Indicates whether to enable private DNS only for inbound endpoints.</p>
    pub fn get_private_dns_only_for_inbound_resolver_endpoint(&self) -> &::std::option::Option<bool> {
        &self.private_dns_only_for_inbound_resolver_endpoint
    }
    /// Consumes the builder and constructs a [`DnsOptions`](crate::types::DnsOptions).
    pub fn build(self) -> crate::types::DnsOptions {
        crate::types::DnsOptions {
            dns_record_ip_type: self.dns_record_ip_type,
            private_dns_only_for_inbound_resolver_endpoint: self.private_dns_only_for_inbound_resolver_endpoint,
        }
    }
}