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    _request_id: Option<String>,
54}
55impl CreateInterconnectOutput {
56    /// <p>The ID of the interconnect.</p>
57    pub fn interconnect_id(&self) -> ::std::option::Option<&str> {
58        self.interconnect_id.as_deref()
59    }
60    /// <p>The name of the interconnect.</p>
61    pub fn interconnect_name(&self) -> ::std::option::Option<&str> {
62        self.interconnect_name.as_deref()
63    }
64    /// <p>The state of the interconnect. The following are the possible values:</p>
65    /// <ul>
66    /// <li>
67    /// <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>
68    /// <li>
69    /// <p><code>pending</code>: The interconnect is approved, and is being initialized.</p></li>
70    /// <li>
71    /// <p><code>available</code>: The network link is up, and the interconnect is ready for use.</p></li>
72    /// <li>
73    /// <p><code>down</code>: The network link is down.</p></li>
74    /// <li>
75    /// <p><code>deleting</code>: The interconnect is being deleted.</p></li>
76    /// <li>
77    /// <p><code>deleted</code>: The interconnect is deleted.</p></li>
78    /// <li>
79    /// <p><code>unknown</code>: The state of the interconnect is not available.</p></li>
80    /// </ul>
81    pub fn interconnect_state(&self) -> ::std::option::Option<&crate::types::InterconnectState> {
82        self.interconnect_state.as_ref()
83    }
84    /// <p>The Amazon Web Services Region where the connection is located.</p>
85    pub fn region(&self) -> ::std::option::Option<&str> {
86        self.region.as_deref()
87    }
88    /// <p>The location of the connection.</p>
89    pub fn location(&self) -> ::std::option::Option<&str> {
90        self.location.as_deref()
91    }
92    /// <p>The bandwidth of the connection.</p>
93    pub fn bandwidth(&self) -> ::std::option::Option<&str> {
94        self.bandwidth.as_deref()
95    }
96    /// <p>The time of the most recent call to <code>DescribeLoa</code> for this connection.</p>
97    pub fn loa_issue_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
98        self.loa_issue_time.as_ref()
99    }
100    /// <p>The ID of the LAG.</p>
101    pub fn lag_id(&self) -> ::std::option::Option<&str> {
102        self.lag_id.as_deref()
103    }
104    /// <p>The Direct Connect endpoint on which the physical connection terminates.</p>
105    pub fn aws_device(&self) -> ::std::option::Option<&str> {
106        self.aws_device.as_deref()
107    }
108    /// <p>Indicates whether jumbo frames are supported.</p>
109    pub fn jumbo_frame_capable(&self) -> ::std::option::Option<bool> {
110        self.jumbo_frame_capable
111    }
112    /// <p>The Direct Connect endpoint that terminates the physical connection.</p>
113    pub fn aws_device_v2(&self) -> ::std::option::Option<&str> {
114        self.aws_device_v2.as_deref()
115    }
116    /// <p>The Direct Connect endpoint that terminates the logical connection. This device might be different than the device that terminates the physical connection.</p>
117    pub fn aws_logical_device_id(&self) -> ::std::option::Option<&str> {
118        self.aws_logical_device_id.as_deref()
119    }
120    /// <p>Indicates whether the interconnect supports a secondary BGP in the same address family (IPv4/IPv6).</p>
121    pub fn has_logical_redundancy(&self) -> ::std::option::Option<&crate::types::HasLogicalRedundancy> {
122        self.has_logical_redundancy.as_ref()
123    }
124    /// <p>The tags associated with the interconnect.</p>
125    ///
126    /// 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()`.
127    pub fn tags(&self) -> &[crate::types::Tag] {
128        self.tags.as_deref().unwrap_or_default()
129    }
130    /// <p>The name of the service provider associated with the interconnect.</p>
131    pub fn provider_name(&self) -> ::std::option::Option<&str> {
132        self.provider_name.as_deref()
133    }
134}
135impl ::aws_types::request_id::RequestId for CreateInterconnectOutput {
136    fn request_id(&self) -> Option<&str> {
137        self._request_id.as_deref()
138    }
139}
140impl CreateInterconnectOutput {
141    /// Creates a new builder-style object to manufacture [`CreateInterconnectOutput`](crate::operation::create_interconnect::CreateInterconnectOutput).
142    pub fn builder() -> crate::operation::create_interconnect::builders::CreateInterconnectOutputBuilder {
143        crate::operation::create_interconnect::builders::CreateInterconnectOutputBuilder::default()
144    }
145}
146
147/// A builder for [`CreateInterconnectOutput`](crate::operation::create_interconnect::CreateInterconnectOutput).
148#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
149#[non_exhaustive]
150pub struct CreateInterconnectOutputBuilder {
151    pub(crate) interconnect_id: ::std::option::Option<::std::string::String>,
152    pub(crate) interconnect_name: ::std::option::Option<::std::string::String>,
153    pub(crate) interconnect_state: ::std::option::Option<crate::types::InterconnectState>,
154    pub(crate) region: ::std::option::Option<::std::string::String>,
155    pub(crate) location: ::std::option::Option<::std::string::String>,
156    pub(crate) bandwidth: ::std::option::Option<::std::string::String>,
157    pub(crate) loa_issue_time: ::std::option::Option<::aws_smithy_types::DateTime>,
158    pub(crate) lag_id: ::std::option::Option<::std::string::String>,
159    pub(crate) aws_device: ::std::option::Option<::std::string::String>,
160    pub(crate) jumbo_frame_capable: ::std::option::Option<bool>,
161    pub(crate) aws_device_v2: ::std::option::Option<::std::string::String>,
162    pub(crate) aws_logical_device_id: ::std::option::Option<::std::string::String>,
163    pub(crate) has_logical_redundancy: ::std::option::Option<crate::types::HasLogicalRedundancy>,
164    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
165    pub(crate) provider_name: ::std::option::Option<::std::string::String>,
166    _request_id: Option<String>,
167}
168impl CreateInterconnectOutputBuilder {
169    /// <p>The ID of the interconnect.</p>
170    pub fn interconnect_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
171        self.interconnect_id = ::std::option::Option::Some(input.into());
172        self
173    }
174    /// <p>The ID of the interconnect.</p>
175    pub fn set_interconnect_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
176        self.interconnect_id = input;
177        self
178    }
179    /// <p>The ID of the interconnect.</p>
180    pub fn get_interconnect_id(&self) -> &::std::option::Option<::std::string::String> {
181        &self.interconnect_id
182    }
183    /// <p>The name of the interconnect.</p>
184    pub fn interconnect_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
185        self.interconnect_name = ::std::option::Option::Some(input.into());
186        self
187    }
188    /// <p>The name of the interconnect.</p>
189    pub fn set_interconnect_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
190        self.interconnect_name = input;
191        self
192    }
193    /// <p>The name of the interconnect.</p>
194    pub fn get_interconnect_name(&self) -> &::std::option::Option<::std::string::String> {
195        &self.interconnect_name
196    }
197    /// <p>The state of the interconnect. The following are the possible values:</p>
198    /// <ul>
199    /// <li>
200    /// <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>
201    /// <li>
202    /// <p><code>pending</code>: The interconnect is approved, and is being initialized.</p></li>
203    /// <li>
204    /// <p><code>available</code>: The network link is up, and the interconnect is ready for use.</p></li>
205    /// <li>
206    /// <p><code>down</code>: The network link is down.</p></li>
207    /// <li>
208    /// <p><code>deleting</code>: The interconnect is being deleted.</p></li>
209    /// <li>
210    /// <p><code>deleted</code>: The interconnect is deleted.</p></li>
211    /// <li>
212    /// <p><code>unknown</code>: The state of the interconnect is not available.</p></li>
213    /// </ul>
214    pub fn interconnect_state(mut self, input: crate::types::InterconnectState) -> Self {
215        self.interconnect_state = ::std::option::Option::Some(input);
216        self
217    }
218    /// <p>The state of the interconnect. The following are the possible values:</p>
219    /// <ul>
220    /// <li>
221    /// <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>
222    /// <li>
223    /// <p><code>pending</code>: The interconnect is approved, and is being initialized.</p></li>
224    /// <li>
225    /// <p><code>available</code>: The network link is up, and the interconnect is ready for use.</p></li>
226    /// <li>
227    /// <p><code>down</code>: The network link is down.</p></li>
228    /// <li>
229    /// <p><code>deleting</code>: The interconnect is being deleted.</p></li>
230    /// <li>
231    /// <p><code>deleted</code>: The interconnect is deleted.</p></li>
232    /// <li>
233    /// <p><code>unknown</code>: The state of the interconnect is not available.</p></li>
234    /// </ul>
235    pub fn set_interconnect_state(mut self, input: ::std::option::Option<crate::types::InterconnectState>) -> Self {
236        self.interconnect_state = input;
237        self
238    }
239    /// <p>The state of the interconnect. The following are the possible values:</p>
240    /// <ul>
241    /// <li>
242    /// <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>
243    /// <li>
244    /// <p><code>pending</code>: The interconnect is approved, and is being initialized.</p></li>
245    /// <li>
246    /// <p><code>available</code>: The network link is up, and the interconnect is ready for use.</p></li>
247    /// <li>
248    /// <p><code>down</code>: The network link is down.</p></li>
249    /// <li>
250    /// <p><code>deleting</code>: The interconnect is being deleted.</p></li>
251    /// <li>
252    /// <p><code>deleted</code>: The interconnect is deleted.</p></li>
253    /// <li>
254    /// <p><code>unknown</code>: The state of the interconnect is not available.</p></li>
255    /// </ul>
256    pub fn get_interconnect_state(&self) -> &::std::option::Option<crate::types::InterconnectState> {
257        &self.interconnect_state
258    }
259    /// <p>The Amazon Web Services Region where the connection is located.</p>
260    pub fn region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
261        self.region = ::std::option::Option::Some(input.into());
262        self
263    }
264    /// <p>The Amazon Web Services Region where the connection is located.</p>
265    pub fn set_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
266        self.region = input;
267        self
268    }
269    /// <p>The Amazon Web Services Region where the connection is located.</p>
270    pub fn get_region(&self) -> &::std::option::Option<::std::string::String> {
271        &self.region
272    }
273    /// <p>The location of the connection.</p>
274    pub fn location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
275        self.location = ::std::option::Option::Some(input.into());
276        self
277    }
278    /// <p>The location of the connection.</p>
279    pub fn set_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
280        self.location = input;
281        self
282    }
283    /// <p>The location of the connection.</p>
284    pub fn get_location(&self) -> &::std::option::Option<::std::string::String> {
285        &self.location
286    }
287    /// <p>The bandwidth of the connection.</p>
288    pub fn bandwidth(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
289        self.bandwidth = ::std::option::Option::Some(input.into());
290        self
291    }
292    /// <p>The bandwidth of the connection.</p>
293    pub fn set_bandwidth(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
294        self.bandwidth = input;
295        self
296    }
297    /// <p>The bandwidth of the connection.</p>
298    pub fn get_bandwidth(&self) -> &::std::option::Option<::std::string::String> {
299        &self.bandwidth
300    }
301    /// <p>The time of the most recent call to <code>DescribeLoa</code> for this connection.</p>
302    pub fn loa_issue_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
303        self.loa_issue_time = ::std::option::Option::Some(input);
304        self
305    }
306    /// <p>The time of the most recent call to <code>DescribeLoa</code> for this connection.</p>
307    pub fn set_loa_issue_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
308        self.loa_issue_time = input;
309        self
310    }
311    /// <p>The time of the most recent call to <code>DescribeLoa</code> for this connection.</p>
312    pub fn get_loa_issue_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
313        &self.loa_issue_time
314    }
315    /// <p>The ID of the LAG.</p>
316    pub fn lag_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
317        self.lag_id = ::std::option::Option::Some(input.into());
318        self
319    }
320    /// <p>The ID of the LAG.</p>
321    pub fn set_lag_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
322        self.lag_id = input;
323        self
324    }
325    /// <p>The ID of the LAG.</p>
326    pub fn get_lag_id(&self) -> &::std::option::Option<::std::string::String> {
327        &self.lag_id
328    }
329    /// <p>The Direct Connect endpoint on which the physical connection terminates.</p>
330    pub fn aws_device(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
331        self.aws_device = ::std::option::Option::Some(input.into());
332        self
333    }
334    /// <p>The Direct Connect endpoint on which the physical connection terminates.</p>
335    pub fn set_aws_device(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
336        self.aws_device = input;
337        self
338    }
339    /// <p>The Direct Connect endpoint on which the physical connection terminates.</p>
340    pub fn get_aws_device(&self) -> &::std::option::Option<::std::string::String> {
341        &self.aws_device
342    }
343    /// <p>Indicates whether jumbo frames are supported.</p>
344    pub fn jumbo_frame_capable(mut self, input: bool) -> Self {
345        self.jumbo_frame_capable = ::std::option::Option::Some(input);
346        self
347    }
348    /// <p>Indicates whether jumbo frames are supported.</p>
349    pub fn set_jumbo_frame_capable(mut self, input: ::std::option::Option<bool>) -> Self {
350        self.jumbo_frame_capable = input;
351        self
352    }
353    /// <p>Indicates whether jumbo frames are supported.</p>
354    pub fn get_jumbo_frame_capable(&self) -> &::std::option::Option<bool> {
355        &self.jumbo_frame_capable
356    }
357    /// <p>The Direct Connect endpoint that terminates the physical connection.</p>
358    pub fn aws_device_v2(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
359        self.aws_device_v2 = ::std::option::Option::Some(input.into());
360        self
361    }
362    /// <p>The Direct Connect endpoint that terminates the physical connection.</p>
363    pub fn set_aws_device_v2(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
364        self.aws_device_v2 = input;
365        self
366    }
367    /// <p>The Direct Connect endpoint that terminates the physical connection.</p>
368    pub fn get_aws_device_v2(&self) -> &::std::option::Option<::std::string::String> {
369        &self.aws_device_v2
370    }
371    /// <p>The Direct Connect endpoint that terminates the logical connection. This device might be different than the device that terminates the physical connection.</p>
372    pub fn aws_logical_device_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
373        self.aws_logical_device_id = ::std::option::Option::Some(input.into());
374        self
375    }
376    /// <p>The Direct Connect endpoint that terminates the logical connection. This device might be different than the device that terminates the physical connection.</p>
377    pub fn set_aws_logical_device_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
378        self.aws_logical_device_id = input;
379        self
380    }
381    /// <p>The Direct Connect endpoint that terminates the logical connection. This device might be different than the device that terminates the physical connection.</p>
382    pub fn get_aws_logical_device_id(&self) -> &::std::option::Option<::std::string::String> {
383        &self.aws_logical_device_id
384    }
385    /// <p>Indicates whether the interconnect supports a secondary BGP in the same address family (IPv4/IPv6).</p>
386    pub fn has_logical_redundancy(mut self, input: crate::types::HasLogicalRedundancy) -> Self {
387        self.has_logical_redundancy = ::std::option::Option::Some(input);
388        self
389    }
390    /// <p>Indicates whether the interconnect supports a secondary BGP in the same address family (IPv4/IPv6).</p>
391    pub fn set_has_logical_redundancy(mut self, input: ::std::option::Option<crate::types::HasLogicalRedundancy>) -> Self {
392        self.has_logical_redundancy = input;
393        self
394    }
395    /// <p>Indicates whether the interconnect supports a secondary BGP in the same address family (IPv4/IPv6).</p>
396    pub fn get_has_logical_redundancy(&self) -> &::std::option::Option<crate::types::HasLogicalRedundancy> {
397        &self.has_logical_redundancy
398    }
399    /// Appends an item to `tags`.
400    ///
401    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
402    ///
403    /// <p>The tags associated with the interconnect.</p>
404    pub fn tags(mut self, input: crate::types::Tag) -> Self {
405        let mut v = self.tags.unwrap_or_default();
406        v.push(input);
407        self.tags = ::std::option::Option::Some(v);
408        self
409    }
410    /// <p>The tags associated with the interconnect.</p>
411    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
412        self.tags = input;
413        self
414    }
415    /// <p>The tags associated with the interconnect.</p>
416    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
417        &self.tags
418    }
419    /// <p>The name of the service provider associated with the interconnect.</p>
420    pub fn provider_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
421        self.provider_name = ::std::option::Option::Some(input.into());
422        self
423    }
424    /// <p>The name of the service provider associated with the interconnect.</p>
425    pub fn set_provider_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
426        self.provider_name = input;
427        self
428    }
429    /// <p>The name of the service provider associated with the interconnect.</p>
430    pub fn get_provider_name(&self) -> &::std::option::Option<::std::string::String> {
431        &self.provider_name
432    }
433    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
434        self._request_id = Some(request_id.into());
435        self
436    }
437
438    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
439        self._request_id = request_id;
440        self
441    }
442    /// Consumes the builder and constructs a [`CreateInterconnectOutput`](crate::operation::create_interconnect::CreateInterconnectOutput).
443    pub fn build(self) -> crate::operation::create_interconnect::CreateInterconnectOutput {
444        crate::operation::create_interconnect::CreateInterconnectOutput {
445            interconnect_id: self.interconnect_id,
446            interconnect_name: self.interconnect_name,
447            interconnect_state: self.interconnect_state,
448            region: self.region,
449            location: self.location,
450            bandwidth: self.bandwidth,
451            loa_issue_time: self.loa_issue_time,
452            lag_id: self.lag_id,
453            aws_device: self.aws_device,
454            jumbo_frame_capable: self.jumbo_frame_capable,
455            aws_device_v2: self.aws_device_v2,
456            aws_logical_device_id: self.aws_logical_device_id,
457            has_logical_redundancy: self.has_logical_redundancy,
458            tags: self.tags,
459            provider_name: self.provider_name,
460            _request_id: self._request_id,
461        }
462    }
463}