aws_sdk_ec2/operation/replace_route/
_replace_route_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct ReplaceRouteInput {
6 pub destination_prefix_list_id: ::std::option::Option<::std::string::String>,
8 pub vpc_endpoint_id: ::std::option::Option<::std::string::String>,
10 pub local_target: ::std::option::Option<bool>,
12 pub transit_gateway_id: ::std::option::Option<::std::string::String>,
14 pub local_gateway_id: ::std::option::Option<::std::string::String>,
16 pub carrier_gateway_id: ::std::option::Option<::std::string::String>,
18 pub core_network_arn: ::std::option::Option<::std::string::String>,
20 pub odb_network_arn: ::std::option::Option<::std::string::String>,
22 pub dry_run: ::std::option::Option<bool>,
24 pub route_table_id: ::std::option::Option<::std::string::String>,
26 pub destination_cidr_block: ::std::option::Option<::std::string::String>,
28 pub gateway_id: ::std::option::Option<::std::string::String>,
30 pub destination_ipv6_cidr_block: ::std::option::Option<::std::string::String>,
32 pub egress_only_internet_gateway_id: ::std::option::Option<::std::string::String>,
34 pub instance_id: ::std::option::Option<::std::string::String>,
36 pub network_interface_id: ::std::option::Option<::std::string::String>,
38 pub vpc_peering_connection_id: ::std::option::Option<::std::string::String>,
40 pub nat_gateway_id: ::std::option::Option<::std::string::String>,
42}
43impl ReplaceRouteInput {
44 pub fn destination_prefix_list_id(&self) -> ::std::option::Option<&str> {
46 self.destination_prefix_list_id.as_deref()
47 }
48 pub fn vpc_endpoint_id(&self) -> ::std::option::Option<&str> {
50 self.vpc_endpoint_id.as_deref()
51 }
52 pub fn local_target(&self) -> ::std::option::Option<bool> {
54 self.local_target
55 }
56 pub fn transit_gateway_id(&self) -> ::std::option::Option<&str> {
58 self.transit_gateway_id.as_deref()
59 }
60 pub fn local_gateway_id(&self) -> ::std::option::Option<&str> {
62 self.local_gateway_id.as_deref()
63 }
64 pub fn carrier_gateway_id(&self) -> ::std::option::Option<&str> {
66 self.carrier_gateway_id.as_deref()
67 }
68 pub fn core_network_arn(&self) -> ::std::option::Option<&str> {
70 self.core_network_arn.as_deref()
71 }
72 pub fn odb_network_arn(&self) -> ::std::option::Option<&str> {
74 self.odb_network_arn.as_deref()
75 }
76 pub fn dry_run(&self) -> ::std::option::Option<bool> {
78 self.dry_run
79 }
80 pub fn route_table_id(&self) -> ::std::option::Option<&str> {
82 self.route_table_id.as_deref()
83 }
84 pub fn destination_cidr_block(&self) -> ::std::option::Option<&str> {
86 self.destination_cidr_block.as_deref()
87 }
88 pub fn gateway_id(&self) -> ::std::option::Option<&str> {
90 self.gateway_id.as_deref()
91 }
92 pub fn destination_ipv6_cidr_block(&self) -> ::std::option::Option<&str> {
94 self.destination_ipv6_cidr_block.as_deref()
95 }
96 pub fn egress_only_internet_gateway_id(&self) -> ::std::option::Option<&str> {
98 self.egress_only_internet_gateway_id.as_deref()
99 }
100 pub fn instance_id(&self) -> ::std::option::Option<&str> {
102 self.instance_id.as_deref()
103 }
104 pub fn network_interface_id(&self) -> ::std::option::Option<&str> {
106 self.network_interface_id.as_deref()
107 }
108 pub fn vpc_peering_connection_id(&self) -> ::std::option::Option<&str> {
110 self.vpc_peering_connection_id.as_deref()
111 }
112 pub fn nat_gateway_id(&self) -> ::std::option::Option<&str> {
114 self.nat_gateway_id.as_deref()
115 }
116}
117impl ReplaceRouteInput {
118 pub fn builder() -> crate::operation::replace_route::builders::ReplaceRouteInputBuilder {
120 crate::operation::replace_route::builders::ReplaceRouteInputBuilder::default()
121 }
122}
123
124#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
126#[non_exhaustive]
127pub struct ReplaceRouteInputBuilder {
128 pub(crate) destination_prefix_list_id: ::std::option::Option<::std::string::String>,
129 pub(crate) vpc_endpoint_id: ::std::option::Option<::std::string::String>,
130 pub(crate) local_target: ::std::option::Option<bool>,
131 pub(crate) transit_gateway_id: ::std::option::Option<::std::string::String>,
132 pub(crate) local_gateway_id: ::std::option::Option<::std::string::String>,
133 pub(crate) carrier_gateway_id: ::std::option::Option<::std::string::String>,
134 pub(crate) core_network_arn: ::std::option::Option<::std::string::String>,
135 pub(crate) odb_network_arn: ::std::option::Option<::std::string::String>,
136 pub(crate) dry_run: ::std::option::Option<bool>,
137 pub(crate) route_table_id: ::std::option::Option<::std::string::String>,
138 pub(crate) destination_cidr_block: ::std::option::Option<::std::string::String>,
139 pub(crate) gateway_id: ::std::option::Option<::std::string::String>,
140 pub(crate) destination_ipv6_cidr_block: ::std::option::Option<::std::string::String>,
141 pub(crate) egress_only_internet_gateway_id: ::std::option::Option<::std::string::String>,
142 pub(crate) instance_id: ::std::option::Option<::std::string::String>,
143 pub(crate) network_interface_id: ::std::option::Option<::std::string::String>,
144 pub(crate) vpc_peering_connection_id: ::std::option::Option<::std::string::String>,
145 pub(crate) nat_gateway_id: ::std::option::Option<::std::string::String>,
146}
147impl ReplaceRouteInputBuilder {
148 pub fn destination_prefix_list_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150 self.destination_prefix_list_id = ::std::option::Option::Some(input.into());
151 self
152 }
153 pub fn set_destination_prefix_list_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155 self.destination_prefix_list_id = input;
156 self
157 }
158 pub fn get_destination_prefix_list_id(&self) -> &::std::option::Option<::std::string::String> {
160 &self.destination_prefix_list_id
161 }
162 pub fn vpc_endpoint_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
164 self.vpc_endpoint_id = ::std::option::Option::Some(input.into());
165 self
166 }
167 pub fn set_vpc_endpoint_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
169 self.vpc_endpoint_id = input;
170 self
171 }
172 pub fn get_vpc_endpoint_id(&self) -> &::std::option::Option<::std::string::String> {
174 &self.vpc_endpoint_id
175 }
176 pub fn local_target(mut self, input: bool) -> Self {
178 self.local_target = ::std::option::Option::Some(input);
179 self
180 }
181 pub fn set_local_target(mut self, input: ::std::option::Option<bool>) -> Self {
183 self.local_target = input;
184 self
185 }
186 pub fn get_local_target(&self) -> &::std::option::Option<bool> {
188 &self.local_target
189 }
190 pub fn transit_gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
192 self.transit_gateway_id = ::std::option::Option::Some(input.into());
193 self
194 }
195 pub fn set_transit_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
197 self.transit_gateway_id = input;
198 self
199 }
200 pub fn get_transit_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
202 &self.transit_gateway_id
203 }
204 pub fn local_gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
206 self.local_gateway_id = ::std::option::Option::Some(input.into());
207 self
208 }
209 pub fn set_local_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
211 self.local_gateway_id = input;
212 self
213 }
214 pub fn get_local_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
216 &self.local_gateway_id
217 }
218 pub fn carrier_gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
220 self.carrier_gateway_id = ::std::option::Option::Some(input.into());
221 self
222 }
223 pub fn set_carrier_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
225 self.carrier_gateway_id = input;
226 self
227 }
228 pub fn get_carrier_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
230 &self.carrier_gateway_id
231 }
232 pub fn core_network_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
234 self.core_network_arn = ::std::option::Option::Some(input.into());
235 self
236 }
237 pub fn set_core_network_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
239 self.core_network_arn = input;
240 self
241 }
242 pub fn get_core_network_arn(&self) -> &::std::option::Option<::std::string::String> {
244 &self.core_network_arn
245 }
246 pub fn odb_network_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
248 self.odb_network_arn = ::std::option::Option::Some(input.into());
249 self
250 }
251 pub fn set_odb_network_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
253 self.odb_network_arn = input;
254 self
255 }
256 pub fn get_odb_network_arn(&self) -> &::std::option::Option<::std::string::String> {
258 &self.odb_network_arn
259 }
260 pub fn dry_run(mut self, input: bool) -> Self {
262 self.dry_run = ::std::option::Option::Some(input);
263 self
264 }
265 pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
267 self.dry_run = input;
268 self
269 }
270 pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
272 &self.dry_run
273 }
274 pub fn route_table_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
277 self.route_table_id = ::std::option::Option::Some(input.into());
278 self
279 }
280 pub fn set_route_table_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
282 self.route_table_id = input;
283 self
284 }
285 pub fn get_route_table_id(&self) -> &::std::option::Option<::std::string::String> {
287 &self.route_table_id
288 }
289 pub fn destination_cidr_block(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
291 self.destination_cidr_block = ::std::option::Option::Some(input.into());
292 self
293 }
294 pub fn set_destination_cidr_block(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
296 self.destination_cidr_block = input;
297 self
298 }
299 pub fn get_destination_cidr_block(&self) -> &::std::option::Option<::std::string::String> {
301 &self.destination_cidr_block
302 }
303 pub fn gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
305 self.gateway_id = ::std::option::Option::Some(input.into());
306 self
307 }
308 pub fn set_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
310 self.gateway_id = input;
311 self
312 }
313 pub fn get_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
315 &self.gateway_id
316 }
317 pub fn destination_ipv6_cidr_block(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
319 self.destination_ipv6_cidr_block = ::std::option::Option::Some(input.into());
320 self
321 }
322 pub fn set_destination_ipv6_cidr_block(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
324 self.destination_ipv6_cidr_block = input;
325 self
326 }
327 pub fn get_destination_ipv6_cidr_block(&self) -> &::std::option::Option<::std::string::String> {
329 &self.destination_ipv6_cidr_block
330 }
331 pub fn egress_only_internet_gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
333 self.egress_only_internet_gateway_id = ::std::option::Option::Some(input.into());
334 self
335 }
336 pub fn set_egress_only_internet_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
338 self.egress_only_internet_gateway_id = input;
339 self
340 }
341 pub fn get_egress_only_internet_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
343 &self.egress_only_internet_gateway_id
344 }
345 pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
347 self.instance_id = ::std::option::Option::Some(input.into());
348 self
349 }
350 pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
352 self.instance_id = input;
353 self
354 }
355 pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
357 &self.instance_id
358 }
359 pub fn network_interface_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
361 self.network_interface_id = ::std::option::Option::Some(input.into());
362 self
363 }
364 pub fn set_network_interface_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
366 self.network_interface_id = input;
367 self
368 }
369 pub fn get_network_interface_id(&self) -> &::std::option::Option<::std::string::String> {
371 &self.network_interface_id
372 }
373 pub fn vpc_peering_connection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
375 self.vpc_peering_connection_id = ::std::option::Option::Some(input.into());
376 self
377 }
378 pub fn set_vpc_peering_connection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
380 self.vpc_peering_connection_id = input;
381 self
382 }
383 pub fn get_vpc_peering_connection_id(&self) -> &::std::option::Option<::std::string::String> {
385 &self.vpc_peering_connection_id
386 }
387 pub fn nat_gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
389 self.nat_gateway_id = ::std::option::Option::Some(input.into());
390 self
391 }
392 pub fn set_nat_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
394 self.nat_gateway_id = input;
395 self
396 }
397 pub fn get_nat_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
399 &self.nat_gateway_id
400 }
401 pub fn build(
403 self,
404 ) -> ::std::result::Result<crate::operation::replace_route::ReplaceRouteInput, ::aws_smithy_types::error::operation::BuildError> {
405 ::std::result::Result::Ok(crate::operation::replace_route::ReplaceRouteInput {
406 destination_prefix_list_id: self.destination_prefix_list_id,
407 vpc_endpoint_id: self.vpc_endpoint_id,
408 local_target: self.local_target,
409 transit_gateway_id: self.transit_gateway_id,
410 local_gateway_id: self.local_gateway_id,
411 carrier_gateway_id: self.carrier_gateway_id,
412 core_network_arn: self.core_network_arn,
413 odb_network_arn: self.odb_network_arn,
414 dry_run: self.dry_run,
415 route_table_id: self.route_table_id,
416 destination_cidr_block: self.destination_cidr_block,
417 gateway_id: self.gateway_id,
418 destination_ipv6_cidr_block: self.destination_ipv6_cidr_block,
419 egress_only_internet_gateway_id: self.egress_only_internet_gateway_id,
420 instance_id: self.instance_id,
421 network_interface_id: self.network_interface_id,
422 vpc_peering_connection_id: self.vpc_peering_connection_id,
423 nat_gateway_id: self.nat_gateway_id,
424 })
425 }
426}