aws_sdk_ec2/operation/replace_route/
_replace_route_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct ReplaceRouteInput {
6    /// <p>The ID of the prefix list for the route.</p>
7    pub destination_prefix_list_id: ::std::option::Option<::std::string::String>,
8    /// <p>The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.</p>
9    pub vpc_endpoint_id: ::std::option::Option<::std::string::String>,
10    /// <p>Specifies whether to reset the local route to its default target (<code>local</code>).</p>
11    pub local_target: ::std::option::Option<bool>,
12    /// <p>The ID of a transit gateway.</p>
13    pub transit_gateway_id: ::std::option::Option<::std::string::String>,
14    /// <p>The ID of the local gateway.</p>
15    pub local_gateway_id: ::std::option::Option<::std::string::String>,
16    /// <p>\[IPv4 traffic only\] The ID of a carrier gateway.</p>
17    pub carrier_gateway_id: ::std::option::Option<::std::string::String>,
18    /// <p>The Amazon Resource Name (ARN) of the core network.</p>
19    pub core_network_arn: ::std::option::Option<::std::string::String>,
20    /// <p>The Amazon Resource Name (ARN) of the ODB network.</p>
21    pub odb_network_arn: ::std::option::Option<::std::string::String>,
22    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
23    pub dry_run: ::std::option::Option<bool>,
24    /// <p>The ID of the route table.</p>
25    pub route_table_id: ::std::option::Option<::std::string::String>,
26    /// <p>The IPv4 CIDR address block used for the destination match. The value that you provide must match the CIDR of an existing route in the table.</p>
27    pub destination_cidr_block: ::std::option::Option<::std::string::String>,
28    /// <p>The ID of an internet gateway or virtual private gateway.</p>
29    pub gateway_id: ::std::option::Option<::std::string::String>,
30    /// <p>The IPv6 CIDR address block used for the destination match. The value that you provide must match the CIDR of an existing route in the table.</p>
31    pub destination_ipv6_cidr_block: ::std::option::Option<::std::string::String>,
32    /// <p>\[IPv6 traffic only\] The ID of an egress-only internet gateway.</p>
33    pub egress_only_internet_gateway_id: ::std::option::Option<::std::string::String>,
34    /// <p>The ID of a NAT instance in your VPC.</p>
35    pub instance_id: ::std::option::Option<::std::string::String>,
36    /// <p>The ID of a network interface.</p>
37    pub network_interface_id: ::std::option::Option<::std::string::String>,
38    /// <p>The ID of a VPC peering connection.</p>
39    pub vpc_peering_connection_id: ::std::option::Option<::std::string::String>,
40    /// <p>\[IPv4 traffic only\] The ID of a NAT gateway.</p>
41    pub nat_gateway_id: ::std::option::Option<::std::string::String>,
42}
43impl ReplaceRouteInput {
44    /// <p>The ID of the prefix list for the route.</p>
45    pub fn destination_prefix_list_id(&self) -> ::std::option::Option<&str> {
46        self.destination_prefix_list_id.as_deref()
47    }
48    /// <p>The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.</p>
49    pub fn vpc_endpoint_id(&self) -> ::std::option::Option<&str> {
50        self.vpc_endpoint_id.as_deref()
51    }
52    /// <p>Specifies whether to reset the local route to its default target (<code>local</code>).</p>
53    pub fn local_target(&self) -> ::std::option::Option<bool> {
54        self.local_target
55    }
56    /// <p>The ID of a transit gateway.</p>
57    pub fn transit_gateway_id(&self) -> ::std::option::Option<&str> {
58        self.transit_gateway_id.as_deref()
59    }
60    /// <p>The ID of the local gateway.</p>
61    pub fn local_gateway_id(&self) -> ::std::option::Option<&str> {
62        self.local_gateway_id.as_deref()
63    }
64    /// <p>\[IPv4 traffic only\] The ID of a carrier gateway.</p>
65    pub fn carrier_gateway_id(&self) -> ::std::option::Option<&str> {
66        self.carrier_gateway_id.as_deref()
67    }
68    /// <p>The Amazon Resource Name (ARN) of the core network.</p>
69    pub fn core_network_arn(&self) -> ::std::option::Option<&str> {
70        self.core_network_arn.as_deref()
71    }
72    /// <p>The Amazon Resource Name (ARN) of the ODB network.</p>
73    pub fn odb_network_arn(&self) -> ::std::option::Option<&str> {
74        self.odb_network_arn.as_deref()
75    }
76    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
77    pub fn dry_run(&self) -> ::std::option::Option<bool> {
78        self.dry_run
79    }
80    /// <p>The ID of the route table.</p>
81    pub fn route_table_id(&self) -> ::std::option::Option<&str> {
82        self.route_table_id.as_deref()
83    }
84    /// <p>The IPv4 CIDR address block used for the destination match. The value that you provide must match the CIDR of an existing route in the table.</p>
85    pub fn destination_cidr_block(&self) -> ::std::option::Option<&str> {
86        self.destination_cidr_block.as_deref()
87    }
88    /// <p>The ID of an internet gateway or virtual private gateway.</p>
89    pub fn gateway_id(&self) -> ::std::option::Option<&str> {
90        self.gateway_id.as_deref()
91    }
92    /// <p>The IPv6 CIDR address block used for the destination match. The value that you provide must match the CIDR of an existing route in the table.</p>
93    pub fn destination_ipv6_cidr_block(&self) -> ::std::option::Option<&str> {
94        self.destination_ipv6_cidr_block.as_deref()
95    }
96    /// <p>\[IPv6 traffic only\] The ID of an egress-only internet gateway.</p>
97    pub fn egress_only_internet_gateway_id(&self) -> ::std::option::Option<&str> {
98        self.egress_only_internet_gateway_id.as_deref()
99    }
100    /// <p>The ID of a NAT instance in your VPC.</p>
101    pub fn instance_id(&self) -> ::std::option::Option<&str> {
102        self.instance_id.as_deref()
103    }
104    /// <p>The ID of a network interface.</p>
105    pub fn network_interface_id(&self) -> ::std::option::Option<&str> {
106        self.network_interface_id.as_deref()
107    }
108    /// <p>The ID of a VPC peering connection.</p>
109    pub fn vpc_peering_connection_id(&self) -> ::std::option::Option<&str> {
110        self.vpc_peering_connection_id.as_deref()
111    }
112    /// <p>\[IPv4 traffic only\] The ID of a NAT gateway.</p>
113    pub fn nat_gateway_id(&self) -> ::std::option::Option<&str> {
114        self.nat_gateway_id.as_deref()
115    }
116}
117impl ReplaceRouteInput {
118    /// Creates a new builder-style object to manufacture [`ReplaceRouteInput`](crate::operation::replace_route::ReplaceRouteInput).
119    pub fn builder() -> crate::operation::replace_route::builders::ReplaceRouteInputBuilder {
120        crate::operation::replace_route::builders::ReplaceRouteInputBuilder::default()
121    }
122}
123
124/// A builder for [`ReplaceRouteInput`](crate::operation::replace_route::ReplaceRouteInput).
125#[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    /// <p>The ID of the prefix list for the route.</p>
149    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    /// <p>The ID of the prefix list for the route.</p>
154    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    /// <p>The ID of the prefix list for the route.</p>
159    pub fn get_destination_prefix_list_id(&self) -> &::std::option::Option<::std::string::String> {
160        &self.destination_prefix_list_id
161    }
162    /// <p>The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.</p>
163    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    /// <p>The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.</p>
168    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    /// <p>The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.</p>
173    pub fn get_vpc_endpoint_id(&self) -> &::std::option::Option<::std::string::String> {
174        &self.vpc_endpoint_id
175    }
176    /// <p>Specifies whether to reset the local route to its default target (<code>local</code>).</p>
177    pub fn local_target(mut self, input: bool) -> Self {
178        self.local_target = ::std::option::Option::Some(input);
179        self
180    }
181    /// <p>Specifies whether to reset the local route to its default target (<code>local</code>).</p>
182    pub fn set_local_target(mut self, input: ::std::option::Option<bool>) -> Self {
183        self.local_target = input;
184        self
185    }
186    /// <p>Specifies whether to reset the local route to its default target (<code>local</code>).</p>
187    pub fn get_local_target(&self) -> &::std::option::Option<bool> {
188        &self.local_target
189    }
190    /// <p>The ID of a transit gateway.</p>
191    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    /// <p>The ID of a transit gateway.</p>
196    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    /// <p>The ID of a transit gateway.</p>
201    pub fn get_transit_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
202        &self.transit_gateway_id
203    }
204    /// <p>The ID of the local gateway.</p>
205    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    /// <p>The ID of the local gateway.</p>
210    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    /// <p>The ID of the local gateway.</p>
215    pub fn get_local_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
216        &self.local_gateway_id
217    }
218    /// <p>\[IPv4 traffic only\] The ID of a carrier gateway.</p>
219    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    /// <p>\[IPv4 traffic only\] The ID of a carrier gateway.</p>
224    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    /// <p>\[IPv4 traffic only\] The ID of a carrier gateway.</p>
229    pub fn get_carrier_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
230        &self.carrier_gateway_id
231    }
232    /// <p>The Amazon Resource Name (ARN) of the core network.</p>
233    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    /// <p>The Amazon Resource Name (ARN) of the core network.</p>
238    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    /// <p>The Amazon Resource Name (ARN) of the core network.</p>
243    pub fn get_core_network_arn(&self) -> &::std::option::Option<::std::string::String> {
244        &self.core_network_arn
245    }
246    /// <p>The Amazon Resource Name (ARN) of the ODB network.</p>
247    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    /// <p>The Amazon Resource Name (ARN) of the ODB network.</p>
252    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    /// <p>The Amazon Resource Name (ARN) of the ODB network.</p>
257    pub fn get_odb_network_arn(&self) -> &::std::option::Option<::std::string::String> {
258        &self.odb_network_arn
259    }
260    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
261    pub fn dry_run(mut self, input: bool) -> Self {
262        self.dry_run = ::std::option::Option::Some(input);
263        self
264    }
265    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
266    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
267        self.dry_run = input;
268        self
269    }
270    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
271    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
272        &self.dry_run
273    }
274    /// <p>The ID of the route table.</p>
275    /// This field is required.
276    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    /// <p>The ID of the route table.</p>
281    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    /// <p>The ID of the route table.</p>
286    pub fn get_route_table_id(&self) -> &::std::option::Option<::std::string::String> {
287        &self.route_table_id
288    }
289    /// <p>The IPv4 CIDR address block used for the destination match. The value that you provide must match the CIDR of an existing route in the table.</p>
290    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    /// <p>The IPv4 CIDR address block used for the destination match. The value that you provide must match the CIDR of an existing route in the table.</p>
295    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    /// <p>The IPv4 CIDR address block used for the destination match. The value that you provide must match the CIDR of an existing route in the table.</p>
300    pub fn get_destination_cidr_block(&self) -> &::std::option::Option<::std::string::String> {
301        &self.destination_cidr_block
302    }
303    /// <p>The ID of an internet gateway or virtual private gateway.</p>
304    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    /// <p>The ID of an internet gateway or virtual private gateway.</p>
309    pub fn set_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
310        self.gateway_id = input;
311        self
312    }
313    /// <p>The ID of an internet gateway or virtual private gateway.</p>
314    pub fn get_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
315        &self.gateway_id
316    }
317    /// <p>The IPv6 CIDR address block used for the destination match. The value that you provide must match the CIDR of an existing route in the table.</p>
318    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    /// <p>The IPv6 CIDR address block used for the destination match. The value that you provide must match the CIDR of an existing route in the table.</p>
323    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    /// <p>The IPv6 CIDR address block used for the destination match. The value that you provide must match the CIDR of an existing route in the table.</p>
328    pub fn get_destination_ipv6_cidr_block(&self) -> &::std::option::Option<::std::string::String> {
329        &self.destination_ipv6_cidr_block
330    }
331    /// <p>\[IPv6 traffic only\] The ID of an egress-only internet gateway.</p>
332    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    /// <p>\[IPv6 traffic only\] The ID of an egress-only internet gateway.</p>
337    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    /// <p>\[IPv6 traffic only\] The ID of an egress-only internet gateway.</p>
342    pub fn get_egress_only_internet_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
343        &self.egress_only_internet_gateway_id
344    }
345    /// <p>The ID of a NAT instance in your VPC.</p>
346    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    /// <p>The ID of a NAT instance in your VPC.</p>
351    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
352        self.instance_id = input;
353        self
354    }
355    /// <p>The ID of a NAT instance in your VPC.</p>
356    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
357        &self.instance_id
358    }
359    /// <p>The ID of a network interface.</p>
360    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    /// <p>The ID of a network interface.</p>
365    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    /// <p>The ID of a network interface.</p>
370    pub fn get_network_interface_id(&self) -> &::std::option::Option<::std::string::String> {
371        &self.network_interface_id
372    }
373    /// <p>The ID of a VPC peering connection.</p>
374    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    /// <p>The ID of a VPC peering connection.</p>
379    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    /// <p>The ID of a VPC peering connection.</p>
384    pub fn get_vpc_peering_connection_id(&self) -> &::std::option::Option<::std::string::String> {
385        &self.vpc_peering_connection_id
386    }
387    /// <p>\[IPv4 traffic only\] The ID of a NAT gateway.</p>
388    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    /// <p>\[IPv4 traffic only\] The ID of a NAT gateway.</p>
393    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    /// <p>\[IPv4 traffic only\] The ID of a NAT gateway.</p>
398    pub fn get_nat_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
399        &self.nat_gateway_id
400    }
401    /// Consumes the builder and constructs a [`ReplaceRouteInput`](crate::operation::replace_route::ReplaceRouteInput).
402    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}