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>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>
21    pub dry_run: ::std::option::Option<bool>,
22    /// <p>The ID of the route table.</p>
23    pub route_table_id: ::std::option::Option<::std::string::String>,
24    /// <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>
25    pub destination_cidr_block: ::std::option::Option<::std::string::String>,
26    /// <p>The ID of an internet gateway or virtual private gateway.</p>
27    pub gateway_id: ::std::option::Option<::std::string::String>,
28    /// <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>
29    pub destination_ipv6_cidr_block: ::std::option::Option<::std::string::String>,
30    /// <p>\[IPv6 traffic only\] The ID of an egress-only internet gateway.</p>
31    pub egress_only_internet_gateway_id: ::std::option::Option<::std::string::String>,
32    /// <p>The ID of a NAT instance in your VPC.</p>
33    pub instance_id: ::std::option::Option<::std::string::String>,
34    /// <p>The ID of a network interface.</p>
35    pub network_interface_id: ::std::option::Option<::std::string::String>,
36    /// <p>The ID of a VPC peering connection.</p>
37    pub vpc_peering_connection_id: ::std::option::Option<::std::string::String>,
38    /// <p>\[IPv4 traffic only\] The ID of a NAT gateway.</p>
39    pub nat_gateway_id: ::std::option::Option<::std::string::String>,
40}
41impl ReplaceRouteInput {
42    /// <p>The ID of the prefix list for the route.</p>
43    pub fn destination_prefix_list_id(&self) -> ::std::option::Option<&str> {
44        self.destination_prefix_list_id.as_deref()
45    }
46    /// <p>The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.</p>
47    pub fn vpc_endpoint_id(&self) -> ::std::option::Option<&str> {
48        self.vpc_endpoint_id.as_deref()
49    }
50    /// <p>Specifies whether to reset the local route to its default target (<code>local</code>).</p>
51    pub fn local_target(&self) -> ::std::option::Option<bool> {
52        self.local_target
53    }
54    /// <p>The ID of a transit gateway.</p>
55    pub fn transit_gateway_id(&self) -> ::std::option::Option<&str> {
56        self.transit_gateway_id.as_deref()
57    }
58    /// <p>The ID of the local gateway.</p>
59    pub fn local_gateway_id(&self) -> ::std::option::Option<&str> {
60        self.local_gateway_id.as_deref()
61    }
62    /// <p>\[IPv4 traffic only\] The ID of a carrier gateway.</p>
63    pub fn carrier_gateway_id(&self) -> ::std::option::Option<&str> {
64        self.carrier_gateway_id.as_deref()
65    }
66    /// <p>The Amazon Resource Name (ARN) of the core network.</p>
67    pub fn core_network_arn(&self) -> ::std::option::Option<&str> {
68        self.core_network_arn.as_deref()
69    }
70    /// <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>
71    pub fn dry_run(&self) -> ::std::option::Option<bool> {
72        self.dry_run
73    }
74    /// <p>The ID of the route table.</p>
75    pub fn route_table_id(&self) -> ::std::option::Option<&str> {
76        self.route_table_id.as_deref()
77    }
78    /// <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>
79    pub fn destination_cidr_block(&self) -> ::std::option::Option<&str> {
80        self.destination_cidr_block.as_deref()
81    }
82    /// <p>The ID of an internet gateway or virtual private gateway.</p>
83    pub fn gateway_id(&self) -> ::std::option::Option<&str> {
84        self.gateway_id.as_deref()
85    }
86    /// <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>
87    pub fn destination_ipv6_cidr_block(&self) -> ::std::option::Option<&str> {
88        self.destination_ipv6_cidr_block.as_deref()
89    }
90    /// <p>\[IPv6 traffic only\] The ID of an egress-only internet gateway.</p>
91    pub fn egress_only_internet_gateway_id(&self) -> ::std::option::Option<&str> {
92        self.egress_only_internet_gateway_id.as_deref()
93    }
94    /// <p>The ID of a NAT instance in your VPC.</p>
95    pub fn instance_id(&self) -> ::std::option::Option<&str> {
96        self.instance_id.as_deref()
97    }
98    /// <p>The ID of a network interface.</p>
99    pub fn network_interface_id(&self) -> ::std::option::Option<&str> {
100        self.network_interface_id.as_deref()
101    }
102    /// <p>The ID of a VPC peering connection.</p>
103    pub fn vpc_peering_connection_id(&self) -> ::std::option::Option<&str> {
104        self.vpc_peering_connection_id.as_deref()
105    }
106    /// <p>\[IPv4 traffic only\] The ID of a NAT gateway.</p>
107    pub fn nat_gateway_id(&self) -> ::std::option::Option<&str> {
108        self.nat_gateway_id.as_deref()
109    }
110}
111impl ReplaceRouteInput {
112    /// Creates a new builder-style object to manufacture [`ReplaceRouteInput`](crate::operation::replace_route::ReplaceRouteInput).
113    pub fn builder() -> crate::operation::replace_route::builders::ReplaceRouteInputBuilder {
114        crate::operation::replace_route::builders::ReplaceRouteInputBuilder::default()
115    }
116}
117
118/// A builder for [`ReplaceRouteInput`](crate::operation::replace_route::ReplaceRouteInput).
119#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
120#[non_exhaustive]
121pub struct ReplaceRouteInputBuilder {
122    pub(crate) destination_prefix_list_id: ::std::option::Option<::std::string::String>,
123    pub(crate) vpc_endpoint_id: ::std::option::Option<::std::string::String>,
124    pub(crate) local_target: ::std::option::Option<bool>,
125    pub(crate) transit_gateway_id: ::std::option::Option<::std::string::String>,
126    pub(crate) local_gateway_id: ::std::option::Option<::std::string::String>,
127    pub(crate) carrier_gateway_id: ::std::option::Option<::std::string::String>,
128    pub(crate) core_network_arn: ::std::option::Option<::std::string::String>,
129    pub(crate) dry_run: ::std::option::Option<bool>,
130    pub(crate) route_table_id: ::std::option::Option<::std::string::String>,
131    pub(crate) destination_cidr_block: ::std::option::Option<::std::string::String>,
132    pub(crate) gateway_id: ::std::option::Option<::std::string::String>,
133    pub(crate) destination_ipv6_cidr_block: ::std::option::Option<::std::string::String>,
134    pub(crate) egress_only_internet_gateway_id: ::std::option::Option<::std::string::String>,
135    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
136    pub(crate) network_interface_id: ::std::option::Option<::std::string::String>,
137    pub(crate) vpc_peering_connection_id: ::std::option::Option<::std::string::String>,
138    pub(crate) nat_gateway_id: ::std::option::Option<::std::string::String>,
139}
140impl ReplaceRouteInputBuilder {
141    /// <p>The ID of the prefix list for the route.</p>
142    pub fn destination_prefix_list_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143        self.destination_prefix_list_id = ::std::option::Option::Some(input.into());
144        self
145    }
146    /// <p>The ID of the prefix list for the route.</p>
147    pub fn set_destination_prefix_list_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148        self.destination_prefix_list_id = input;
149        self
150    }
151    /// <p>The ID of the prefix list for the route.</p>
152    pub fn get_destination_prefix_list_id(&self) -> &::std::option::Option<::std::string::String> {
153        &self.destination_prefix_list_id
154    }
155    /// <p>The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.</p>
156    pub fn vpc_endpoint_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
157        self.vpc_endpoint_id = ::std::option::Option::Some(input.into());
158        self
159    }
160    /// <p>The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.</p>
161    pub fn set_vpc_endpoint_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
162        self.vpc_endpoint_id = input;
163        self
164    }
165    /// <p>The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.</p>
166    pub fn get_vpc_endpoint_id(&self) -> &::std::option::Option<::std::string::String> {
167        &self.vpc_endpoint_id
168    }
169    /// <p>Specifies whether to reset the local route to its default target (<code>local</code>).</p>
170    pub fn local_target(mut self, input: bool) -> Self {
171        self.local_target = ::std::option::Option::Some(input);
172        self
173    }
174    /// <p>Specifies whether to reset the local route to its default target (<code>local</code>).</p>
175    pub fn set_local_target(mut self, input: ::std::option::Option<bool>) -> Self {
176        self.local_target = input;
177        self
178    }
179    /// <p>Specifies whether to reset the local route to its default target (<code>local</code>).</p>
180    pub fn get_local_target(&self) -> &::std::option::Option<bool> {
181        &self.local_target
182    }
183    /// <p>The ID of a transit gateway.</p>
184    pub fn transit_gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
185        self.transit_gateway_id = ::std::option::Option::Some(input.into());
186        self
187    }
188    /// <p>The ID of a transit gateway.</p>
189    pub fn set_transit_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
190        self.transit_gateway_id = input;
191        self
192    }
193    /// <p>The ID of a transit gateway.</p>
194    pub fn get_transit_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
195        &self.transit_gateway_id
196    }
197    /// <p>The ID of the local gateway.</p>
198    pub fn local_gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
199        self.local_gateway_id = ::std::option::Option::Some(input.into());
200        self
201    }
202    /// <p>The ID of the local gateway.</p>
203    pub fn set_local_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
204        self.local_gateway_id = input;
205        self
206    }
207    /// <p>The ID of the local gateway.</p>
208    pub fn get_local_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
209        &self.local_gateway_id
210    }
211    /// <p>\[IPv4 traffic only\] The ID of a carrier gateway.</p>
212    pub fn carrier_gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
213        self.carrier_gateway_id = ::std::option::Option::Some(input.into());
214        self
215    }
216    /// <p>\[IPv4 traffic only\] The ID of a carrier gateway.</p>
217    pub fn set_carrier_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
218        self.carrier_gateway_id = input;
219        self
220    }
221    /// <p>\[IPv4 traffic only\] The ID of a carrier gateway.</p>
222    pub fn get_carrier_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
223        &self.carrier_gateway_id
224    }
225    /// <p>The Amazon Resource Name (ARN) of the core network.</p>
226    pub fn core_network_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
227        self.core_network_arn = ::std::option::Option::Some(input.into());
228        self
229    }
230    /// <p>The Amazon Resource Name (ARN) of the core network.</p>
231    pub fn set_core_network_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
232        self.core_network_arn = input;
233        self
234    }
235    /// <p>The Amazon Resource Name (ARN) of the core network.</p>
236    pub fn get_core_network_arn(&self) -> &::std::option::Option<::std::string::String> {
237        &self.core_network_arn
238    }
239    /// <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>
240    pub fn dry_run(mut self, input: bool) -> Self {
241        self.dry_run = ::std::option::Option::Some(input);
242        self
243    }
244    /// <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>
245    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
246        self.dry_run = input;
247        self
248    }
249    /// <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>
250    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
251        &self.dry_run
252    }
253    /// <p>The ID of the route table.</p>
254    /// This field is required.
255    pub fn route_table_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
256        self.route_table_id = ::std::option::Option::Some(input.into());
257        self
258    }
259    /// <p>The ID of the route table.</p>
260    pub fn set_route_table_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
261        self.route_table_id = input;
262        self
263    }
264    /// <p>The ID of the route table.</p>
265    pub fn get_route_table_id(&self) -> &::std::option::Option<::std::string::String> {
266        &self.route_table_id
267    }
268    /// <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>
269    pub fn destination_cidr_block(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
270        self.destination_cidr_block = ::std::option::Option::Some(input.into());
271        self
272    }
273    /// <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>
274    pub fn set_destination_cidr_block(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
275        self.destination_cidr_block = input;
276        self
277    }
278    /// <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>
279    pub fn get_destination_cidr_block(&self) -> &::std::option::Option<::std::string::String> {
280        &self.destination_cidr_block
281    }
282    /// <p>The ID of an internet gateway or virtual private gateway.</p>
283    pub fn gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
284        self.gateway_id = ::std::option::Option::Some(input.into());
285        self
286    }
287    /// <p>The ID of an internet gateway or virtual private gateway.</p>
288    pub fn set_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
289        self.gateway_id = input;
290        self
291    }
292    /// <p>The ID of an internet gateway or virtual private gateway.</p>
293    pub fn get_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
294        &self.gateway_id
295    }
296    /// <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>
297    pub fn destination_ipv6_cidr_block(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
298        self.destination_ipv6_cidr_block = ::std::option::Option::Some(input.into());
299        self
300    }
301    /// <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>
302    pub fn set_destination_ipv6_cidr_block(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
303        self.destination_ipv6_cidr_block = input;
304        self
305    }
306    /// <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>
307    pub fn get_destination_ipv6_cidr_block(&self) -> &::std::option::Option<::std::string::String> {
308        &self.destination_ipv6_cidr_block
309    }
310    /// <p>\[IPv6 traffic only\] The ID of an egress-only internet gateway.</p>
311    pub fn egress_only_internet_gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
312        self.egress_only_internet_gateway_id = ::std::option::Option::Some(input.into());
313        self
314    }
315    /// <p>\[IPv6 traffic only\] The ID of an egress-only internet gateway.</p>
316    pub fn set_egress_only_internet_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
317        self.egress_only_internet_gateway_id = input;
318        self
319    }
320    /// <p>\[IPv6 traffic only\] The ID of an egress-only internet gateway.</p>
321    pub fn get_egress_only_internet_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
322        &self.egress_only_internet_gateway_id
323    }
324    /// <p>The ID of a NAT instance in your VPC.</p>
325    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
326        self.instance_id = ::std::option::Option::Some(input.into());
327        self
328    }
329    /// <p>The ID of a NAT instance in your VPC.</p>
330    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
331        self.instance_id = input;
332        self
333    }
334    /// <p>The ID of a NAT instance in your VPC.</p>
335    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
336        &self.instance_id
337    }
338    /// <p>The ID of a network interface.</p>
339    pub fn network_interface_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
340        self.network_interface_id = ::std::option::Option::Some(input.into());
341        self
342    }
343    /// <p>The ID of a network interface.</p>
344    pub fn set_network_interface_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
345        self.network_interface_id = input;
346        self
347    }
348    /// <p>The ID of a network interface.</p>
349    pub fn get_network_interface_id(&self) -> &::std::option::Option<::std::string::String> {
350        &self.network_interface_id
351    }
352    /// <p>The ID of a VPC peering connection.</p>
353    pub fn vpc_peering_connection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
354        self.vpc_peering_connection_id = ::std::option::Option::Some(input.into());
355        self
356    }
357    /// <p>The ID of a VPC peering connection.</p>
358    pub fn set_vpc_peering_connection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
359        self.vpc_peering_connection_id = input;
360        self
361    }
362    /// <p>The ID of a VPC peering connection.</p>
363    pub fn get_vpc_peering_connection_id(&self) -> &::std::option::Option<::std::string::String> {
364        &self.vpc_peering_connection_id
365    }
366    /// <p>\[IPv4 traffic only\] The ID of a NAT gateway.</p>
367    pub fn nat_gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
368        self.nat_gateway_id = ::std::option::Option::Some(input.into());
369        self
370    }
371    /// <p>\[IPv4 traffic only\] The ID of a NAT gateway.</p>
372    pub fn set_nat_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
373        self.nat_gateway_id = input;
374        self
375    }
376    /// <p>\[IPv4 traffic only\] The ID of a NAT gateway.</p>
377    pub fn get_nat_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
378        &self.nat_gateway_id
379    }
380    /// Consumes the builder and constructs a [`ReplaceRouteInput`](crate::operation::replace_route::ReplaceRouteInput).
381    pub fn build(
382        self,
383    ) -> ::std::result::Result<crate::operation::replace_route::ReplaceRouteInput, ::aws_smithy_types::error::operation::BuildError> {
384        ::std::result::Result::Ok(crate::operation::replace_route::ReplaceRouteInput {
385            destination_prefix_list_id: self.destination_prefix_list_id,
386            vpc_endpoint_id: self.vpc_endpoint_id,
387            local_target: self.local_target,
388            transit_gateway_id: self.transit_gateway_id,
389            local_gateway_id: self.local_gateway_id,
390            carrier_gateway_id: self.carrier_gateway_id,
391            core_network_arn: self.core_network_arn,
392            dry_run: self.dry_run,
393            route_table_id: self.route_table_id,
394            destination_cidr_block: self.destination_cidr_block,
395            gateway_id: self.gateway_id,
396            destination_ipv6_cidr_block: self.destination_ipv6_cidr_block,
397            egress_only_internet_gateway_id: self.egress_only_internet_gateway_id,
398            instance_id: self.instance_id,
399            network_interface_id: self.network_interface_id,
400            vpc_peering_connection_id: self.vpc_peering_connection_id,
401            nat_gateway_id: self.nat_gateway_id,
402        })
403    }
404}