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

/// <p>In an <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_UpdateResolverEndpoint.html">UpdateResolverEndpoint</a> request, information about an IP address to update.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct IpAddressUpdate {
    /// <p><i>Only when removing an IP address from a Resolver endpoint</i>: The ID of the IP address that you want to remove. To get this ID, use <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_GetResolverEndpoint.html">GetResolverEndpoint</a>.</p>
    pub ip_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the subnet that includes the IP address that you want to update. To get this ID, use <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_GetResolverEndpoint.html">GetResolverEndpoint</a>.</p>
    pub subnet_id: ::std::option::Option<::std::string::String>,
    /// <p>The new IPv4 address.</p>
    pub ip: ::std::option::Option<::std::string::String>,
    /// <p>The new IPv6 address.</p>
    pub ipv6: ::std::option::Option<::std::string::String>,
}
impl IpAddressUpdate {
    /// <p><i>Only when removing an IP address from a Resolver endpoint</i>: The ID of the IP address that you want to remove. To get this ID, use <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_GetResolverEndpoint.html">GetResolverEndpoint</a>.</p>
    pub fn ip_id(&self) -> ::std::option::Option<&str> {
        self.ip_id.as_deref()
    }
    /// <p>The ID of the subnet that includes the IP address that you want to update. To get this ID, use <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_GetResolverEndpoint.html">GetResolverEndpoint</a>.</p>
    pub fn subnet_id(&self) -> ::std::option::Option<&str> {
        self.subnet_id.as_deref()
    }
    /// <p>The new IPv4 address.</p>
    pub fn ip(&self) -> ::std::option::Option<&str> {
        self.ip.as_deref()
    }
    /// <p>The new IPv6 address.</p>
    pub fn ipv6(&self) -> ::std::option::Option<&str> {
        self.ipv6.as_deref()
    }
}
impl IpAddressUpdate {
    /// Creates a new builder-style object to manufacture [`IpAddressUpdate`](crate::types::IpAddressUpdate).
    pub fn builder() -> crate::types::builders::IpAddressUpdateBuilder {
        crate::types::builders::IpAddressUpdateBuilder::default()
    }
}

/// A builder for [`IpAddressUpdate`](crate::types::IpAddressUpdate).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct IpAddressUpdateBuilder {
    pub(crate) ip_id: ::std::option::Option<::std::string::String>,
    pub(crate) subnet_id: ::std::option::Option<::std::string::String>,
    pub(crate) ip: ::std::option::Option<::std::string::String>,
    pub(crate) ipv6: ::std::option::Option<::std::string::String>,
}
impl IpAddressUpdateBuilder {
    /// <p><i>Only when removing an IP address from a Resolver endpoint</i>: The ID of the IP address that you want to remove. To get this ID, use <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_GetResolverEndpoint.html">GetResolverEndpoint</a>.</p>
    pub fn ip_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ip_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p><i>Only when removing an IP address from a Resolver endpoint</i>: The ID of the IP address that you want to remove. To get this ID, use <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_GetResolverEndpoint.html">GetResolverEndpoint</a>.</p>
    pub fn set_ip_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ip_id = input;
        self
    }
    /// <p><i>Only when removing an IP address from a Resolver endpoint</i>: The ID of the IP address that you want to remove. To get this ID, use <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_GetResolverEndpoint.html">GetResolverEndpoint</a>.</p>
    pub fn get_ip_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.ip_id
    }
    /// <p>The ID of the subnet that includes the IP address that you want to update. To get this ID, use <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_GetResolverEndpoint.html">GetResolverEndpoint</a>.</p>
    pub fn subnet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.subnet_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the subnet that includes the IP address that you want to update. To get this ID, use <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_GetResolverEndpoint.html">GetResolverEndpoint</a>.</p>
    pub fn set_subnet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.subnet_id = input;
        self
    }
    /// <p>The ID of the subnet that includes the IP address that you want to update. To get this ID, use <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_GetResolverEndpoint.html">GetResolverEndpoint</a>.</p>
    pub fn get_subnet_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.subnet_id
    }
    /// <p>The new IPv4 address.</p>
    pub fn ip(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ip = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The new IPv4 address.</p>
    pub fn set_ip(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ip = input;
        self
    }
    /// <p>The new IPv4 address.</p>
    pub fn get_ip(&self) -> &::std::option::Option<::std::string::String> {
        &self.ip
    }
    /// <p>The new IPv6 address.</p>
    pub fn ipv6(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ipv6 = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The new IPv6 address.</p>
    pub fn set_ipv6(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ipv6 = input;
        self
    }
    /// <p>The new IPv6 address.</p>
    pub fn get_ipv6(&self) -> &::std::option::Option<::std::string::String> {
        &self.ipv6
    }
    /// Consumes the builder and constructs a [`IpAddressUpdate`](crate::types::IpAddressUpdate).
    pub fn build(self) -> crate::types::IpAddressUpdate {
        crate::types::IpAddressUpdate {
            ip_id: self.ip_id,
            subnet_id: self.subnet_id,
            ip: self.ip,
            ipv6: self.ipv6,
        }
    }
}