aws_sdk_eventbridge/operation/describe_connection/
_describe_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 DescribeConnectionOutput {
6    /// <p>The ARN of the connection retrieved.</p>
7    pub connection_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the connection retrieved.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>The description for the connection retrieved.</p>
11    pub description: ::std::option::Option<::std::string::String>,
12    /// <p>For connections to private APIs The parameters EventBridge uses to invoke the resource endpoint.</p>
13    /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/connection-private.html">Connecting to private APIs</a> in the <i> <i>Amazon EventBridge User Guide</i> </i>.</p>
14    pub invocation_connectivity_parameters: ::std::option::Option<crate::types::DescribeConnectionConnectivityParameters>,
15    /// <p>The state of the connection retrieved.</p>
16    pub connection_state: ::std::option::Option<crate::types::ConnectionState>,
17    /// <p>The reason that the connection is in the current connection state.</p>
18    pub state_reason: ::std::option::Option<::std::string::String>,
19    /// <p>The type of authorization specified for the connection.</p>
20    pub authorization_type: ::std::option::Option<crate::types::ConnectionAuthorizationType>,
21    /// <p>The ARN of the secret created from the authorization parameters specified for the connection.</p>
22    pub secret_arn: ::std::option::Option<::std::string::String>,
23    /// <p>The identifier of the KMS customer managed key for EventBridge to use to encrypt the connection, if one has been specified.</p>
24    /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/encryption-connections.html">Encrypting connections</a> in the <i>Amazon EventBridge User Guide</i>.</p>
25    pub kms_key_identifier: ::std::option::Option<::std::string::String>,
26    /// <p>The parameters to use for authorization for the connection.</p>
27    pub auth_parameters: ::std::option::Option<crate::types::ConnectionAuthResponseParameters>,
28    /// <p>A time stamp for the time that the connection was created.</p>
29    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
30    /// <p>A time stamp for the time that the connection was last modified.</p>
31    pub last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
32    /// <p>A time stamp for the time that the connection was last authorized.</p>
33    pub last_authorized_time: ::std::option::Option<::aws_smithy_types::DateTime>,
34    _request_id: Option<String>,
35}
36impl DescribeConnectionOutput {
37    /// <p>The ARN of the connection retrieved.</p>
38    pub fn connection_arn(&self) -> ::std::option::Option<&str> {
39        self.connection_arn.as_deref()
40    }
41    /// <p>The name of the connection retrieved.</p>
42    pub fn name(&self) -> ::std::option::Option<&str> {
43        self.name.as_deref()
44    }
45    /// <p>The description for the connection retrieved.</p>
46    pub fn description(&self) -> ::std::option::Option<&str> {
47        self.description.as_deref()
48    }
49    /// <p>For connections to private APIs The parameters EventBridge uses to invoke the resource endpoint.</p>
50    /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/connection-private.html">Connecting to private APIs</a> in the <i> <i>Amazon EventBridge User Guide</i> </i>.</p>
51    pub fn invocation_connectivity_parameters(&self) -> ::std::option::Option<&crate::types::DescribeConnectionConnectivityParameters> {
52        self.invocation_connectivity_parameters.as_ref()
53    }
54    /// <p>The state of the connection retrieved.</p>
55    pub fn connection_state(&self) -> ::std::option::Option<&crate::types::ConnectionState> {
56        self.connection_state.as_ref()
57    }
58    /// <p>The reason that the connection is in the current connection state.</p>
59    pub fn state_reason(&self) -> ::std::option::Option<&str> {
60        self.state_reason.as_deref()
61    }
62    /// <p>The type of authorization specified for the connection.</p>
63    pub fn authorization_type(&self) -> ::std::option::Option<&crate::types::ConnectionAuthorizationType> {
64        self.authorization_type.as_ref()
65    }
66    /// <p>The ARN of the secret created from the authorization parameters specified for the connection.</p>
67    pub fn secret_arn(&self) -> ::std::option::Option<&str> {
68        self.secret_arn.as_deref()
69    }
70    /// <p>The identifier of the KMS customer managed key for EventBridge to use to encrypt the connection, if one has been specified.</p>
71    /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/encryption-connections.html">Encrypting connections</a> in the <i>Amazon EventBridge User Guide</i>.</p>
72    pub fn kms_key_identifier(&self) -> ::std::option::Option<&str> {
73        self.kms_key_identifier.as_deref()
74    }
75    /// <p>The parameters to use for authorization for the connection.</p>
76    pub fn auth_parameters(&self) -> ::std::option::Option<&crate::types::ConnectionAuthResponseParameters> {
77        self.auth_parameters.as_ref()
78    }
79    /// <p>A time stamp for the time that the connection was created.</p>
80    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
81        self.creation_time.as_ref()
82    }
83    /// <p>A time stamp for the time that the connection was last modified.</p>
84    pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
85        self.last_modified_time.as_ref()
86    }
87    /// <p>A time stamp for the time that the connection was last authorized.</p>
88    pub fn last_authorized_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
89        self.last_authorized_time.as_ref()
90    }
91}
92impl ::aws_types::request_id::RequestId for DescribeConnectionOutput {
93    fn request_id(&self) -> Option<&str> {
94        self._request_id.as_deref()
95    }
96}
97impl DescribeConnectionOutput {
98    /// Creates a new builder-style object to manufacture [`DescribeConnectionOutput`](crate::operation::describe_connection::DescribeConnectionOutput).
99    pub fn builder() -> crate::operation::describe_connection::builders::DescribeConnectionOutputBuilder {
100        crate::operation::describe_connection::builders::DescribeConnectionOutputBuilder::default()
101    }
102}
103
104/// A builder for [`DescribeConnectionOutput`](crate::operation::describe_connection::DescribeConnectionOutput).
105#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
106#[non_exhaustive]
107pub struct DescribeConnectionOutputBuilder {
108    pub(crate) connection_arn: ::std::option::Option<::std::string::String>,
109    pub(crate) name: ::std::option::Option<::std::string::String>,
110    pub(crate) description: ::std::option::Option<::std::string::String>,
111    pub(crate) invocation_connectivity_parameters: ::std::option::Option<crate::types::DescribeConnectionConnectivityParameters>,
112    pub(crate) connection_state: ::std::option::Option<crate::types::ConnectionState>,
113    pub(crate) state_reason: ::std::option::Option<::std::string::String>,
114    pub(crate) authorization_type: ::std::option::Option<crate::types::ConnectionAuthorizationType>,
115    pub(crate) secret_arn: ::std::option::Option<::std::string::String>,
116    pub(crate) kms_key_identifier: ::std::option::Option<::std::string::String>,
117    pub(crate) auth_parameters: ::std::option::Option<crate::types::ConnectionAuthResponseParameters>,
118    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
119    pub(crate) last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
120    pub(crate) last_authorized_time: ::std::option::Option<::aws_smithy_types::DateTime>,
121    _request_id: Option<String>,
122}
123impl DescribeConnectionOutputBuilder {
124    /// <p>The ARN of the connection retrieved.</p>
125    pub fn connection_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
126        self.connection_arn = ::std::option::Option::Some(input.into());
127        self
128    }
129    /// <p>The ARN of the connection retrieved.</p>
130    pub fn set_connection_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
131        self.connection_arn = input;
132        self
133    }
134    /// <p>The ARN of the connection retrieved.</p>
135    pub fn get_connection_arn(&self) -> &::std::option::Option<::std::string::String> {
136        &self.connection_arn
137    }
138    /// <p>The name of the connection retrieved.</p>
139    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
140        self.name = ::std::option::Option::Some(input.into());
141        self
142    }
143    /// <p>The name of the connection retrieved.</p>
144    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
145        self.name = input;
146        self
147    }
148    /// <p>The name of the connection retrieved.</p>
149    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
150        &self.name
151    }
152    /// <p>The description for the connection retrieved.</p>
153    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
154        self.description = ::std::option::Option::Some(input.into());
155        self
156    }
157    /// <p>The description for the connection retrieved.</p>
158    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
159        self.description = input;
160        self
161    }
162    /// <p>The description for the connection retrieved.</p>
163    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
164        &self.description
165    }
166    /// <p>For connections to private APIs The parameters EventBridge uses to invoke the resource endpoint.</p>
167    /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/connection-private.html">Connecting to private APIs</a> in the <i> <i>Amazon EventBridge User Guide</i> </i>.</p>
168    pub fn invocation_connectivity_parameters(mut self, input: crate::types::DescribeConnectionConnectivityParameters) -> Self {
169        self.invocation_connectivity_parameters = ::std::option::Option::Some(input);
170        self
171    }
172    /// <p>For connections to private APIs The parameters EventBridge uses to invoke the resource endpoint.</p>
173    /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/connection-private.html">Connecting to private APIs</a> in the <i> <i>Amazon EventBridge User Guide</i> </i>.</p>
174    pub fn set_invocation_connectivity_parameters(
175        mut self,
176        input: ::std::option::Option<crate::types::DescribeConnectionConnectivityParameters>,
177    ) -> Self {
178        self.invocation_connectivity_parameters = input;
179        self
180    }
181    /// <p>For connections to private APIs The parameters EventBridge uses to invoke the resource endpoint.</p>
182    /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/connection-private.html">Connecting to private APIs</a> in the <i> <i>Amazon EventBridge User Guide</i> </i>.</p>
183    pub fn get_invocation_connectivity_parameters(&self) -> &::std::option::Option<crate::types::DescribeConnectionConnectivityParameters> {
184        &self.invocation_connectivity_parameters
185    }
186    /// <p>The state of the connection retrieved.</p>
187    pub fn connection_state(mut self, input: crate::types::ConnectionState) -> Self {
188        self.connection_state = ::std::option::Option::Some(input);
189        self
190    }
191    /// <p>The state of the connection retrieved.</p>
192    pub fn set_connection_state(mut self, input: ::std::option::Option<crate::types::ConnectionState>) -> Self {
193        self.connection_state = input;
194        self
195    }
196    /// <p>The state of the connection retrieved.</p>
197    pub fn get_connection_state(&self) -> &::std::option::Option<crate::types::ConnectionState> {
198        &self.connection_state
199    }
200    /// <p>The reason that the connection is in the current connection state.</p>
201    pub fn state_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
202        self.state_reason = ::std::option::Option::Some(input.into());
203        self
204    }
205    /// <p>The reason that the connection is in the current connection state.</p>
206    pub fn set_state_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
207        self.state_reason = input;
208        self
209    }
210    /// <p>The reason that the connection is in the current connection state.</p>
211    pub fn get_state_reason(&self) -> &::std::option::Option<::std::string::String> {
212        &self.state_reason
213    }
214    /// <p>The type of authorization specified for the connection.</p>
215    pub fn authorization_type(mut self, input: crate::types::ConnectionAuthorizationType) -> Self {
216        self.authorization_type = ::std::option::Option::Some(input);
217        self
218    }
219    /// <p>The type of authorization specified for the connection.</p>
220    pub fn set_authorization_type(mut self, input: ::std::option::Option<crate::types::ConnectionAuthorizationType>) -> Self {
221        self.authorization_type = input;
222        self
223    }
224    /// <p>The type of authorization specified for the connection.</p>
225    pub fn get_authorization_type(&self) -> &::std::option::Option<crate::types::ConnectionAuthorizationType> {
226        &self.authorization_type
227    }
228    /// <p>The ARN of the secret created from the authorization parameters specified for the connection.</p>
229    pub fn secret_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
230        self.secret_arn = ::std::option::Option::Some(input.into());
231        self
232    }
233    /// <p>The ARN of the secret created from the authorization parameters specified for the connection.</p>
234    pub fn set_secret_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
235        self.secret_arn = input;
236        self
237    }
238    /// <p>The ARN of the secret created from the authorization parameters specified for the connection.</p>
239    pub fn get_secret_arn(&self) -> &::std::option::Option<::std::string::String> {
240        &self.secret_arn
241    }
242    /// <p>The identifier of the KMS customer managed key for EventBridge to use to encrypt the connection, if one has been specified.</p>
243    /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/encryption-connections.html">Encrypting connections</a> in the <i>Amazon EventBridge User Guide</i>.</p>
244    pub fn kms_key_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
245        self.kms_key_identifier = ::std::option::Option::Some(input.into());
246        self
247    }
248    /// <p>The identifier of the KMS customer managed key for EventBridge to use to encrypt the connection, if one has been specified.</p>
249    /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/encryption-connections.html">Encrypting connections</a> in the <i>Amazon EventBridge User Guide</i>.</p>
250    pub fn set_kms_key_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
251        self.kms_key_identifier = input;
252        self
253    }
254    /// <p>The identifier of the KMS customer managed key for EventBridge to use to encrypt the connection, if one has been specified.</p>
255    /// <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/encryption-connections.html">Encrypting connections</a> in the <i>Amazon EventBridge User Guide</i>.</p>
256    pub fn get_kms_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
257        &self.kms_key_identifier
258    }
259    /// <p>The parameters to use for authorization for the connection.</p>
260    pub fn auth_parameters(mut self, input: crate::types::ConnectionAuthResponseParameters) -> Self {
261        self.auth_parameters = ::std::option::Option::Some(input);
262        self
263    }
264    /// <p>The parameters to use for authorization for the connection.</p>
265    pub fn set_auth_parameters(mut self, input: ::std::option::Option<crate::types::ConnectionAuthResponseParameters>) -> Self {
266        self.auth_parameters = input;
267        self
268    }
269    /// <p>The parameters to use for authorization for the connection.</p>
270    pub fn get_auth_parameters(&self) -> &::std::option::Option<crate::types::ConnectionAuthResponseParameters> {
271        &self.auth_parameters
272    }
273    /// <p>A time stamp for the time that the connection was created.</p>
274    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
275        self.creation_time = ::std::option::Option::Some(input);
276        self
277    }
278    /// <p>A time stamp for the time that the connection was created.</p>
279    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
280        self.creation_time = input;
281        self
282    }
283    /// <p>A time stamp for the time that the connection was created.</p>
284    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
285        &self.creation_time
286    }
287    /// <p>A time stamp for the time that the connection was last modified.</p>
288    pub fn last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
289        self.last_modified_time = ::std::option::Option::Some(input);
290        self
291    }
292    /// <p>A time stamp for the time that the connection was last modified.</p>
293    pub fn set_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
294        self.last_modified_time = input;
295        self
296    }
297    /// <p>A time stamp for the time that the connection was last modified.</p>
298    pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
299        &self.last_modified_time
300    }
301    /// <p>A time stamp for the time that the connection was last authorized.</p>
302    pub fn last_authorized_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
303        self.last_authorized_time = ::std::option::Option::Some(input);
304        self
305    }
306    /// <p>A time stamp for the time that the connection was last authorized.</p>
307    pub fn set_last_authorized_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
308        self.last_authorized_time = input;
309        self
310    }
311    /// <p>A time stamp for the time that the connection was last authorized.</p>
312    pub fn get_last_authorized_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
313        &self.last_authorized_time
314    }
315    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
316        self._request_id = Some(request_id.into());
317        self
318    }
319
320    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
321        self._request_id = request_id;
322        self
323    }
324    /// Consumes the builder and constructs a [`DescribeConnectionOutput`](crate::operation::describe_connection::DescribeConnectionOutput).
325    pub fn build(self) -> crate::operation::describe_connection::DescribeConnectionOutput {
326        crate::operation::describe_connection::DescribeConnectionOutput {
327            connection_arn: self.connection_arn,
328            name: self.name,
329            description: self.description,
330            invocation_connectivity_parameters: self.invocation_connectivity_parameters,
331            connection_state: self.connection_state,
332            state_reason: self.state_reason,
333            authorization_type: self.authorization_type,
334            secret_arn: self.secret_arn,
335            kms_key_identifier: self.kms_key_identifier,
336            auth_parameters: self.auth_parameters,
337            creation_time: self.creation_time,
338            last_modified_time: self.last_modified_time,
339            last_authorized_time: self.last_authorized_time,
340            _request_id: self._request_id,
341        }
342    }
343}