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