aws_sdk_ec2/operation/disassociate_transit_gateway_route_table/
_disassociate_transit_gateway_route_table_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 DisassociateTransitGatewayRouteTableInput {
6    /// <p>The ID of the transit gateway route table.</p>
7    pub transit_gateway_route_table_id: ::std::option::Option<::std::string::String>,
8    /// <p>The ID of the attachment.</p>
9    pub transit_gateway_attachment_id: ::std::option::Option<::std::string::String>,
10    /// <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>
11    pub dry_run: ::std::option::Option<bool>,
12}
13impl DisassociateTransitGatewayRouteTableInput {
14    /// <p>The ID of the transit gateway route table.</p>
15    pub fn transit_gateway_route_table_id(&self) -> ::std::option::Option<&str> {
16        self.transit_gateway_route_table_id.as_deref()
17    }
18    /// <p>The ID of the attachment.</p>
19    pub fn transit_gateway_attachment_id(&self) -> ::std::option::Option<&str> {
20        self.transit_gateway_attachment_id.as_deref()
21    }
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 fn dry_run(&self) -> ::std::option::Option<bool> {
24        self.dry_run
25    }
26}
27impl DisassociateTransitGatewayRouteTableInput {
28    /// Creates a new builder-style object to manufacture [`DisassociateTransitGatewayRouteTableInput`](crate::operation::disassociate_transit_gateway_route_table::DisassociateTransitGatewayRouteTableInput).
29    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/// A builder for [`DisassociateTransitGatewayRouteTableInput`](crate::operation::disassociate_transit_gateway_route_table::DisassociateTransitGatewayRouteTableInput).
35#[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    /// <p>The ID of the transit gateway route table.</p>
44    /// This field is required.
45    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    /// <p>The ID of the transit gateway route table.</p>
50    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    /// <p>The ID of the transit gateway route table.</p>
55    pub fn get_transit_gateway_route_table_id(&self) -> &::std::option::Option<::std::string::String> {
56        &self.transit_gateway_route_table_id
57    }
58    /// <p>The ID of the attachment.</p>
59    /// This field is required.
60    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    /// <p>The ID of the attachment.</p>
65    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    /// <p>The ID of the attachment.</p>
70    pub fn get_transit_gateway_attachment_id(&self) -> &::std::option::Option<::std::string::String> {
71        &self.transit_gateway_attachment_id
72    }
73    /// <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>
74    pub fn dry_run(mut self, input: bool) -> Self {
75        self.dry_run = ::std::option::Option::Some(input);
76        self
77    }
78    /// <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>
79    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
80        self.dry_run = input;
81        self
82    }
83    /// <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>
84    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
85        &self.dry_run
86    }
87    /// Consumes the builder and constructs a [`DisassociateTransitGatewayRouteTableInput`](crate::operation::disassociate_transit_gateway_route_table::DisassociateTransitGatewayRouteTableInput).
88    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}