Skip to main content

aws_sdk_ec2/types/
_local_gateway_route_table_virtual_interface_group_association.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Describes an association between a local gateway route table and a virtual interface group.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct LocalGatewayRouteTableVirtualInterfaceGroupAssociation {
7    /// <p>The ID of the association.</p>
8    pub local_gateway_route_table_virtual_interface_group_association_id: ::std::option::Option<::std::string::String>,
9    /// <p>The ID of the virtual interface group.</p>
10    pub local_gateway_virtual_interface_group_id: ::std::option::Option<::std::string::String>,
11    /// <p>The ID of the local gateway.</p>
12    pub local_gateway_id: ::std::option::Option<::std::string::String>,
13    /// <p>The ID of the local gateway route table.</p>
14    pub local_gateway_route_table_id: ::std::option::Option<::std::string::String>,
15    /// <p>The Amazon Resource Name (ARN) of the local gateway route table for the virtual interface group.</p>
16    pub local_gateway_route_table_arn: ::std::option::Option<::std::string::String>,
17    /// <p>The ID of the Amazon Web Services account that owns the local gateway virtual interface group association.</p>
18    pub owner_id: ::std::option::Option<::std::string::String>,
19    /// <p>The state of the association.</p>
20    pub state: ::std::option::Option<::std::string::String>,
21    /// <p>The tags assigned to the association.</p>
22    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
23}
24impl LocalGatewayRouteTableVirtualInterfaceGroupAssociation {
25    /// <p>The ID of the association.</p>
26    pub fn local_gateway_route_table_virtual_interface_group_association_id(&self) -> ::std::option::Option<&str> {
27        self.local_gateway_route_table_virtual_interface_group_association_id.as_deref()
28    }
29    /// <p>The ID of the virtual interface group.</p>
30    pub fn local_gateway_virtual_interface_group_id(&self) -> ::std::option::Option<&str> {
31        self.local_gateway_virtual_interface_group_id.as_deref()
32    }
33    /// <p>The ID of the local gateway.</p>
34    pub fn local_gateway_id(&self) -> ::std::option::Option<&str> {
35        self.local_gateway_id.as_deref()
36    }
37    /// <p>The ID of the local gateway route table.</p>
38    pub fn local_gateway_route_table_id(&self) -> ::std::option::Option<&str> {
39        self.local_gateway_route_table_id.as_deref()
40    }
41    /// <p>The Amazon Resource Name (ARN) of the local gateway route table for the virtual interface group.</p>
42    pub fn local_gateway_route_table_arn(&self) -> ::std::option::Option<&str> {
43        self.local_gateway_route_table_arn.as_deref()
44    }
45    /// <p>The ID of the Amazon Web Services account that owns the local gateway virtual interface group association.</p>
46    pub fn owner_id(&self) -> ::std::option::Option<&str> {
47        self.owner_id.as_deref()
48    }
49    /// <p>The state of the association.</p>
50    pub fn state(&self) -> ::std::option::Option<&str> {
51        self.state.as_deref()
52    }
53    /// <p>The tags assigned to the association.</p>
54    ///
55    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
56    pub fn tags(&self) -> &[crate::types::Tag] {
57        self.tags.as_deref().unwrap_or_default()
58    }
59}
60impl LocalGatewayRouteTableVirtualInterfaceGroupAssociation {
61    /// Creates a new builder-style object to manufacture [`LocalGatewayRouteTableVirtualInterfaceGroupAssociation`](crate::types::LocalGatewayRouteTableVirtualInterfaceGroupAssociation).
62    pub fn builder() -> crate::types::builders::LocalGatewayRouteTableVirtualInterfaceGroupAssociationBuilder {
63        crate::types::builders::LocalGatewayRouteTableVirtualInterfaceGroupAssociationBuilder::default()
64    }
65}
66
67/// A builder for [`LocalGatewayRouteTableVirtualInterfaceGroupAssociation`](crate::types::LocalGatewayRouteTableVirtualInterfaceGroupAssociation).
68#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
69#[non_exhaustive]
70pub struct LocalGatewayRouteTableVirtualInterfaceGroupAssociationBuilder {
71    pub(crate) local_gateway_route_table_virtual_interface_group_association_id: ::std::option::Option<::std::string::String>,
72    pub(crate) local_gateway_virtual_interface_group_id: ::std::option::Option<::std::string::String>,
73    pub(crate) local_gateway_id: ::std::option::Option<::std::string::String>,
74    pub(crate) local_gateway_route_table_id: ::std::option::Option<::std::string::String>,
75    pub(crate) local_gateway_route_table_arn: ::std::option::Option<::std::string::String>,
76    pub(crate) owner_id: ::std::option::Option<::std::string::String>,
77    pub(crate) state: ::std::option::Option<::std::string::String>,
78    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
79}
80impl LocalGatewayRouteTableVirtualInterfaceGroupAssociationBuilder {
81    /// <p>The ID of the association.</p>
82    pub fn local_gateway_route_table_virtual_interface_group_association_id(
83        mut self,
84        input: impl ::std::convert::Into<::std::string::String>,
85    ) -> Self {
86        self.local_gateway_route_table_virtual_interface_group_association_id = ::std::option::Option::Some(input.into());
87        self
88    }
89    /// <p>The ID of the association.</p>
90    pub fn set_local_gateway_route_table_virtual_interface_group_association_id(
91        mut self,
92        input: ::std::option::Option<::std::string::String>,
93    ) -> Self {
94        self.local_gateway_route_table_virtual_interface_group_association_id = input;
95        self
96    }
97    /// <p>The ID of the association.</p>
98    pub fn get_local_gateway_route_table_virtual_interface_group_association_id(&self) -> &::std::option::Option<::std::string::String> {
99        &self.local_gateway_route_table_virtual_interface_group_association_id
100    }
101    /// <p>The ID of the virtual interface group.</p>
102    pub fn local_gateway_virtual_interface_group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103        self.local_gateway_virtual_interface_group_id = ::std::option::Option::Some(input.into());
104        self
105    }
106    /// <p>The ID of the virtual interface group.</p>
107    pub fn set_local_gateway_virtual_interface_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108        self.local_gateway_virtual_interface_group_id = input;
109        self
110    }
111    /// <p>The ID of the virtual interface group.</p>
112    pub fn get_local_gateway_virtual_interface_group_id(&self) -> &::std::option::Option<::std::string::String> {
113        &self.local_gateway_virtual_interface_group_id
114    }
115    /// <p>The ID of the local gateway.</p>
116    pub fn local_gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117        self.local_gateway_id = ::std::option::Option::Some(input.into());
118        self
119    }
120    /// <p>The ID of the local gateway.</p>
121    pub fn set_local_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122        self.local_gateway_id = input;
123        self
124    }
125    /// <p>The ID of the local gateway.</p>
126    pub fn get_local_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
127        &self.local_gateway_id
128    }
129    /// <p>The ID of the local gateway route table.</p>
130    pub fn local_gateway_route_table_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131        self.local_gateway_route_table_id = ::std::option::Option::Some(input.into());
132        self
133    }
134    /// <p>The ID of the local gateway route table.</p>
135    pub fn set_local_gateway_route_table_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136        self.local_gateway_route_table_id = input;
137        self
138    }
139    /// <p>The ID of the local gateway route table.</p>
140    pub fn get_local_gateway_route_table_id(&self) -> &::std::option::Option<::std::string::String> {
141        &self.local_gateway_route_table_id
142    }
143    /// <p>The Amazon Resource Name (ARN) of the local gateway route table for the virtual interface group.</p>
144    pub fn local_gateway_route_table_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145        self.local_gateway_route_table_arn = ::std::option::Option::Some(input.into());
146        self
147    }
148    /// <p>The Amazon Resource Name (ARN) of the local gateway route table for the virtual interface group.</p>
149    pub fn set_local_gateway_route_table_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150        self.local_gateway_route_table_arn = input;
151        self
152    }
153    /// <p>The Amazon Resource Name (ARN) of the local gateway route table for the virtual interface group.</p>
154    pub fn get_local_gateway_route_table_arn(&self) -> &::std::option::Option<::std::string::String> {
155        &self.local_gateway_route_table_arn
156    }
157    /// <p>The ID of the Amazon Web Services account that owns the local gateway virtual interface group association.</p>
158    pub fn owner_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
159        self.owner_id = ::std::option::Option::Some(input.into());
160        self
161    }
162    /// <p>The ID of the Amazon Web Services account that owns the local gateway virtual interface group association.</p>
163    pub fn set_owner_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164        self.owner_id = input;
165        self
166    }
167    /// <p>The ID of the Amazon Web Services account that owns the local gateway virtual interface group association.</p>
168    pub fn get_owner_id(&self) -> &::std::option::Option<::std::string::String> {
169        &self.owner_id
170    }
171    /// <p>The state of the association.</p>
172    pub fn state(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
173        self.state = ::std::option::Option::Some(input.into());
174        self
175    }
176    /// <p>The state of the association.</p>
177    pub fn set_state(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
178        self.state = input;
179        self
180    }
181    /// <p>The state of the association.</p>
182    pub fn get_state(&self) -> &::std::option::Option<::std::string::String> {
183        &self.state
184    }
185    /// Appends an item to `tags`.
186    ///
187    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
188    ///
189    /// <p>The tags assigned to the association.</p>
190    pub fn tags(mut self, input: crate::types::Tag) -> Self {
191        let mut v = self.tags.unwrap_or_default();
192        v.push(input);
193        self.tags = ::std::option::Option::Some(v);
194        self
195    }
196    /// <p>The tags assigned to the association.</p>
197    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
198        self.tags = input;
199        self
200    }
201    /// <p>The tags assigned to the association.</p>
202    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
203        &self.tags
204    }
205    /// Consumes the builder and constructs a [`LocalGatewayRouteTableVirtualInterfaceGroupAssociation`](crate::types::LocalGatewayRouteTableVirtualInterfaceGroupAssociation).
206    pub fn build(self) -> crate::types::LocalGatewayRouteTableVirtualInterfaceGroupAssociation {
207        crate::types::LocalGatewayRouteTableVirtualInterfaceGroupAssociation {
208            local_gateway_route_table_virtual_interface_group_association_id: self.local_gateway_route_table_virtual_interface_group_association_id,
209            local_gateway_virtual_interface_group_id: self.local_gateway_virtual_interface_group_id,
210            local_gateway_id: self.local_gateway_id,
211            local_gateway_route_table_id: self.local_gateway_route_table_id,
212            local_gateway_route_table_arn: self.local_gateway_route_table_arn,
213            owner_id: self.owner_id,
214            state: self.state,
215            tags: self.tags,
216        }
217    }
218}