aws_sdk_eventbridge/operation/delete_connection/
_delete_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 DeleteConnectionOutput {
6    /// <p>The ARN of the connection that was deleted.</p>
7    pub connection_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The state of the connection before it was deleted.</p>
9    pub connection_state: ::std::option::Option<crate::types::ConnectionState>,
10    /// <p>A time stamp for the time that the connection was created.</p>
11    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
12    /// <p>A time stamp for the time that the connection was last modified before it was deleted.</p>
13    pub last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
14    /// <p>A time stamp for the time that the connection was last authorized before it wa deleted.</p>
15    pub last_authorized_time: ::std::option::Option<::aws_smithy_types::DateTime>,
16    _request_id: Option<String>,
17}
18impl DeleteConnectionOutput {
19    /// <p>The ARN of the connection that was deleted.</p>
20    pub fn connection_arn(&self) -> ::std::option::Option<&str> {
21        self.connection_arn.as_deref()
22    }
23    /// <p>The state of the connection before it was deleted.</p>
24    pub fn connection_state(&self) -> ::std::option::Option<&crate::types::ConnectionState> {
25        self.connection_state.as_ref()
26    }
27    /// <p>A time stamp for the time that the connection was created.</p>
28    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
29        self.creation_time.as_ref()
30    }
31    /// <p>A time stamp for the time that the connection was last modified before it was deleted.</p>
32    pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
33        self.last_modified_time.as_ref()
34    }
35    /// <p>A time stamp for the time that the connection was last authorized before it wa deleted.</p>
36    pub fn last_authorized_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
37        self.last_authorized_time.as_ref()
38    }
39}
40impl ::aws_types::request_id::RequestId for DeleteConnectionOutput {
41    fn request_id(&self) -> Option<&str> {
42        self._request_id.as_deref()
43    }
44}
45impl DeleteConnectionOutput {
46    /// Creates a new builder-style object to manufacture [`DeleteConnectionOutput`](crate::operation::delete_connection::DeleteConnectionOutput).
47    pub fn builder() -> crate::operation::delete_connection::builders::DeleteConnectionOutputBuilder {
48        crate::operation::delete_connection::builders::DeleteConnectionOutputBuilder::default()
49    }
50}
51
52/// A builder for [`DeleteConnectionOutput`](crate::operation::delete_connection::DeleteConnectionOutput).
53#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct DeleteConnectionOutputBuilder {
56    pub(crate) connection_arn: ::std::option::Option<::std::string::String>,
57    pub(crate) connection_state: ::std::option::Option<crate::types::ConnectionState>,
58    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
59    pub(crate) last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
60    pub(crate) last_authorized_time: ::std::option::Option<::aws_smithy_types::DateTime>,
61    _request_id: Option<String>,
62}
63impl DeleteConnectionOutputBuilder {
64    /// <p>The ARN of the connection that was deleted.</p>
65    pub fn connection_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66        self.connection_arn = ::std::option::Option::Some(input.into());
67        self
68    }
69    /// <p>The ARN of the connection that was deleted.</p>
70    pub fn set_connection_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71        self.connection_arn = input;
72        self
73    }
74    /// <p>The ARN of the connection that was deleted.</p>
75    pub fn get_connection_arn(&self) -> &::std::option::Option<::std::string::String> {
76        &self.connection_arn
77    }
78    /// <p>The state of the connection before it was deleted.</p>
79    pub fn connection_state(mut self, input: crate::types::ConnectionState) -> Self {
80        self.connection_state = ::std::option::Option::Some(input);
81        self
82    }
83    /// <p>The state of the connection before it was deleted.</p>
84    pub fn set_connection_state(mut self, input: ::std::option::Option<crate::types::ConnectionState>) -> Self {
85        self.connection_state = input;
86        self
87    }
88    /// <p>The state of the connection before it was deleted.</p>
89    pub fn get_connection_state(&self) -> &::std::option::Option<crate::types::ConnectionState> {
90        &self.connection_state
91    }
92    /// <p>A time stamp for the time that the connection was created.</p>
93    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
94        self.creation_time = ::std::option::Option::Some(input);
95        self
96    }
97    /// <p>A time stamp for the time that the connection was created.</p>
98    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
99        self.creation_time = input;
100        self
101    }
102    /// <p>A time stamp for the time that the connection was created.</p>
103    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
104        &self.creation_time
105    }
106    /// <p>A time stamp for the time that the connection was last modified before it was deleted.</p>
107    pub fn last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
108        self.last_modified_time = ::std::option::Option::Some(input);
109        self
110    }
111    /// <p>A time stamp for the time that the connection was last modified before it was deleted.</p>
112    pub fn set_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
113        self.last_modified_time = input;
114        self
115    }
116    /// <p>A time stamp for the time that the connection was last modified before it was deleted.</p>
117    pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
118        &self.last_modified_time
119    }
120    /// <p>A time stamp for the time that the connection was last authorized before it wa deleted.</p>
121    pub fn last_authorized_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
122        self.last_authorized_time = ::std::option::Option::Some(input);
123        self
124    }
125    /// <p>A time stamp for the time that the connection was last authorized before it wa deleted.</p>
126    pub fn set_last_authorized_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
127        self.last_authorized_time = input;
128        self
129    }
130    /// <p>A time stamp for the time that the connection was last authorized before it wa deleted.</p>
131    pub fn get_last_authorized_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
132        &self.last_authorized_time
133    }
134    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
135        self._request_id = Some(request_id.into());
136        self
137    }
138
139    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
140        self._request_id = request_id;
141        self
142    }
143    /// Consumes the builder and constructs a [`DeleteConnectionOutput`](crate::operation::delete_connection::DeleteConnectionOutput).
144    pub fn build(self) -> crate::operation::delete_connection::DeleteConnectionOutput {
145        crate::operation::delete_connection::DeleteConnectionOutput {
146            connection_arn: self.connection_arn,
147            connection_state: self.connection_state,
148            creation_time: self.creation_time,
149            last_modified_time: self.last_modified_time,
150            last_authorized_time: self.last_authorized_time,
151            _request_id: self._request_id,
152        }
153    }
154}