aws_sdk_iotsecuretunneling/operation/open_tunnel/
_open_tunnel_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)]
5pub struct OpenTunnelOutput {
6    /// <p>A unique alpha-numeric tunnel ID.</p>
7    pub tunnel_id: ::std::option::Option<::std::string::String>,
8    /// <p>The Amazon Resource Name for the tunnel.</p>
9    pub tunnel_arn: ::std::option::Option<::std::string::String>,
10    /// <p>The access token the source local proxy uses to connect to IoT Secure Tunneling.</p>
11    pub source_access_token: ::std::option::Option<::std::string::String>,
12    /// <p>The access token the destination local proxy uses to connect to IoT Secure Tunneling.</p>
13    pub destination_access_token: ::std::option::Option<::std::string::String>,
14    _request_id: Option<String>,
15}
16impl OpenTunnelOutput {
17    /// <p>A unique alpha-numeric tunnel ID.</p>
18    pub fn tunnel_id(&self) -> ::std::option::Option<&str> {
19        self.tunnel_id.as_deref()
20    }
21    /// <p>The Amazon Resource Name for the tunnel.</p>
22    pub fn tunnel_arn(&self) -> ::std::option::Option<&str> {
23        self.tunnel_arn.as_deref()
24    }
25    /// <p>The access token the source local proxy uses to connect to IoT Secure Tunneling.</p>
26    pub fn source_access_token(&self) -> ::std::option::Option<&str> {
27        self.source_access_token.as_deref()
28    }
29    /// <p>The access token the destination local proxy uses to connect to IoT Secure Tunneling.</p>
30    pub fn destination_access_token(&self) -> ::std::option::Option<&str> {
31        self.destination_access_token.as_deref()
32    }
33}
34impl ::std::fmt::Debug for OpenTunnelOutput {
35    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
36        let mut formatter = f.debug_struct("OpenTunnelOutput");
37        formatter.field("tunnel_id", &self.tunnel_id);
38        formatter.field("tunnel_arn", &self.tunnel_arn);
39        formatter.field("source_access_token", &"*** Sensitive Data Redacted ***");
40        formatter.field("destination_access_token", &"*** Sensitive Data Redacted ***");
41        formatter.field("_request_id", &self._request_id);
42        formatter.finish()
43    }
44}
45impl ::aws_types::request_id::RequestId for OpenTunnelOutput {
46    fn request_id(&self) -> Option<&str> {
47        self._request_id.as_deref()
48    }
49}
50impl OpenTunnelOutput {
51    /// Creates a new builder-style object to manufacture [`OpenTunnelOutput`](crate::operation::open_tunnel::OpenTunnelOutput).
52    pub fn builder() -> crate::operation::open_tunnel::builders::OpenTunnelOutputBuilder {
53        crate::operation::open_tunnel::builders::OpenTunnelOutputBuilder::default()
54    }
55}
56
57/// A builder for [`OpenTunnelOutput`](crate::operation::open_tunnel::OpenTunnelOutput).
58#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
59#[non_exhaustive]
60pub struct OpenTunnelOutputBuilder {
61    pub(crate) tunnel_id: ::std::option::Option<::std::string::String>,
62    pub(crate) tunnel_arn: ::std::option::Option<::std::string::String>,
63    pub(crate) source_access_token: ::std::option::Option<::std::string::String>,
64    pub(crate) destination_access_token: ::std::option::Option<::std::string::String>,
65    _request_id: Option<String>,
66}
67impl OpenTunnelOutputBuilder {
68    /// <p>A unique alpha-numeric tunnel ID.</p>
69    pub fn tunnel_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
70        self.tunnel_id = ::std::option::Option::Some(input.into());
71        self
72    }
73    /// <p>A unique alpha-numeric tunnel ID.</p>
74    pub fn set_tunnel_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
75        self.tunnel_id = input;
76        self
77    }
78    /// <p>A unique alpha-numeric tunnel ID.</p>
79    pub fn get_tunnel_id(&self) -> &::std::option::Option<::std::string::String> {
80        &self.tunnel_id
81    }
82    /// <p>The Amazon Resource Name for the tunnel.</p>
83    pub fn tunnel_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
84        self.tunnel_arn = ::std::option::Option::Some(input.into());
85        self
86    }
87    /// <p>The Amazon Resource Name for the tunnel.</p>
88    pub fn set_tunnel_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
89        self.tunnel_arn = input;
90        self
91    }
92    /// <p>The Amazon Resource Name for the tunnel.</p>
93    pub fn get_tunnel_arn(&self) -> &::std::option::Option<::std::string::String> {
94        &self.tunnel_arn
95    }
96    /// <p>The access token the source local proxy uses to connect to IoT Secure Tunneling.</p>
97    pub fn source_access_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
98        self.source_access_token = ::std::option::Option::Some(input.into());
99        self
100    }
101    /// <p>The access token the source local proxy uses to connect to IoT Secure Tunneling.</p>
102    pub fn set_source_access_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
103        self.source_access_token = input;
104        self
105    }
106    /// <p>The access token the source local proxy uses to connect to IoT Secure Tunneling.</p>
107    pub fn get_source_access_token(&self) -> &::std::option::Option<::std::string::String> {
108        &self.source_access_token
109    }
110    /// <p>The access token the destination local proxy uses to connect to IoT Secure Tunneling.</p>
111    pub fn destination_access_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
112        self.destination_access_token = ::std::option::Option::Some(input.into());
113        self
114    }
115    /// <p>The access token the destination local proxy uses to connect to IoT Secure Tunneling.</p>
116    pub fn set_destination_access_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
117        self.destination_access_token = input;
118        self
119    }
120    /// <p>The access token the destination local proxy uses to connect to IoT Secure Tunneling.</p>
121    pub fn get_destination_access_token(&self) -> &::std::option::Option<::std::string::String> {
122        &self.destination_access_token
123    }
124    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
125        self._request_id = Some(request_id.into());
126        self
127    }
128
129    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
130        self._request_id = request_id;
131        self
132    }
133    /// Consumes the builder and constructs a [`OpenTunnelOutput`](crate::operation::open_tunnel::OpenTunnelOutput).
134    pub fn build(self) -> crate::operation::open_tunnel::OpenTunnelOutput {
135        crate::operation::open_tunnel::OpenTunnelOutput {
136            tunnel_id: self.tunnel_id,
137            tunnel_arn: self.tunnel_arn,
138            source_access_token: self.source_access_token,
139            destination_access_token: self.destination_access_token,
140            _request_id: self._request_id,
141        }
142    }
143}
144impl ::std::fmt::Debug for OpenTunnelOutputBuilder {
145    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
146        let mut formatter = f.debug_struct("OpenTunnelOutputBuilder");
147        formatter.field("tunnel_id", &self.tunnel_id);
148        formatter.field("tunnel_arn", &self.tunnel_arn);
149        formatter.field("source_access_token", &"*** Sensitive Data Redacted ***");
150        formatter.field("destination_access_token", &"*** Sensitive Data Redacted ***");
151        formatter.field("_request_id", &self._request_id);
152        formatter.finish()
153    }
154}