aws-sdk-iotsecuretunneling 0.26.0

AWS SDK for AWS IoT Secure Tunneling
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct OpenTunnelOutput {
    /// <p>A unique alpha-numeric tunnel ID.</p>
    #[doc(hidden)]
    pub tunnel_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name for the tunnel.</p>
    #[doc(hidden)]
    pub tunnel_arn: std::option::Option<std::string::String>,
    /// <p>The access token the source local proxy uses to connect to IoT Secure Tunneling.</p>
    #[doc(hidden)]
    pub source_access_token: std::option::Option<std::string::String>,
    /// <p>The access token the destination local proxy uses to connect to IoT Secure Tunneling.</p>
    #[doc(hidden)]
    pub destination_access_token: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl OpenTunnelOutput {
    /// <p>A unique alpha-numeric tunnel ID.</p>
    pub fn tunnel_id(&self) -> std::option::Option<&str> {
        self.tunnel_id.as_deref()
    }
    /// <p>The Amazon Resource Name for the tunnel.</p>
    pub fn tunnel_arn(&self) -> std::option::Option<&str> {
        self.tunnel_arn.as_deref()
    }
    /// <p>The access token the source local proxy uses to connect to IoT Secure Tunneling.</p>
    pub fn source_access_token(&self) -> std::option::Option<&str> {
        self.source_access_token.as_deref()
    }
    /// <p>The access token the destination local proxy uses to connect to IoT Secure Tunneling.</p>
    pub fn destination_access_token(&self) -> std::option::Option<&str> {
        self.destination_access_token.as_deref()
    }
}
impl std::fmt::Debug for OpenTunnelOutput {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("OpenTunnelOutput");
        formatter.field("tunnel_id", &self.tunnel_id);
        formatter.field("tunnel_arn", &self.tunnel_arn);
        formatter.field("source_access_token", &"*** Sensitive Data Redacted ***");
        formatter.field(
            "destination_access_token",
            &"*** Sensitive Data Redacted ***",
        );
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}
impl aws_http::request_id::RequestId for OpenTunnelOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl OpenTunnelOutput {
    /// Creates a new builder-style object to manufacture [`OpenTunnelOutput`](crate::operation::open_tunnel::OpenTunnelOutput).
    pub fn builder() -> crate::operation::open_tunnel::builders::OpenTunnelOutputBuilder {
        crate::operation::open_tunnel::builders::OpenTunnelOutputBuilder::default()
    }
}

/// A builder for [`OpenTunnelOutput`](crate::operation::open_tunnel::OpenTunnelOutput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
pub struct OpenTunnelOutputBuilder {
    pub(crate) tunnel_id: std::option::Option<std::string::String>,
    pub(crate) tunnel_arn: std::option::Option<std::string::String>,
    pub(crate) source_access_token: std::option::Option<std::string::String>,
    pub(crate) destination_access_token: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl OpenTunnelOutputBuilder {
    /// <p>A unique alpha-numeric tunnel ID.</p>
    pub fn tunnel_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.tunnel_id = Some(input.into());
        self
    }
    /// <p>A unique alpha-numeric tunnel ID.</p>
    pub fn set_tunnel_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.tunnel_id = input;
        self
    }
    /// <p>The Amazon Resource Name for the tunnel.</p>
    pub fn tunnel_arn(mut self, input: impl Into<std::string::String>) -> Self {
        self.tunnel_arn = Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name for the tunnel.</p>
    pub fn set_tunnel_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.tunnel_arn = input;
        self
    }
    /// <p>The access token the source local proxy uses to connect to IoT Secure Tunneling.</p>
    pub fn source_access_token(mut self, input: impl Into<std::string::String>) -> Self {
        self.source_access_token = Some(input.into());
        self
    }
    /// <p>The access token the source local proxy uses to connect to IoT Secure Tunneling.</p>
    pub fn set_source_access_token(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.source_access_token = input;
        self
    }
    /// <p>The access token the destination local proxy uses to connect to IoT Secure Tunneling.</p>
    pub fn destination_access_token(mut self, input: impl Into<std::string::String>) -> Self {
        self.destination_access_token = Some(input.into());
        self
    }
    /// <p>The access token the destination local proxy uses to connect to IoT Secure Tunneling.</p>
    pub fn set_destination_access_token(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.destination_access_token = input;
        self
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`OpenTunnelOutput`](crate::operation::open_tunnel::OpenTunnelOutput).
    pub fn build(self) -> crate::operation::open_tunnel::OpenTunnelOutput {
        crate::operation::open_tunnel::OpenTunnelOutput {
            tunnel_id: self.tunnel_id,
            tunnel_arn: self.tunnel_arn,
            source_access_token: self.source_access_token,
            destination_access_token: self.destination_access_token,
            _request_id: self._request_id,
        }
    }
}
impl std::fmt::Debug for OpenTunnelOutputBuilder {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("OpenTunnelOutputBuilder");
        formatter.field("tunnel_id", &self.tunnel_id);
        formatter.field("tunnel_arn", &self.tunnel_arn);
        formatter.field("source_access_token", &"*** Sensitive Data Redacted ***");
        formatter.field(
            "destination_access_token",
            &"*** Sensitive Data Redacted ***",
        );
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}