aws_sdk_ec2/operation/disassociate_transit_gateway_route_table/
_disassociate_transit_gateway_route_table_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DisassociateTransitGatewayRouteTableInput {
6 pub transit_gateway_route_table_id: ::std::option::Option<::std::string::String>,
8 pub transit_gateway_attachment_id: ::std::option::Option<::std::string::String>,
10 pub dry_run: ::std::option::Option<bool>,
12}
13impl DisassociateTransitGatewayRouteTableInput {
14 pub fn transit_gateway_route_table_id(&self) -> ::std::option::Option<&str> {
16 self.transit_gateway_route_table_id.as_deref()
17 }
18 pub fn transit_gateway_attachment_id(&self) -> ::std::option::Option<&str> {
20 self.transit_gateway_attachment_id.as_deref()
21 }
22 pub fn dry_run(&self) -> ::std::option::Option<bool> {
24 self.dry_run
25 }
26}
27impl DisassociateTransitGatewayRouteTableInput {
28 pub fn builder() -> crate::operation::disassociate_transit_gateway_route_table::builders::DisassociateTransitGatewayRouteTableInputBuilder {
30 crate::operation::disassociate_transit_gateway_route_table::builders::DisassociateTransitGatewayRouteTableInputBuilder::default()
31 }
32}
33
34#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct DisassociateTransitGatewayRouteTableInputBuilder {
38 pub(crate) transit_gateway_route_table_id: ::std::option::Option<::std::string::String>,
39 pub(crate) transit_gateway_attachment_id: ::std::option::Option<::std::string::String>,
40 pub(crate) dry_run: ::std::option::Option<bool>,
41}
42impl DisassociateTransitGatewayRouteTableInputBuilder {
43 pub fn transit_gateway_route_table_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46 self.transit_gateway_route_table_id = ::std::option::Option::Some(input.into());
47 self
48 }
49 pub fn set_transit_gateway_route_table_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51 self.transit_gateway_route_table_id = input;
52 self
53 }
54 pub fn get_transit_gateway_route_table_id(&self) -> &::std::option::Option<::std::string::String> {
56 &self.transit_gateway_route_table_id
57 }
58 pub fn transit_gateway_attachment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61 self.transit_gateway_attachment_id = ::std::option::Option::Some(input.into());
62 self
63 }
64 pub fn set_transit_gateway_attachment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66 self.transit_gateway_attachment_id = input;
67 self
68 }
69 pub fn get_transit_gateway_attachment_id(&self) -> &::std::option::Option<::std::string::String> {
71 &self.transit_gateway_attachment_id
72 }
73 pub fn dry_run(mut self, input: bool) -> Self {
75 self.dry_run = ::std::option::Option::Some(input);
76 self
77 }
78 pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
80 self.dry_run = input;
81 self
82 }
83 pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
85 &self.dry_run
86 }
87 pub fn build(
89 self,
90 ) -> ::std::result::Result<
91 crate::operation::disassociate_transit_gateway_route_table::DisassociateTransitGatewayRouteTableInput,
92 ::aws_smithy_types::error::operation::BuildError,
93 > {
94 ::std::result::Result::Ok(
95 crate::operation::disassociate_transit_gateway_route_table::DisassociateTransitGatewayRouteTableInput {
96 transit_gateway_route_table_id: self.transit_gateway_route_table_id,
97 transit_gateway_attachment_id: self.transit_gateway_attachment_id,
98 dry_run: self.dry_run,
99 },
100 )
101 }
102}