aws_sdk_directconnect/operation/create_lag/
_create_lag_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Information about a link aggregation group (LAG).</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateLagOutput {
7    /// <p>The individual bandwidth of the physical connections bundled by the LAG. The possible values are 1Gbps, 10Gbps, 100Gbps, or 400 Gbps..</p>
8    pub connections_bandwidth: ::std::option::Option<::std::string::String>,
9    /// <p>The number of physical dedicated connections initially provisioned and bundled by the LAG. You can have a maximum of four connections when the port speed is 1 Gbps or 10 Gbps, or two when the port speed is 100 Gbps or 400 Gbps.</p>
10    pub number_of_connections: i32,
11    /// <p>The ID of the LAG.</p>
12    pub lag_id: ::std::option::Option<::std::string::String>,
13    /// <p>The ID of the Amazon Web Services account that owns the LAG.</p>
14    pub owner_account: ::std::option::Option<::std::string::String>,
15    /// <p>The name of the LAG.</p>
16    pub lag_name: ::std::option::Option<::std::string::String>,
17    /// <p>The state of the LAG. The following are the possible values:</p>
18    /// <ul>
19    /// <li>
20    /// <p><code>requested</code>: The initial state of a LAG. The LAG stays in the requested state until the Letter of Authorization (LOA) is available.</p></li>
21    /// <li>
22    /// <p><code>pending</code>: The LAG has been approved and is being initialized.</p></li>
23    /// <li>
24    /// <p><code>available</code>: The network link is established and the LAG is ready for use.</p></li>
25    /// <li>
26    /// <p><code>down</code>: The network link is down.</p></li>
27    /// <li>
28    /// <p><code>deleting</code>: The LAG is being deleted.</p></li>
29    /// <li>
30    /// <p><code>deleted</code>: The LAG is deleted.</p></li>
31    /// <li>
32    /// <p><code>unknown</code>: The state of the LAG is not available.</p></li>
33    /// </ul>
34    pub lag_state: ::std::option::Option<crate::types::LagState>,
35    /// <p>The location of the LAG.</p>
36    pub location: ::std::option::Option<::std::string::String>,
37    /// <p>The Amazon Web Services Region where the connection is located.</p>
38    pub region: ::std::option::Option<::std::string::String>,
39    /// <p>The minimum number of physical dedicated connections that must be operational for the LAG itself to be operational.</p>
40    pub minimum_links: i32,
41    /// <p>The Direct Connect endpoint that hosts the LAG.</p>
42    pub aws_device: ::std::option::Option<::std::string::String>,
43    /// <p>The Direct Connect endpoint that hosts the LAG.</p>
44    pub aws_device_v2: ::std::option::Option<::std::string::String>,
45    /// <p>The Direct Connect endpoint that terminates the logical connection. This device might be different than the device that terminates the physical connection.</p>
46    pub aws_logical_device_id: ::std::option::Option<::std::string::String>,
47    /// <p>The connections bundled by the LAG.</p>
48    pub connections: ::std::option::Option<::std::vec::Vec<crate::types::Connection>>,
49    /// <p>Indicates whether the LAG can host other connections.</p>
50    pub allows_hosted_connections: bool,
51    /// <p>Indicates whether jumbo frames are supported.</p>
52    pub jumbo_frame_capable: ::std::option::Option<bool>,
53    /// <p>Indicates whether the LAG supports a secondary BGP peer in the same address family (IPv4/IPv6).</p>
54    pub has_logical_redundancy: ::std::option::Option<crate::types::HasLogicalRedundancy>,
55    /// <p>The tags associated with the LAG.</p>
56    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
57    /// <p>The name of the service provider associated with the LAG.</p>
58    pub provider_name: ::std::option::Option<::std::string::String>,
59    /// <p>Indicates whether the LAG supports MAC Security (MACsec).</p>
60    pub mac_sec_capable: ::std::option::Option<bool>,
61    /// <p>The LAG MAC Security (MACsec) encryption mode.</p>
62    /// <p>The valid values are <code>no_encrypt</code>, <code>should_encrypt</code>, and <code>must_encrypt</code>.</p>
63    pub encryption_mode: ::std::option::Option<::std::string::String>,
64    /// <p>The MAC Security (MACsec) security keys associated with the LAG.</p>
65    pub mac_sec_keys: ::std::option::Option<::std::vec::Vec<crate::types::MacSecKey>>,
66    _request_id: Option<String>,
67}
68impl CreateLagOutput {
69    /// <p>The individual bandwidth of the physical connections bundled by the LAG. The possible values are 1Gbps, 10Gbps, 100Gbps, or 400 Gbps..</p>
70    pub fn connections_bandwidth(&self) -> ::std::option::Option<&str> {
71        self.connections_bandwidth.as_deref()
72    }
73    /// <p>The number of physical dedicated connections initially provisioned and bundled by the LAG. You can have a maximum of four connections when the port speed is 1 Gbps or 10 Gbps, or two when the port speed is 100 Gbps or 400 Gbps.</p>
74    pub fn number_of_connections(&self) -> i32 {
75        self.number_of_connections
76    }
77    /// <p>The ID of the LAG.</p>
78    pub fn lag_id(&self) -> ::std::option::Option<&str> {
79        self.lag_id.as_deref()
80    }
81    /// <p>The ID of the Amazon Web Services account that owns the LAG.</p>
82    pub fn owner_account(&self) -> ::std::option::Option<&str> {
83        self.owner_account.as_deref()
84    }
85    /// <p>The name of the LAG.</p>
86    pub fn lag_name(&self) -> ::std::option::Option<&str> {
87        self.lag_name.as_deref()
88    }
89    /// <p>The state of the LAG. The following are the possible values:</p>
90    /// <ul>
91    /// <li>
92    /// <p><code>requested</code>: The initial state of a LAG. The LAG stays in the requested state until the Letter of Authorization (LOA) is available.</p></li>
93    /// <li>
94    /// <p><code>pending</code>: The LAG has been approved and is being initialized.</p></li>
95    /// <li>
96    /// <p><code>available</code>: The network link is established and the LAG is ready for use.</p></li>
97    /// <li>
98    /// <p><code>down</code>: The network link is down.</p></li>
99    /// <li>
100    /// <p><code>deleting</code>: The LAG is being deleted.</p></li>
101    /// <li>
102    /// <p><code>deleted</code>: The LAG is deleted.</p></li>
103    /// <li>
104    /// <p><code>unknown</code>: The state of the LAG is not available.</p></li>
105    /// </ul>
106    pub fn lag_state(&self) -> ::std::option::Option<&crate::types::LagState> {
107        self.lag_state.as_ref()
108    }
109    /// <p>The location of the LAG.</p>
110    pub fn location(&self) -> ::std::option::Option<&str> {
111        self.location.as_deref()
112    }
113    /// <p>The Amazon Web Services Region where the connection is located.</p>
114    pub fn region(&self) -> ::std::option::Option<&str> {
115        self.region.as_deref()
116    }
117    /// <p>The minimum number of physical dedicated connections that must be operational for the LAG itself to be operational.</p>
118    pub fn minimum_links(&self) -> i32 {
119        self.minimum_links
120    }
121    /// <p>The Direct Connect endpoint that hosts the LAG.</p>
122    pub fn aws_device(&self) -> ::std::option::Option<&str> {
123        self.aws_device.as_deref()
124    }
125    /// <p>The Direct Connect endpoint that hosts the LAG.</p>
126    pub fn aws_device_v2(&self) -> ::std::option::Option<&str> {
127        self.aws_device_v2.as_deref()
128    }
129    /// <p>The Direct Connect endpoint that terminates the logical connection. This device might be different than the device that terminates the physical connection.</p>
130    pub fn aws_logical_device_id(&self) -> ::std::option::Option<&str> {
131        self.aws_logical_device_id.as_deref()
132    }
133    /// <p>The connections bundled by the LAG.</p>
134    ///
135    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.connections.is_none()`.
136    pub fn connections(&self) -> &[crate::types::Connection] {
137        self.connections.as_deref().unwrap_or_default()
138    }
139    /// <p>Indicates whether the LAG can host other connections.</p>
140    pub fn allows_hosted_connections(&self) -> bool {
141        self.allows_hosted_connections
142    }
143    /// <p>Indicates whether jumbo frames are supported.</p>
144    pub fn jumbo_frame_capable(&self) -> ::std::option::Option<bool> {
145        self.jumbo_frame_capable
146    }
147    /// <p>Indicates whether the LAG supports a secondary BGP peer in the same address family (IPv4/IPv6).</p>
148    pub fn has_logical_redundancy(&self) -> ::std::option::Option<&crate::types::HasLogicalRedundancy> {
149        self.has_logical_redundancy.as_ref()
150    }
151    /// <p>The tags associated with the LAG.</p>
152    ///
153    /// 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()`.
154    pub fn tags(&self) -> &[crate::types::Tag] {
155        self.tags.as_deref().unwrap_or_default()
156    }
157    /// <p>The name of the service provider associated with the LAG.</p>
158    pub fn provider_name(&self) -> ::std::option::Option<&str> {
159        self.provider_name.as_deref()
160    }
161    /// <p>Indicates whether the LAG supports MAC Security (MACsec).</p>
162    pub fn mac_sec_capable(&self) -> ::std::option::Option<bool> {
163        self.mac_sec_capable
164    }
165    /// <p>The LAG MAC Security (MACsec) encryption mode.</p>
166    /// <p>The valid values are <code>no_encrypt</code>, <code>should_encrypt</code>, and <code>must_encrypt</code>.</p>
167    pub fn encryption_mode(&self) -> ::std::option::Option<&str> {
168        self.encryption_mode.as_deref()
169    }
170    /// <p>The MAC Security (MACsec) security keys associated with the LAG.</p>
171    ///
172    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.mac_sec_keys.is_none()`.
173    pub fn mac_sec_keys(&self) -> &[crate::types::MacSecKey] {
174        self.mac_sec_keys.as_deref().unwrap_or_default()
175    }
176}
177impl ::aws_types::request_id::RequestId for CreateLagOutput {
178    fn request_id(&self) -> Option<&str> {
179        self._request_id.as_deref()
180    }
181}
182impl CreateLagOutput {
183    /// Creates a new builder-style object to manufacture [`CreateLagOutput`](crate::operation::create_lag::CreateLagOutput).
184    pub fn builder() -> crate::operation::create_lag::builders::CreateLagOutputBuilder {
185        crate::operation::create_lag::builders::CreateLagOutputBuilder::default()
186    }
187}
188
189/// A builder for [`CreateLagOutput`](crate::operation::create_lag::CreateLagOutput).
190#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
191#[non_exhaustive]
192pub struct CreateLagOutputBuilder {
193    pub(crate) connections_bandwidth: ::std::option::Option<::std::string::String>,
194    pub(crate) number_of_connections: ::std::option::Option<i32>,
195    pub(crate) lag_id: ::std::option::Option<::std::string::String>,
196    pub(crate) owner_account: ::std::option::Option<::std::string::String>,
197    pub(crate) lag_name: ::std::option::Option<::std::string::String>,
198    pub(crate) lag_state: ::std::option::Option<crate::types::LagState>,
199    pub(crate) location: ::std::option::Option<::std::string::String>,
200    pub(crate) region: ::std::option::Option<::std::string::String>,
201    pub(crate) minimum_links: ::std::option::Option<i32>,
202    pub(crate) aws_device: ::std::option::Option<::std::string::String>,
203    pub(crate) aws_device_v2: ::std::option::Option<::std::string::String>,
204    pub(crate) aws_logical_device_id: ::std::option::Option<::std::string::String>,
205    pub(crate) connections: ::std::option::Option<::std::vec::Vec<crate::types::Connection>>,
206    pub(crate) allows_hosted_connections: ::std::option::Option<bool>,
207    pub(crate) jumbo_frame_capable: ::std::option::Option<bool>,
208    pub(crate) has_logical_redundancy: ::std::option::Option<crate::types::HasLogicalRedundancy>,
209    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
210    pub(crate) provider_name: ::std::option::Option<::std::string::String>,
211    pub(crate) mac_sec_capable: ::std::option::Option<bool>,
212    pub(crate) encryption_mode: ::std::option::Option<::std::string::String>,
213    pub(crate) mac_sec_keys: ::std::option::Option<::std::vec::Vec<crate::types::MacSecKey>>,
214    _request_id: Option<String>,
215}
216impl CreateLagOutputBuilder {
217    /// <p>The individual bandwidth of the physical connections bundled by the LAG. The possible values are 1Gbps, 10Gbps, 100Gbps, or 400 Gbps..</p>
218    pub fn connections_bandwidth(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
219        self.connections_bandwidth = ::std::option::Option::Some(input.into());
220        self
221    }
222    /// <p>The individual bandwidth of the physical connections bundled by the LAG. The possible values are 1Gbps, 10Gbps, 100Gbps, or 400 Gbps..</p>
223    pub fn set_connections_bandwidth(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
224        self.connections_bandwidth = input;
225        self
226    }
227    /// <p>The individual bandwidth of the physical connections bundled by the LAG. The possible values are 1Gbps, 10Gbps, 100Gbps, or 400 Gbps..</p>
228    pub fn get_connections_bandwidth(&self) -> &::std::option::Option<::std::string::String> {
229        &self.connections_bandwidth
230    }
231    /// <p>The number of physical dedicated connections initially provisioned and bundled by the LAG. You can have a maximum of four connections when the port speed is 1 Gbps or 10 Gbps, or two when the port speed is 100 Gbps or 400 Gbps.</p>
232    pub fn number_of_connections(mut self, input: i32) -> Self {
233        self.number_of_connections = ::std::option::Option::Some(input);
234        self
235    }
236    /// <p>The number of physical dedicated connections initially provisioned and bundled by the LAG. You can have a maximum of four connections when the port speed is 1 Gbps or 10 Gbps, or two when the port speed is 100 Gbps or 400 Gbps.</p>
237    pub fn set_number_of_connections(mut self, input: ::std::option::Option<i32>) -> Self {
238        self.number_of_connections = input;
239        self
240    }
241    /// <p>The number of physical dedicated connections initially provisioned and bundled by the LAG. You can have a maximum of four connections when the port speed is 1 Gbps or 10 Gbps, or two when the port speed is 100 Gbps or 400 Gbps.</p>
242    pub fn get_number_of_connections(&self) -> &::std::option::Option<i32> {
243        &self.number_of_connections
244    }
245    /// <p>The ID of the LAG.</p>
246    pub fn lag_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
247        self.lag_id = ::std::option::Option::Some(input.into());
248        self
249    }
250    /// <p>The ID of the LAG.</p>
251    pub fn set_lag_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
252        self.lag_id = input;
253        self
254    }
255    /// <p>The ID of the LAG.</p>
256    pub fn get_lag_id(&self) -> &::std::option::Option<::std::string::String> {
257        &self.lag_id
258    }
259    /// <p>The ID of the Amazon Web Services account that owns the LAG.</p>
260    pub fn owner_account(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
261        self.owner_account = ::std::option::Option::Some(input.into());
262        self
263    }
264    /// <p>The ID of the Amazon Web Services account that owns the LAG.</p>
265    pub fn set_owner_account(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
266        self.owner_account = input;
267        self
268    }
269    /// <p>The ID of the Amazon Web Services account that owns the LAG.</p>
270    pub fn get_owner_account(&self) -> &::std::option::Option<::std::string::String> {
271        &self.owner_account
272    }
273    /// <p>The name of the LAG.</p>
274    pub fn lag_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
275        self.lag_name = ::std::option::Option::Some(input.into());
276        self
277    }
278    /// <p>The name of the LAG.</p>
279    pub fn set_lag_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
280        self.lag_name = input;
281        self
282    }
283    /// <p>The name of the LAG.</p>
284    pub fn get_lag_name(&self) -> &::std::option::Option<::std::string::String> {
285        &self.lag_name
286    }
287    /// <p>The state of the LAG. The following are the possible values:</p>
288    /// <ul>
289    /// <li>
290    /// <p><code>requested</code>: The initial state of a LAG. The LAG stays in the requested state until the Letter of Authorization (LOA) is available.</p></li>
291    /// <li>
292    /// <p><code>pending</code>: The LAG has been approved and is being initialized.</p></li>
293    /// <li>
294    /// <p><code>available</code>: The network link is established and the LAG is ready for use.</p></li>
295    /// <li>
296    /// <p><code>down</code>: The network link is down.</p></li>
297    /// <li>
298    /// <p><code>deleting</code>: The LAG is being deleted.</p></li>
299    /// <li>
300    /// <p><code>deleted</code>: The LAG is deleted.</p></li>
301    /// <li>
302    /// <p><code>unknown</code>: The state of the LAG is not available.</p></li>
303    /// </ul>
304    pub fn lag_state(mut self, input: crate::types::LagState) -> Self {
305        self.lag_state = ::std::option::Option::Some(input);
306        self
307    }
308    /// <p>The state of the LAG. The following are the possible values:</p>
309    /// <ul>
310    /// <li>
311    /// <p><code>requested</code>: The initial state of a LAG. The LAG stays in the requested state until the Letter of Authorization (LOA) is available.</p></li>
312    /// <li>
313    /// <p><code>pending</code>: The LAG has been approved and is being initialized.</p></li>
314    /// <li>
315    /// <p><code>available</code>: The network link is established and the LAG is ready for use.</p></li>
316    /// <li>
317    /// <p><code>down</code>: The network link is down.</p></li>
318    /// <li>
319    /// <p><code>deleting</code>: The LAG is being deleted.</p></li>
320    /// <li>
321    /// <p><code>deleted</code>: The LAG is deleted.</p></li>
322    /// <li>
323    /// <p><code>unknown</code>: The state of the LAG is not available.</p></li>
324    /// </ul>
325    pub fn set_lag_state(mut self, input: ::std::option::Option<crate::types::LagState>) -> Self {
326        self.lag_state = input;
327        self
328    }
329    /// <p>The state of the LAG. The following are the possible values:</p>
330    /// <ul>
331    /// <li>
332    /// <p><code>requested</code>: The initial state of a LAG. The LAG stays in the requested state until the Letter of Authorization (LOA) is available.</p></li>
333    /// <li>
334    /// <p><code>pending</code>: The LAG has been approved and is being initialized.</p></li>
335    /// <li>
336    /// <p><code>available</code>: The network link is established and the LAG is ready for use.</p></li>
337    /// <li>
338    /// <p><code>down</code>: The network link is down.</p></li>
339    /// <li>
340    /// <p><code>deleting</code>: The LAG is being deleted.</p></li>
341    /// <li>
342    /// <p><code>deleted</code>: The LAG is deleted.</p></li>
343    /// <li>
344    /// <p><code>unknown</code>: The state of the LAG is not available.</p></li>
345    /// </ul>
346    pub fn get_lag_state(&self) -> &::std::option::Option<crate::types::LagState> {
347        &self.lag_state
348    }
349    /// <p>The location of the LAG.</p>
350    pub fn location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
351        self.location = ::std::option::Option::Some(input.into());
352        self
353    }
354    /// <p>The location of the LAG.</p>
355    pub fn set_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
356        self.location = input;
357        self
358    }
359    /// <p>The location of the LAG.</p>
360    pub fn get_location(&self) -> &::std::option::Option<::std::string::String> {
361        &self.location
362    }
363    /// <p>The Amazon Web Services Region where the connection is located.</p>
364    pub fn region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
365        self.region = ::std::option::Option::Some(input.into());
366        self
367    }
368    /// <p>The Amazon Web Services Region where the connection is located.</p>
369    pub fn set_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
370        self.region = input;
371        self
372    }
373    /// <p>The Amazon Web Services Region where the connection is located.</p>
374    pub fn get_region(&self) -> &::std::option::Option<::std::string::String> {
375        &self.region
376    }
377    /// <p>The minimum number of physical dedicated connections that must be operational for the LAG itself to be operational.</p>
378    pub fn minimum_links(mut self, input: i32) -> Self {
379        self.minimum_links = ::std::option::Option::Some(input);
380        self
381    }
382    /// <p>The minimum number of physical dedicated connections that must be operational for the LAG itself to be operational.</p>
383    pub fn set_minimum_links(mut self, input: ::std::option::Option<i32>) -> Self {
384        self.minimum_links = input;
385        self
386    }
387    /// <p>The minimum number of physical dedicated connections that must be operational for the LAG itself to be operational.</p>
388    pub fn get_minimum_links(&self) -> &::std::option::Option<i32> {
389        &self.minimum_links
390    }
391    /// <p>The Direct Connect endpoint that hosts the LAG.</p>
392    pub fn aws_device(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
393        self.aws_device = ::std::option::Option::Some(input.into());
394        self
395    }
396    /// <p>The Direct Connect endpoint that hosts the LAG.</p>
397    pub fn set_aws_device(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
398        self.aws_device = input;
399        self
400    }
401    /// <p>The Direct Connect endpoint that hosts the LAG.</p>
402    pub fn get_aws_device(&self) -> &::std::option::Option<::std::string::String> {
403        &self.aws_device
404    }
405    /// <p>The Direct Connect endpoint that hosts the LAG.</p>
406    pub fn aws_device_v2(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
407        self.aws_device_v2 = ::std::option::Option::Some(input.into());
408        self
409    }
410    /// <p>The Direct Connect endpoint that hosts the LAG.</p>
411    pub fn set_aws_device_v2(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
412        self.aws_device_v2 = input;
413        self
414    }
415    /// <p>The Direct Connect endpoint that hosts the LAG.</p>
416    pub fn get_aws_device_v2(&self) -> &::std::option::Option<::std::string::String> {
417        &self.aws_device_v2
418    }
419    /// <p>The Direct Connect endpoint that terminates the logical connection. This device might be different than the device that terminates the physical connection.</p>
420    pub fn aws_logical_device_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
421        self.aws_logical_device_id = ::std::option::Option::Some(input.into());
422        self
423    }
424    /// <p>The Direct Connect endpoint that terminates the logical connection. This device might be different than the device that terminates the physical connection.</p>
425    pub fn set_aws_logical_device_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
426        self.aws_logical_device_id = input;
427        self
428    }
429    /// <p>The Direct Connect endpoint that terminates the logical connection. This device might be different than the device that terminates the physical connection.</p>
430    pub fn get_aws_logical_device_id(&self) -> &::std::option::Option<::std::string::String> {
431        &self.aws_logical_device_id
432    }
433    /// Appends an item to `connections`.
434    ///
435    /// To override the contents of this collection use [`set_connections`](Self::set_connections).
436    ///
437    /// <p>The connections bundled by the LAG.</p>
438    pub fn connections(mut self, input: crate::types::Connection) -> Self {
439        let mut v = self.connections.unwrap_or_default();
440        v.push(input);
441        self.connections = ::std::option::Option::Some(v);
442        self
443    }
444    /// <p>The connections bundled by the LAG.</p>
445    pub fn set_connections(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Connection>>) -> Self {
446        self.connections = input;
447        self
448    }
449    /// <p>The connections bundled by the LAG.</p>
450    pub fn get_connections(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Connection>> {
451        &self.connections
452    }
453    /// <p>Indicates whether the LAG can host other connections.</p>
454    pub fn allows_hosted_connections(mut self, input: bool) -> Self {
455        self.allows_hosted_connections = ::std::option::Option::Some(input);
456        self
457    }
458    /// <p>Indicates whether the LAG can host other connections.</p>
459    pub fn set_allows_hosted_connections(mut self, input: ::std::option::Option<bool>) -> Self {
460        self.allows_hosted_connections = input;
461        self
462    }
463    /// <p>Indicates whether the LAG can host other connections.</p>
464    pub fn get_allows_hosted_connections(&self) -> &::std::option::Option<bool> {
465        &self.allows_hosted_connections
466    }
467    /// <p>Indicates whether jumbo frames are supported.</p>
468    pub fn jumbo_frame_capable(mut self, input: bool) -> Self {
469        self.jumbo_frame_capable = ::std::option::Option::Some(input);
470        self
471    }
472    /// <p>Indicates whether jumbo frames are supported.</p>
473    pub fn set_jumbo_frame_capable(mut self, input: ::std::option::Option<bool>) -> Self {
474        self.jumbo_frame_capable = input;
475        self
476    }
477    /// <p>Indicates whether jumbo frames are supported.</p>
478    pub fn get_jumbo_frame_capable(&self) -> &::std::option::Option<bool> {
479        &self.jumbo_frame_capable
480    }
481    /// <p>Indicates whether the LAG supports a secondary BGP peer in the same address family (IPv4/IPv6).</p>
482    pub fn has_logical_redundancy(mut self, input: crate::types::HasLogicalRedundancy) -> Self {
483        self.has_logical_redundancy = ::std::option::Option::Some(input);
484        self
485    }
486    /// <p>Indicates whether the LAG supports a secondary BGP peer in the same address family (IPv4/IPv6).</p>
487    pub fn set_has_logical_redundancy(mut self, input: ::std::option::Option<crate::types::HasLogicalRedundancy>) -> Self {
488        self.has_logical_redundancy = input;
489        self
490    }
491    /// <p>Indicates whether the LAG supports a secondary BGP peer in the same address family (IPv4/IPv6).</p>
492    pub fn get_has_logical_redundancy(&self) -> &::std::option::Option<crate::types::HasLogicalRedundancy> {
493        &self.has_logical_redundancy
494    }
495    /// Appends an item to `tags`.
496    ///
497    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
498    ///
499    /// <p>The tags associated with the LAG.</p>
500    pub fn tags(mut self, input: crate::types::Tag) -> Self {
501        let mut v = self.tags.unwrap_or_default();
502        v.push(input);
503        self.tags = ::std::option::Option::Some(v);
504        self
505    }
506    /// <p>The tags associated with the LAG.</p>
507    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
508        self.tags = input;
509        self
510    }
511    /// <p>The tags associated with the LAG.</p>
512    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
513        &self.tags
514    }
515    /// <p>The name of the service provider associated with the LAG.</p>
516    pub fn provider_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
517        self.provider_name = ::std::option::Option::Some(input.into());
518        self
519    }
520    /// <p>The name of the service provider associated with the LAG.</p>
521    pub fn set_provider_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
522        self.provider_name = input;
523        self
524    }
525    /// <p>The name of the service provider associated with the LAG.</p>
526    pub fn get_provider_name(&self) -> &::std::option::Option<::std::string::String> {
527        &self.provider_name
528    }
529    /// <p>Indicates whether the LAG supports MAC Security (MACsec).</p>
530    pub fn mac_sec_capable(mut self, input: bool) -> Self {
531        self.mac_sec_capable = ::std::option::Option::Some(input);
532        self
533    }
534    /// <p>Indicates whether the LAG supports MAC Security (MACsec).</p>
535    pub fn set_mac_sec_capable(mut self, input: ::std::option::Option<bool>) -> Self {
536        self.mac_sec_capable = input;
537        self
538    }
539    /// <p>Indicates whether the LAG supports MAC Security (MACsec).</p>
540    pub fn get_mac_sec_capable(&self) -> &::std::option::Option<bool> {
541        &self.mac_sec_capable
542    }
543    /// <p>The LAG MAC Security (MACsec) encryption mode.</p>
544    /// <p>The valid values are <code>no_encrypt</code>, <code>should_encrypt</code>, and <code>must_encrypt</code>.</p>
545    pub fn encryption_mode(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
546        self.encryption_mode = ::std::option::Option::Some(input.into());
547        self
548    }
549    /// <p>The LAG MAC Security (MACsec) encryption mode.</p>
550    /// <p>The valid values are <code>no_encrypt</code>, <code>should_encrypt</code>, and <code>must_encrypt</code>.</p>
551    pub fn set_encryption_mode(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
552        self.encryption_mode = input;
553        self
554    }
555    /// <p>The LAG MAC Security (MACsec) encryption mode.</p>
556    /// <p>The valid values are <code>no_encrypt</code>, <code>should_encrypt</code>, and <code>must_encrypt</code>.</p>
557    pub fn get_encryption_mode(&self) -> &::std::option::Option<::std::string::String> {
558        &self.encryption_mode
559    }
560    /// Appends an item to `mac_sec_keys`.
561    ///
562    /// To override the contents of this collection use [`set_mac_sec_keys`](Self::set_mac_sec_keys).
563    ///
564    /// <p>The MAC Security (MACsec) security keys associated with the LAG.</p>
565    pub fn mac_sec_keys(mut self, input: crate::types::MacSecKey) -> Self {
566        let mut v = self.mac_sec_keys.unwrap_or_default();
567        v.push(input);
568        self.mac_sec_keys = ::std::option::Option::Some(v);
569        self
570    }
571    /// <p>The MAC Security (MACsec) security keys associated with the LAG.</p>
572    pub fn set_mac_sec_keys(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::MacSecKey>>) -> Self {
573        self.mac_sec_keys = input;
574        self
575    }
576    /// <p>The MAC Security (MACsec) security keys associated with the LAG.</p>
577    pub fn get_mac_sec_keys(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::MacSecKey>> {
578        &self.mac_sec_keys
579    }
580    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
581        self._request_id = Some(request_id.into());
582        self
583    }
584
585    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
586        self._request_id = request_id;
587        self
588    }
589    /// Consumes the builder and constructs a [`CreateLagOutput`](crate::operation::create_lag::CreateLagOutput).
590    pub fn build(self) -> crate::operation::create_lag::CreateLagOutput {
591        crate::operation::create_lag::CreateLagOutput {
592            connections_bandwidth: self.connections_bandwidth,
593            number_of_connections: self.number_of_connections.unwrap_or_default(),
594            lag_id: self.lag_id,
595            owner_account: self.owner_account,
596            lag_name: self.lag_name,
597            lag_state: self.lag_state,
598            location: self.location,
599            region: self.region,
600            minimum_links: self.minimum_links.unwrap_or_default(),
601            aws_device: self.aws_device,
602            aws_device_v2: self.aws_device_v2,
603            aws_logical_device_id: self.aws_logical_device_id,
604            connections: self.connections,
605            allows_hosted_connections: self.allows_hosted_connections.unwrap_or_default(),
606            jumbo_frame_capable: self.jumbo_frame_capable,
607            has_logical_redundancy: self.has_logical_redundancy,
608            tags: self.tags,
609            provider_name: self.provider_name,
610            mac_sec_capable: self.mac_sec_capable,
611            encryption_mode: self.encryption_mode,
612            mac_sec_keys: self.mac_sec_keys,
613            _request_id: self._request_id,
614        }
615    }
616}