aws_sdk_ec2/operation/allocate_address/
_allocate_address_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct AllocateAddressOutput {
6 pub allocation_id: ::std::option::Option<::std::string::String>,
8 pub public_ipv4_pool: ::std::option::Option<::std::string::String>,
10 pub network_border_group: ::std::option::Option<::std::string::String>,
12 pub domain: ::std::option::Option<crate::types::DomainType>,
14 pub customer_owned_ip: ::std::option::Option<::std::string::String>,
16 pub customer_owned_ipv4_pool: ::std::option::Option<::std::string::String>,
18 pub carrier_ip: ::std::option::Option<::std::string::String>,
20 pub public_ip: ::std::option::Option<::std::string::String>,
22 _request_id: Option<String>,
23}
24impl AllocateAddressOutput {
25 pub fn allocation_id(&self) -> ::std::option::Option<&str> {
27 self.allocation_id.as_deref()
28 }
29 pub fn public_ipv4_pool(&self) -> ::std::option::Option<&str> {
31 self.public_ipv4_pool.as_deref()
32 }
33 pub fn network_border_group(&self) -> ::std::option::Option<&str> {
35 self.network_border_group.as_deref()
36 }
37 pub fn domain(&self) -> ::std::option::Option<&crate::types::DomainType> {
39 self.domain.as_ref()
40 }
41 pub fn customer_owned_ip(&self) -> ::std::option::Option<&str> {
43 self.customer_owned_ip.as_deref()
44 }
45 pub fn customer_owned_ipv4_pool(&self) -> ::std::option::Option<&str> {
47 self.customer_owned_ipv4_pool.as_deref()
48 }
49 pub fn carrier_ip(&self) -> ::std::option::Option<&str> {
51 self.carrier_ip.as_deref()
52 }
53 pub fn public_ip(&self) -> ::std::option::Option<&str> {
55 self.public_ip.as_deref()
56 }
57}
58impl ::aws_types::request_id::RequestId for AllocateAddressOutput {
59 fn request_id(&self) -> Option<&str> {
60 self._request_id.as_deref()
61 }
62}
63impl AllocateAddressOutput {
64 pub fn builder() -> crate::operation::allocate_address::builders::AllocateAddressOutputBuilder {
66 crate::operation::allocate_address::builders::AllocateAddressOutputBuilder::default()
67 }
68}
69
70#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
72#[non_exhaustive]
73pub struct AllocateAddressOutputBuilder {
74 pub(crate) allocation_id: ::std::option::Option<::std::string::String>,
75 pub(crate) public_ipv4_pool: ::std::option::Option<::std::string::String>,
76 pub(crate) network_border_group: ::std::option::Option<::std::string::String>,
77 pub(crate) domain: ::std::option::Option<crate::types::DomainType>,
78 pub(crate) customer_owned_ip: ::std::option::Option<::std::string::String>,
79 pub(crate) customer_owned_ipv4_pool: ::std::option::Option<::std::string::String>,
80 pub(crate) carrier_ip: ::std::option::Option<::std::string::String>,
81 pub(crate) public_ip: ::std::option::Option<::std::string::String>,
82 _request_id: Option<String>,
83}
84impl AllocateAddressOutputBuilder {
85 pub fn allocation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87 self.allocation_id = ::std::option::Option::Some(input.into());
88 self
89 }
90 pub fn set_allocation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92 self.allocation_id = input;
93 self
94 }
95 pub fn get_allocation_id(&self) -> &::std::option::Option<::std::string::String> {
97 &self.allocation_id
98 }
99 pub fn public_ipv4_pool(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101 self.public_ipv4_pool = ::std::option::Option::Some(input.into());
102 self
103 }
104 pub fn set_public_ipv4_pool(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106 self.public_ipv4_pool = input;
107 self
108 }
109 pub fn get_public_ipv4_pool(&self) -> &::std::option::Option<::std::string::String> {
111 &self.public_ipv4_pool
112 }
113 pub fn network_border_group(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115 self.network_border_group = ::std::option::Option::Some(input.into());
116 self
117 }
118 pub fn set_network_border_group(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120 self.network_border_group = input;
121 self
122 }
123 pub fn get_network_border_group(&self) -> &::std::option::Option<::std::string::String> {
125 &self.network_border_group
126 }
127 pub fn domain(mut self, input: crate::types::DomainType) -> Self {
129 self.domain = ::std::option::Option::Some(input);
130 self
131 }
132 pub fn set_domain(mut self, input: ::std::option::Option<crate::types::DomainType>) -> Self {
134 self.domain = input;
135 self
136 }
137 pub fn get_domain(&self) -> &::std::option::Option<crate::types::DomainType> {
139 &self.domain
140 }
141 pub fn customer_owned_ip(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143 self.customer_owned_ip = ::std::option::Option::Some(input.into());
144 self
145 }
146 pub fn set_customer_owned_ip(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148 self.customer_owned_ip = input;
149 self
150 }
151 pub fn get_customer_owned_ip(&self) -> &::std::option::Option<::std::string::String> {
153 &self.customer_owned_ip
154 }
155 pub fn customer_owned_ipv4_pool(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
157 self.customer_owned_ipv4_pool = ::std::option::Option::Some(input.into());
158 self
159 }
160 pub fn set_customer_owned_ipv4_pool(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
162 self.customer_owned_ipv4_pool = input;
163 self
164 }
165 pub fn get_customer_owned_ipv4_pool(&self) -> &::std::option::Option<::std::string::String> {
167 &self.customer_owned_ipv4_pool
168 }
169 pub fn carrier_ip(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
171 self.carrier_ip = ::std::option::Option::Some(input.into());
172 self
173 }
174 pub fn set_carrier_ip(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
176 self.carrier_ip = input;
177 self
178 }
179 pub fn get_carrier_ip(&self) -> &::std::option::Option<::std::string::String> {
181 &self.carrier_ip
182 }
183 pub fn public_ip(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
185 self.public_ip = ::std::option::Option::Some(input.into());
186 self
187 }
188 pub fn set_public_ip(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
190 self.public_ip = input;
191 self
192 }
193 pub fn get_public_ip(&self) -> &::std::option::Option<::std::string::String> {
195 &self.public_ip
196 }
197 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
198 self._request_id = Some(request_id.into());
199 self
200 }
201
202 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
203 self._request_id = request_id;
204 self
205 }
206 pub fn build(self) -> crate::operation::allocate_address::AllocateAddressOutput {
208 crate::operation::allocate_address::AllocateAddressOutput {
209 allocation_id: self.allocation_id,
210 public_ipv4_pool: self.public_ipv4_pool,
211 network_border_group: self.network_border_group,
212 domain: self.domain,
213 customer_owned_ip: self.customer_owned_ip,
214 customer_owned_ipv4_pool: self.customer_owned_ipv4_pool,
215 carrier_ip: self.carrier_ip,
216 public_ip: self.public_ip,
217 _request_id: self._request_id,
218 }
219 }
220}