aws_sdk_directconnect/operation/create_lag/
_create_lag_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 CreateLagInput {
6    /// <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 1Gbps or 10Gbps, or two when the port speed is 100Gbps or 400Gbps.</p>
7    pub number_of_connections: ::std::option::Option<i32>,
8    /// <p>The location for the LAG.</p>
9    pub location: ::std::option::Option<::std::string::String>,
10    /// <p>The bandwidth of the individual physical dedicated connections bundled by the LAG. The possible values are 1Gbps,10Gbps, 100Gbps, and 400Gbps.</p>
11    pub connections_bandwidth: ::std::option::Option<::std::string::String>,
12    /// <p>The name of the LAG.</p>
13    pub lag_name: ::std::option::Option<::std::string::String>,
14    /// <p>The ID of an existing dedicated connection to migrate to the LAG.</p>
15    pub connection_id: ::std::option::Option<::std::string::String>,
16    /// <p>The tags to associate with the LAG.</p>
17    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
18    /// <p>The tags to associate with the automtically created LAGs.</p>
19    pub child_connection_tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
20    /// <p>The name of the service provider associated with the LAG.</p>
21    pub provider_name: ::std::option::Option<::std::string::String>,
22    /// <p>Indicates whether the connection will support MAC Security (MACsec).</p><note>
23    /// <p>All connections in the LAG must be capable of supporting MAC Security (MACsec). For information about MAC Security (MACsec) prerequisties, see <a href="https://docs.aws.amazon.com/directconnect/latest/UserGuide/direct-connect-mac-sec-getting-started.html#mac-sec-prerequisites">MACsec prerequisties</a> in the <i>Direct Connect User Guide</i>.</p>
24    /// </note>
25    pub request_mac_sec: ::std::option::Option<bool>,
26}
27impl CreateLagInput {
28    /// <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 1Gbps or 10Gbps, or two when the port speed is 100Gbps or 400Gbps.</p>
29    pub fn number_of_connections(&self) -> ::std::option::Option<i32> {
30        self.number_of_connections
31    }
32    /// <p>The location for the LAG.</p>
33    pub fn location(&self) -> ::std::option::Option<&str> {
34        self.location.as_deref()
35    }
36    /// <p>The bandwidth of the individual physical dedicated connections bundled by the LAG. The possible values are 1Gbps,10Gbps, 100Gbps, and 400Gbps.</p>
37    pub fn connections_bandwidth(&self) -> ::std::option::Option<&str> {
38        self.connections_bandwidth.as_deref()
39    }
40    /// <p>The name of the LAG.</p>
41    pub fn lag_name(&self) -> ::std::option::Option<&str> {
42        self.lag_name.as_deref()
43    }
44    /// <p>The ID of an existing dedicated connection to migrate to the LAG.</p>
45    pub fn connection_id(&self) -> ::std::option::Option<&str> {
46        self.connection_id.as_deref()
47    }
48    /// <p>The tags to associate with the LAG.</p>
49    ///
50    /// 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()`.
51    pub fn tags(&self) -> &[crate::types::Tag] {
52        self.tags.as_deref().unwrap_or_default()
53    }
54    /// <p>The tags to associate with the automtically created LAGs.</p>
55    ///
56    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.child_connection_tags.is_none()`.
57    pub fn child_connection_tags(&self) -> &[crate::types::Tag] {
58        self.child_connection_tags.as_deref().unwrap_or_default()
59    }
60    /// <p>The name of the service provider associated with the LAG.</p>
61    pub fn provider_name(&self) -> ::std::option::Option<&str> {
62        self.provider_name.as_deref()
63    }
64    /// <p>Indicates whether the connection will support MAC Security (MACsec).</p><note>
65    /// <p>All connections in the LAG must be capable of supporting MAC Security (MACsec). For information about MAC Security (MACsec) prerequisties, see <a href="https://docs.aws.amazon.com/directconnect/latest/UserGuide/direct-connect-mac-sec-getting-started.html#mac-sec-prerequisites">MACsec prerequisties</a> in the <i>Direct Connect User Guide</i>.</p>
66    /// </note>
67    pub fn request_mac_sec(&self) -> ::std::option::Option<bool> {
68        self.request_mac_sec
69    }
70}
71impl CreateLagInput {
72    /// Creates a new builder-style object to manufacture [`CreateLagInput`](crate::operation::create_lag::CreateLagInput).
73    pub fn builder() -> crate::operation::create_lag::builders::CreateLagInputBuilder {
74        crate::operation::create_lag::builders::CreateLagInputBuilder::default()
75    }
76}
77
78/// A builder for [`CreateLagInput`](crate::operation::create_lag::CreateLagInput).
79#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
80#[non_exhaustive]
81pub struct CreateLagInputBuilder {
82    pub(crate) number_of_connections: ::std::option::Option<i32>,
83    pub(crate) location: ::std::option::Option<::std::string::String>,
84    pub(crate) connections_bandwidth: ::std::option::Option<::std::string::String>,
85    pub(crate) lag_name: ::std::option::Option<::std::string::String>,
86    pub(crate) connection_id: ::std::option::Option<::std::string::String>,
87    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
88    pub(crate) child_connection_tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
89    pub(crate) provider_name: ::std::option::Option<::std::string::String>,
90    pub(crate) request_mac_sec: ::std::option::Option<bool>,
91}
92impl CreateLagInputBuilder {
93    /// <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 1Gbps or 10Gbps, or two when the port speed is 100Gbps or 400Gbps.</p>
94    /// This field is required.
95    pub fn number_of_connections(mut self, input: i32) -> Self {
96        self.number_of_connections = ::std::option::Option::Some(input);
97        self
98    }
99    /// <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 1Gbps or 10Gbps, or two when the port speed is 100Gbps or 400Gbps.</p>
100    pub fn set_number_of_connections(mut self, input: ::std::option::Option<i32>) -> Self {
101        self.number_of_connections = input;
102        self
103    }
104    /// <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 1Gbps or 10Gbps, or two when the port speed is 100Gbps or 400Gbps.</p>
105    pub fn get_number_of_connections(&self) -> &::std::option::Option<i32> {
106        &self.number_of_connections
107    }
108    /// <p>The location for the LAG.</p>
109    /// This field is required.
110    pub fn location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
111        self.location = ::std::option::Option::Some(input.into());
112        self
113    }
114    /// <p>The location for the LAG.</p>
115    pub fn set_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
116        self.location = input;
117        self
118    }
119    /// <p>The location for the LAG.</p>
120    pub fn get_location(&self) -> &::std::option::Option<::std::string::String> {
121        &self.location
122    }
123    /// <p>The bandwidth of the individual physical dedicated connections bundled by the LAG. The possible values are 1Gbps,10Gbps, 100Gbps, and 400Gbps.</p>
124    /// This field is required.
125    pub fn connections_bandwidth(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
126        self.connections_bandwidth = ::std::option::Option::Some(input.into());
127        self
128    }
129    /// <p>The bandwidth of the individual physical dedicated connections bundled by the LAG. The possible values are 1Gbps,10Gbps, 100Gbps, and 400Gbps.</p>
130    pub fn set_connections_bandwidth(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
131        self.connections_bandwidth = input;
132        self
133    }
134    /// <p>The bandwidth of the individual physical dedicated connections bundled by the LAG. The possible values are 1Gbps,10Gbps, 100Gbps, and 400Gbps.</p>
135    pub fn get_connections_bandwidth(&self) -> &::std::option::Option<::std::string::String> {
136        &self.connections_bandwidth
137    }
138    /// <p>The name of the LAG.</p>
139    /// This field is required.
140    pub fn lag_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141        self.lag_name = ::std::option::Option::Some(input.into());
142        self
143    }
144    /// <p>The name of the LAG.</p>
145    pub fn set_lag_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146        self.lag_name = input;
147        self
148    }
149    /// <p>The name of the LAG.</p>
150    pub fn get_lag_name(&self) -> &::std::option::Option<::std::string::String> {
151        &self.lag_name
152    }
153    /// <p>The ID of an existing dedicated connection to migrate to the LAG.</p>
154    pub fn connection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
155        self.connection_id = ::std::option::Option::Some(input.into());
156        self
157    }
158    /// <p>The ID of an existing dedicated connection to migrate to the LAG.</p>
159    pub fn set_connection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
160        self.connection_id = input;
161        self
162    }
163    /// <p>The ID of an existing dedicated connection to migrate to the LAG.</p>
164    pub fn get_connection_id(&self) -> &::std::option::Option<::std::string::String> {
165        &self.connection_id
166    }
167    /// Appends an item to `tags`.
168    ///
169    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
170    ///
171    /// <p>The tags to associate with the LAG.</p>
172    pub fn tags(mut self, input: crate::types::Tag) -> Self {
173        let mut v = self.tags.unwrap_or_default();
174        v.push(input);
175        self.tags = ::std::option::Option::Some(v);
176        self
177    }
178    /// <p>The tags to associate with the LAG.</p>
179    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
180        self.tags = input;
181        self
182    }
183    /// <p>The tags to associate with the LAG.</p>
184    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
185        &self.tags
186    }
187    /// Appends an item to `child_connection_tags`.
188    ///
189    /// To override the contents of this collection use [`set_child_connection_tags`](Self::set_child_connection_tags).
190    ///
191    /// <p>The tags to associate with the automtically created LAGs.</p>
192    pub fn child_connection_tags(mut self, input: crate::types::Tag) -> Self {
193        let mut v = self.child_connection_tags.unwrap_or_default();
194        v.push(input);
195        self.child_connection_tags = ::std::option::Option::Some(v);
196        self
197    }
198    /// <p>The tags to associate with the automtically created LAGs.</p>
199    pub fn set_child_connection_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
200        self.child_connection_tags = input;
201        self
202    }
203    /// <p>The tags to associate with the automtically created LAGs.</p>
204    pub fn get_child_connection_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
205        &self.child_connection_tags
206    }
207    /// <p>The name of the service provider associated with the LAG.</p>
208    pub fn provider_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
209        self.provider_name = ::std::option::Option::Some(input.into());
210        self
211    }
212    /// <p>The name of the service provider associated with the LAG.</p>
213    pub fn set_provider_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
214        self.provider_name = input;
215        self
216    }
217    /// <p>The name of the service provider associated with the LAG.</p>
218    pub fn get_provider_name(&self) -> &::std::option::Option<::std::string::String> {
219        &self.provider_name
220    }
221    /// <p>Indicates whether the connection will support MAC Security (MACsec).</p><note>
222    /// <p>All connections in the LAG must be capable of supporting MAC Security (MACsec). For information about MAC Security (MACsec) prerequisties, see <a href="https://docs.aws.amazon.com/directconnect/latest/UserGuide/direct-connect-mac-sec-getting-started.html#mac-sec-prerequisites">MACsec prerequisties</a> in the <i>Direct Connect User Guide</i>.</p>
223    /// </note>
224    pub fn request_mac_sec(mut self, input: bool) -> Self {
225        self.request_mac_sec = ::std::option::Option::Some(input);
226        self
227    }
228    /// <p>Indicates whether the connection will support MAC Security (MACsec).</p><note>
229    /// <p>All connections in the LAG must be capable of supporting MAC Security (MACsec). For information about MAC Security (MACsec) prerequisties, see <a href="https://docs.aws.amazon.com/directconnect/latest/UserGuide/direct-connect-mac-sec-getting-started.html#mac-sec-prerequisites">MACsec prerequisties</a> in the <i>Direct Connect User Guide</i>.</p>
230    /// </note>
231    pub fn set_request_mac_sec(mut self, input: ::std::option::Option<bool>) -> Self {
232        self.request_mac_sec = input;
233        self
234    }
235    /// <p>Indicates whether the connection will support MAC Security (MACsec).</p><note>
236    /// <p>All connections in the LAG must be capable of supporting MAC Security (MACsec). For information about MAC Security (MACsec) prerequisties, see <a href="https://docs.aws.amazon.com/directconnect/latest/UserGuide/direct-connect-mac-sec-getting-started.html#mac-sec-prerequisites">MACsec prerequisties</a> in the <i>Direct Connect User Guide</i>.</p>
237    /// </note>
238    pub fn get_request_mac_sec(&self) -> &::std::option::Option<bool> {
239        &self.request_mac_sec
240    }
241    /// Consumes the builder and constructs a [`CreateLagInput`](crate::operation::create_lag::CreateLagInput).
242    pub fn build(self) -> ::std::result::Result<crate::operation::create_lag::CreateLagInput, ::aws_smithy_types::error::operation::BuildError> {
243        ::std::result::Result::Ok(crate::operation::create_lag::CreateLagInput {
244            number_of_connections: self.number_of_connections,
245            location: self.location,
246            connections_bandwidth: self.connections_bandwidth,
247            lag_name: self.lag_name,
248            connection_id: self.connection_id,
249            tags: self.tags,
250            child_connection_tags: self.child_connection_tags,
251            provider_name: self.provider_name,
252            request_mac_sec: self.request_mac_sec,
253        })
254    }
255}