aws_sdk_directconnect/operation/confirm_connection/
_confirm_connection_output.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 ConfirmConnectionOutput {
6    /// <p>The state of the connection. The following are the possible values:</p>
7    /// <ul>
8    /// <li>
9    /// <p><code>ordering</code>: The initial state of a hosted connection provisioned on an interconnect. The connection stays in the ordering state until the owner of the hosted connection confirms or declines the connection order.</p></li>
10    /// <li>
11    /// <p><code>requested</code>: The initial state of a standard connection. The connection stays in the requested state until the Letter of Authorization (LOA) is sent to the customer.</p></li>
12    /// <li>
13    /// <p><code>pending</code>: The connection has been approved and is being initialized.</p></li>
14    /// <li>
15    /// <p><code>available</code>: The network link is up and the connection is ready for use.</p></li>
16    /// <li>
17    /// <p><code>down</code>: The network link is down.</p></li>
18    /// <li>
19    /// <p><code>deleting</code>: The connection is being deleted.</p></li>
20    /// <li>
21    /// <p><code>deleted</code>: The connection has been deleted.</p></li>
22    /// <li>
23    /// <p><code>rejected</code>: A hosted connection in the <code>ordering</code> state enters the <code>rejected</code> state if it is deleted by the customer.</p></li>
24    /// <li>
25    /// <p><code>unknown</code>: The state of the connection is not available.</p></li>
26    /// </ul>
27    pub connection_state: ::std::option::Option<crate::types::ConnectionState>,
28    _request_id: Option<String>,
29}
30impl ConfirmConnectionOutput {
31    /// <p>The state of the connection. The following are the possible values:</p>
32    /// <ul>
33    /// <li>
34    /// <p><code>ordering</code>: The initial state of a hosted connection provisioned on an interconnect. The connection stays in the ordering state until the owner of the hosted connection confirms or declines the connection order.</p></li>
35    /// <li>
36    /// <p><code>requested</code>: The initial state of a standard connection. The connection stays in the requested state until the Letter of Authorization (LOA) is sent to the customer.</p></li>
37    /// <li>
38    /// <p><code>pending</code>: The connection has been approved and is being initialized.</p></li>
39    /// <li>
40    /// <p><code>available</code>: The network link is up and the connection is ready for use.</p></li>
41    /// <li>
42    /// <p><code>down</code>: The network link is down.</p></li>
43    /// <li>
44    /// <p><code>deleting</code>: The connection is being deleted.</p></li>
45    /// <li>
46    /// <p><code>deleted</code>: The connection has been deleted.</p></li>
47    /// <li>
48    /// <p><code>rejected</code>: A hosted connection in the <code>ordering</code> state enters the <code>rejected</code> state if it is deleted by the customer.</p></li>
49    /// <li>
50    /// <p><code>unknown</code>: The state of the connection is not available.</p></li>
51    /// </ul>
52    pub fn connection_state(&self) -> ::std::option::Option<&crate::types::ConnectionState> {
53        self.connection_state.as_ref()
54    }
55}
56impl ::aws_types::request_id::RequestId for ConfirmConnectionOutput {
57    fn request_id(&self) -> Option<&str> {
58        self._request_id.as_deref()
59    }
60}
61impl ConfirmConnectionOutput {
62    /// Creates a new builder-style object to manufacture [`ConfirmConnectionOutput`](crate::operation::confirm_connection::ConfirmConnectionOutput).
63    pub fn builder() -> crate::operation::confirm_connection::builders::ConfirmConnectionOutputBuilder {
64        crate::operation::confirm_connection::builders::ConfirmConnectionOutputBuilder::default()
65    }
66}
67
68/// A builder for [`ConfirmConnectionOutput`](crate::operation::confirm_connection::ConfirmConnectionOutput).
69#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
70#[non_exhaustive]
71pub struct ConfirmConnectionOutputBuilder {
72    pub(crate) connection_state: ::std::option::Option<crate::types::ConnectionState>,
73    _request_id: Option<String>,
74}
75impl ConfirmConnectionOutputBuilder {
76    /// <p>The state of the connection. The following are the possible values:</p>
77    /// <ul>
78    /// <li>
79    /// <p><code>ordering</code>: The initial state of a hosted connection provisioned on an interconnect. The connection stays in the ordering state until the owner of the hosted connection confirms or declines the connection order.</p></li>
80    /// <li>
81    /// <p><code>requested</code>: The initial state of a standard connection. The connection stays in the requested state until the Letter of Authorization (LOA) is sent to the customer.</p></li>
82    /// <li>
83    /// <p><code>pending</code>: The connection has been approved and is being initialized.</p></li>
84    /// <li>
85    /// <p><code>available</code>: The network link is up and the connection is ready for use.</p></li>
86    /// <li>
87    /// <p><code>down</code>: The network link is down.</p></li>
88    /// <li>
89    /// <p><code>deleting</code>: The connection is being deleted.</p></li>
90    /// <li>
91    /// <p><code>deleted</code>: The connection has been deleted.</p></li>
92    /// <li>
93    /// <p><code>rejected</code>: A hosted connection in the <code>ordering</code> state enters the <code>rejected</code> state if it is deleted by the customer.</p></li>
94    /// <li>
95    /// <p><code>unknown</code>: The state of the connection is not available.</p></li>
96    /// </ul>
97    pub fn connection_state(mut self, input: crate::types::ConnectionState) -> Self {
98        self.connection_state = ::std::option::Option::Some(input);
99        self
100    }
101    /// <p>The state of the connection. The following are the possible values:</p>
102    /// <ul>
103    /// <li>
104    /// <p><code>ordering</code>: The initial state of a hosted connection provisioned on an interconnect. The connection stays in the ordering state until the owner of the hosted connection confirms or declines the connection order.</p></li>
105    /// <li>
106    /// <p><code>requested</code>: The initial state of a standard connection. The connection stays in the requested state until the Letter of Authorization (LOA) is sent to the customer.</p></li>
107    /// <li>
108    /// <p><code>pending</code>: The connection has been approved and is being initialized.</p></li>
109    /// <li>
110    /// <p><code>available</code>: The network link is up and the connection is ready for use.</p></li>
111    /// <li>
112    /// <p><code>down</code>: The network link is down.</p></li>
113    /// <li>
114    /// <p><code>deleting</code>: The connection is being deleted.</p></li>
115    /// <li>
116    /// <p><code>deleted</code>: The connection has been deleted.</p></li>
117    /// <li>
118    /// <p><code>rejected</code>: A hosted connection in the <code>ordering</code> state enters the <code>rejected</code> state if it is deleted by the customer.</p></li>
119    /// <li>
120    /// <p><code>unknown</code>: The state of the connection is not available.</p></li>
121    /// </ul>
122    pub fn set_connection_state(mut self, input: ::std::option::Option<crate::types::ConnectionState>) -> Self {
123        self.connection_state = input;
124        self
125    }
126    /// <p>The state of the connection. The following are the possible values:</p>
127    /// <ul>
128    /// <li>
129    /// <p><code>ordering</code>: The initial state of a hosted connection provisioned on an interconnect. The connection stays in the ordering state until the owner of the hosted connection confirms or declines the connection order.</p></li>
130    /// <li>
131    /// <p><code>requested</code>: The initial state of a standard connection. The connection stays in the requested state until the Letter of Authorization (LOA) is sent to the customer.</p></li>
132    /// <li>
133    /// <p><code>pending</code>: The connection has been approved and is being initialized.</p></li>
134    /// <li>
135    /// <p><code>available</code>: The network link is up and the connection is ready for use.</p></li>
136    /// <li>
137    /// <p><code>down</code>: The network link is down.</p></li>
138    /// <li>
139    /// <p><code>deleting</code>: The connection is being deleted.</p></li>
140    /// <li>
141    /// <p><code>deleted</code>: The connection has been deleted.</p></li>
142    /// <li>
143    /// <p><code>rejected</code>: A hosted connection in the <code>ordering</code> state enters the <code>rejected</code> state if it is deleted by the customer.</p></li>
144    /// <li>
145    /// <p><code>unknown</code>: The state of the connection is not available.</p></li>
146    /// </ul>
147    pub fn get_connection_state(&self) -> &::std::option::Option<crate::types::ConnectionState> {
148        &self.connection_state
149    }
150    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
151        self._request_id = Some(request_id.into());
152        self
153    }
154
155    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
156        self._request_id = request_id;
157        self
158    }
159    /// Consumes the builder and constructs a [`ConfirmConnectionOutput`](crate::operation::confirm_connection::ConfirmConnectionOutput).
160    pub fn build(self) -> crate::operation::confirm_connection::ConfirmConnectionOutput {
161        crate::operation::confirm_connection::ConfirmConnectionOutput {
162            connection_state: self.connection_state,
163            _request_id: self._request_id,
164        }
165    }
166}