aws_sdk_apigatewaymanagement/operation/get_connection/
_get_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 GetConnectionOutput {
6    /// <p>The time in ISO 8601 format for when the connection was established.</p>
7    pub connected_at: ::std::option::Option<::aws_smithy_types::DateTime>,
8    #[allow(missing_docs)] // documentation missing in model
9    pub identity: ::std::option::Option<crate::types::Identity>,
10    /// <p>The time in ISO 8601 format for when the connection was last active.</p>
11    pub last_active_at: ::std::option::Option<::aws_smithy_types::DateTime>,
12    _request_id: Option<String>,
13}
14impl GetConnectionOutput {
15    /// <p>The time in ISO 8601 format for when the connection was established.</p>
16    pub fn connected_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
17        self.connected_at.as_ref()
18    }
19    #[allow(missing_docs)] // documentation missing in model
20    pub fn identity(&self) -> ::std::option::Option<&crate::types::Identity> {
21        self.identity.as_ref()
22    }
23    /// <p>The time in ISO 8601 format for when the connection was last active.</p>
24    pub fn last_active_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
25        self.last_active_at.as_ref()
26    }
27}
28impl ::aws_types::request_id::RequestId for GetConnectionOutput {
29    fn request_id(&self) -> Option<&str> {
30        self._request_id.as_deref()
31    }
32}
33impl GetConnectionOutput {
34    /// Creates a new builder-style object to manufacture [`GetConnectionOutput`](crate::operation::get_connection::GetConnectionOutput).
35    pub fn builder() -> crate::operation::get_connection::builders::GetConnectionOutputBuilder {
36        crate::operation::get_connection::builders::GetConnectionOutputBuilder::default()
37    }
38}
39
40/// A builder for [`GetConnectionOutput`](crate::operation::get_connection::GetConnectionOutput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct GetConnectionOutputBuilder {
44    pub(crate) connected_at: ::std::option::Option<::aws_smithy_types::DateTime>,
45    pub(crate) identity: ::std::option::Option<crate::types::Identity>,
46    pub(crate) last_active_at: ::std::option::Option<::aws_smithy_types::DateTime>,
47    _request_id: Option<String>,
48}
49impl GetConnectionOutputBuilder {
50    /// <p>The time in ISO 8601 format for when the connection was established.</p>
51    pub fn connected_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
52        self.connected_at = ::std::option::Option::Some(input);
53        self
54    }
55    /// <p>The time in ISO 8601 format for when the connection was established.</p>
56    pub fn set_connected_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
57        self.connected_at = input;
58        self
59    }
60    /// <p>The time in ISO 8601 format for when the connection was established.</p>
61    pub fn get_connected_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
62        &self.connected_at
63    }
64    #[allow(missing_docs)] // documentation missing in model
65    pub fn identity(mut self, input: crate::types::Identity) -> Self {
66        self.identity = ::std::option::Option::Some(input);
67        self
68    }
69    #[allow(missing_docs)] // documentation missing in model
70    pub fn set_identity(mut self, input: ::std::option::Option<crate::types::Identity>) -> Self {
71        self.identity = input;
72        self
73    }
74    #[allow(missing_docs)] // documentation missing in model
75    pub fn get_identity(&self) -> &::std::option::Option<crate::types::Identity> {
76        &self.identity
77    }
78    /// <p>The time in ISO 8601 format for when the connection was last active.</p>
79    pub fn last_active_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
80        self.last_active_at = ::std::option::Option::Some(input);
81        self
82    }
83    /// <p>The time in ISO 8601 format for when the connection was last active.</p>
84    pub fn set_last_active_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
85        self.last_active_at = input;
86        self
87    }
88    /// <p>The time in ISO 8601 format for when the connection was last active.</p>
89    pub fn get_last_active_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
90        &self.last_active_at
91    }
92    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
93        self._request_id = Some(request_id.into());
94        self
95    }
96
97    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
98        self._request_id = request_id;
99        self
100    }
101    /// Consumes the builder and constructs a [`GetConnectionOutput`](crate::operation::get_connection::GetConnectionOutput).
102    pub fn build(self) -> crate::operation::get_connection::GetConnectionOutput {
103        crate::operation::get_connection::GetConnectionOutput {
104            connected_at: self.connected_at,
105            identity: self.identity,
106            last_active_at: self.last_active_at,
107            _request_id: self._request_id,
108        }
109    }
110}