aws_sdk_eventbridge/operation/describe_connection/
_describe_connection_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeConnectionOutput {
6 pub connection_arn: ::std::option::Option<::std::string::String>,
8 pub name: ::std::option::Option<::std::string::String>,
10 pub description: ::std::option::Option<::std::string::String>,
12 pub invocation_connectivity_parameters: ::std::option::Option<crate::types::DescribeConnectionConnectivityParameters>,
15 pub connection_state: ::std::option::Option<crate::types::ConnectionState>,
17 pub state_reason: ::std::option::Option<::std::string::String>,
19 pub authorization_type: ::std::option::Option<crate::types::ConnectionAuthorizationType>,
21 pub secret_arn: ::std::option::Option<::std::string::String>,
23 pub kms_key_identifier: ::std::option::Option<::std::string::String>,
26 pub auth_parameters: ::std::option::Option<crate::types::ConnectionAuthResponseParameters>,
28 pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
30 pub last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
32 pub last_authorized_time: ::std::option::Option<::aws_smithy_types::DateTime>,
34 _request_id: Option<String>,
35}
36impl DescribeConnectionOutput {
37 pub fn connection_arn(&self) -> ::std::option::Option<&str> {
39 self.connection_arn.as_deref()
40 }
41 pub fn name(&self) -> ::std::option::Option<&str> {
43 self.name.as_deref()
44 }
45 pub fn description(&self) -> ::std::option::Option<&str> {
47 self.description.as_deref()
48 }
49 pub fn invocation_connectivity_parameters(&self) -> ::std::option::Option<&crate::types::DescribeConnectionConnectivityParameters> {
52 self.invocation_connectivity_parameters.as_ref()
53 }
54 pub fn connection_state(&self) -> ::std::option::Option<&crate::types::ConnectionState> {
56 self.connection_state.as_ref()
57 }
58 pub fn state_reason(&self) -> ::std::option::Option<&str> {
60 self.state_reason.as_deref()
61 }
62 pub fn authorization_type(&self) -> ::std::option::Option<&crate::types::ConnectionAuthorizationType> {
64 self.authorization_type.as_ref()
65 }
66 pub fn secret_arn(&self) -> ::std::option::Option<&str> {
68 self.secret_arn.as_deref()
69 }
70 pub fn kms_key_identifier(&self) -> ::std::option::Option<&str> {
73 self.kms_key_identifier.as_deref()
74 }
75 pub fn auth_parameters(&self) -> ::std::option::Option<&crate::types::ConnectionAuthResponseParameters> {
77 self.auth_parameters.as_ref()
78 }
79 pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
81 self.creation_time.as_ref()
82 }
83 pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
85 self.last_modified_time.as_ref()
86 }
87 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 pub fn builder() -> crate::operation::describe_connection::builders::DescribeConnectionOutputBuilder {
100 crate::operation::describe_connection::builders::DescribeConnectionOutputBuilder::default()
101 }
102}
103
104#[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 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 pub fn set_connection_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
131 self.connection_arn = input;
132 self
133 }
134 pub fn get_connection_arn(&self) -> &::std::option::Option<::std::string::String> {
136 &self.connection_arn
137 }
138 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 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
145 self.name = input;
146 self
147 }
148 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
150 &self.name
151 }
152 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 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
159 self.description = input;
160 self
161 }
162 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
164 &self.description
165 }
166 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 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 pub fn get_invocation_connectivity_parameters(&self) -> &::std::option::Option<crate::types::DescribeConnectionConnectivityParameters> {
184 &self.invocation_connectivity_parameters
185 }
186 pub fn connection_state(mut self, input: crate::types::ConnectionState) -> Self {
188 self.connection_state = ::std::option::Option::Some(input);
189 self
190 }
191 pub fn set_connection_state(mut self, input: ::std::option::Option<crate::types::ConnectionState>) -> Self {
193 self.connection_state = input;
194 self
195 }
196 pub fn get_connection_state(&self) -> &::std::option::Option<crate::types::ConnectionState> {
198 &self.connection_state
199 }
200 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 pub fn set_state_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
207 self.state_reason = input;
208 self
209 }
210 pub fn get_state_reason(&self) -> &::std::option::Option<::std::string::String> {
212 &self.state_reason
213 }
214 pub fn authorization_type(mut self, input: crate::types::ConnectionAuthorizationType) -> Self {
216 self.authorization_type = ::std::option::Option::Some(input);
217 self
218 }
219 pub fn set_authorization_type(mut self, input: ::std::option::Option<crate::types::ConnectionAuthorizationType>) -> Self {
221 self.authorization_type = input;
222 self
223 }
224 pub fn get_authorization_type(&self) -> &::std::option::Option<crate::types::ConnectionAuthorizationType> {
226 &self.authorization_type
227 }
228 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 pub fn set_secret_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
235 self.secret_arn = input;
236 self
237 }
238 pub fn get_secret_arn(&self) -> &::std::option::Option<::std::string::String> {
240 &self.secret_arn
241 }
242 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 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 pub fn get_kms_key_identifier(&self) -> &::std::option::Option<::std::string::String> {
257 &self.kms_key_identifier
258 }
259 pub fn auth_parameters(mut self, input: crate::types::ConnectionAuthResponseParameters) -> Self {
261 self.auth_parameters = ::std::option::Option::Some(input);
262 self
263 }
264 pub fn set_auth_parameters(mut self, input: ::std::option::Option<crate::types::ConnectionAuthResponseParameters>) -> Self {
266 self.auth_parameters = input;
267 self
268 }
269 pub fn get_auth_parameters(&self) -> &::std::option::Option<crate::types::ConnectionAuthResponseParameters> {
271 &self.auth_parameters
272 }
273 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 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 pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
285 &self.creation_time
286 }
287 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 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 pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
299 &self.last_modified_time
300 }
301 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 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 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 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}