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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AllocateAddressOutput {
    /// <p>The Elastic IP address.</p>
    #[doc(hidden)]
    pub public_ip: std::option::Option<std::string::String>,
    /// <p>[EC2-VPC] The ID that Amazon Web Services assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.</p>
    #[doc(hidden)]
    pub allocation_id: std::option::Option<std::string::String>,
    /// <p>The ID of an address pool.</p>
    #[doc(hidden)]
    pub public_ipv4_pool: std::option::Option<std::string::String>,
    /// <p>The set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses.</p>
    #[doc(hidden)]
    pub network_border_group: std::option::Option<std::string::String>,
    /// <p>Indicates whether the Elastic IP address is for use with instances in a VPC (<code>vpc</code>) or instances in EC2-Classic (<code>standard</code>).</p>
    #[doc(hidden)]
    pub domain: std::option::Option<crate::types::DomainType>,
    /// <p>The customer-owned IP address.</p>
    #[doc(hidden)]
    pub customer_owned_ip: std::option::Option<std::string::String>,
    /// <p>The ID of the customer-owned address pool.</p>
    #[doc(hidden)]
    pub customer_owned_ipv4_pool: std::option::Option<std::string::String>,
    /// <p>The carrier IP address. This option is only available for network interfaces which reside in a subnet in a Wavelength Zone (for example an EC2 instance). </p>
    #[doc(hidden)]
    pub carrier_ip: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl AllocateAddressOutput {
    /// <p>The Elastic IP address.</p>
    pub fn public_ip(&self) -> std::option::Option<&str> {
        self.public_ip.as_deref()
    }
    /// <p>[EC2-VPC] The ID that Amazon Web Services assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.</p>
    pub fn allocation_id(&self) -> std::option::Option<&str> {
        self.allocation_id.as_deref()
    }
    /// <p>The ID of an address pool.</p>
    pub fn public_ipv4_pool(&self) -> std::option::Option<&str> {
        self.public_ipv4_pool.as_deref()
    }
    /// <p>The set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses.</p>
    pub fn network_border_group(&self) -> std::option::Option<&str> {
        self.network_border_group.as_deref()
    }
    /// <p>Indicates whether the Elastic IP address is for use with instances in a VPC (<code>vpc</code>) or instances in EC2-Classic (<code>standard</code>).</p>
    pub fn domain(&self) -> std::option::Option<&crate::types::DomainType> {
        self.domain.as_ref()
    }
    /// <p>The customer-owned IP address.</p>
    pub fn customer_owned_ip(&self) -> std::option::Option<&str> {
        self.customer_owned_ip.as_deref()
    }
    /// <p>The ID of the customer-owned address pool.</p>
    pub fn customer_owned_ipv4_pool(&self) -> std::option::Option<&str> {
        self.customer_owned_ipv4_pool.as_deref()
    }
    /// <p>The carrier IP address. This option is only available for network interfaces which reside in a subnet in a Wavelength Zone (for example an EC2 instance). </p>
    pub fn carrier_ip(&self) -> std::option::Option<&str> {
        self.carrier_ip.as_deref()
    }
}
impl aws_http::request_id::RequestId for AllocateAddressOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl AllocateAddressOutput {
    /// Creates a new builder-style object to manufacture [`AllocateAddressOutput`](crate::operation::allocate_address::AllocateAddressOutput).
    pub fn builder() -> crate::operation::allocate_address::builders::AllocateAddressOutputBuilder {
        crate::operation::allocate_address::builders::AllocateAddressOutputBuilder::default()
    }
}

/// A builder for [`AllocateAddressOutput`](crate::operation::allocate_address::AllocateAddressOutput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct AllocateAddressOutputBuilder {
    pub(crate) public_ip: std::option::Option<std::string::String>,
    pub(crate) allocation_id: std::option::Option<std::string::String>,
    pub(crate) public_ipv4_pool: std::option::Option<std::string::String>,
    pub(crate) network_border_group: std::option::Option<std::string::String>,
    pub(crate) domain: std::option::Option<crate::types::DomainType>,
    pub(crate) customer_owned_ip: std::option::Option<std::string::String>,
    pub(crate) customer_owned_ipv4_pool: std::option::Option<std::string::String>,
    pub(crate) carrier_ip: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl AllocateAddressOutputBuilder {
    /// <p>The Elastic IP address.</p>
    pub fn public_ip(mut self, input: impl Into<std::string::String>) -> Self {
        self.public_ip = Some(input.into());
        self
    }
    /// <p>The Elastic IP address.</p>
    pub fn set_public_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.public_ip = input;
        self
    }
    /// <p>[EC2-VPC] The ID that Amazon Web Services assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.</p>
    pub fn allocation_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.allocation_id = Some(input.into());
        self
    }
    /// <p>[EC2-VPC] The ID that Amazon Web Services assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.</p>
    pub fn set_allocation_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.allocation_id = input;
        self
    }
    /// <p>The ID of an address pool.</p>
    pub fn public_ipv4_pool(mut self, input: impl Into<std::string::String>) -> Self {
        self.public_ipv4_pool = Some(input.into());
        self
    }
    /// <p>The ID of an address pool.</p>
    pub fn set_public_ipv4_pool(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.public_ipv4_pool = input;
        self
    }
    /// <p>The set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses.</p>
    pub fn network_border_group(mut self, input: impl Into<std::string::String>) -> Self {
        self.network_border_group = Some(input.into());
        self
    }
    /// <p>The set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses.</p>
    pub fn set_network_border_group(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.network_border_group = input;
        self
    }
    /// <p>Indicates whether the Elastic IP address is for use with instances in a VPC (<code>vpc</code>) or instances in EC2-Classic (<code>standard</code>).</p>
    pub fn domain(mut self, input: crate::types::DomainType) -> Self {
        self.domain = Some(input);
        self
    }
    /// <p>Indicates whether the Elastic IP address is for use with instances in a VPC (<code>vpc</code>) or instances in EC2-Classic (<code>standard</code>).</p>
    pub fn set_domain(mut self, input: std::option::Option<crate::types::DomainType>) -> Self {
        self.domain = input;
        self
    }
    /// <p>The customer-owned IP address.</p>
    pub fn customer_owned_ip(mut self, input: impl Into<std::string::String>) -> Self {
        self.customer_owned_ip = Some(input.into());
        self
    }
    /// <p>The customer-owned IP address.</p>
    pub fn set_customer_owned_ip(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.customer_owned_ip = input;
        self
    }
    /// <p>The ID of the customer-owned address pool.</p>
    pub fn customer_owned_ipv4_pool(mut self, input: impl Into<std::string::String>) -> Self {
        self.customer_owned_ipv4_pool = Some(input.into());
        self
    }
    /// <p>The ID of the customer-owned address pool.</p>
    pub fn set_customer_owned_ipv4_pool(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.customer_owned_ipv4_pool = input;
        self
    }
    /// <p>The carrier IP address. This option is only available for network interfaces which reside in a subnet in a Wavelength Zone (for example an EC2 instance). </p>
    pub fn carrier_ip(mut self, input: impl Into<std::string::String>) -> Self {
        self.carrier_ip = Some(input.into());
        self
    }
    /// <p>The carrier IP address. This option is only available for network interfaces which reside in a subnet in a Wavelength Zone (for example an EC2 instance). </p>
    pub fn set_carrier_ip(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.carrier_ip = input;
        self
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`AllocateAddressOutput`](crate::operation::allocate_address::AllocateAddressOutput).
    pub fn build(self) -> crate::operation::allocate_address::AllocateAddressOutput {
        crate::operation::allocate_address::AllocateAddressOutput {
            public_ip: self.public_ip,
            allocation_id: self.allocation_id,
            public_ipv4_pool: self.public_ipv4_pool,
            network_border_group: self.network_border_group,
            domain: self.domain,
            customer_owned_ip: self.customer_owned_ip,
            customer_owned_ipv4_pool: self.customer_owned_ipv4_pool,
            carrier_ip: self.carrier_ip,
            _request_id: self._request_id,
        }
    }
}