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, std::fmt::Debug)]
pub struct CloseTunnelInput {
    /// <p>The ID of the tunnel to close.</p>
    #[doc(hidden)]
    pub tunnel_id: std::option::Option<std::string::String>,
    /// <p>When set to true, IoT Secure Tunneling deletes the tunnel data immediately.</p>
    #[doc(hidden)]
    pub delete: std::option::Option<bool>,
}
impl CloseTunnelInput {
    /// <p>The ID of the tunnel to close.</p>
    pub fn tunnel_id(&self) -> std::option::Option<&str> {
        self.tunnel_id.as_deref()
    }
    /// <p>When set to true, IoT Secure Tunneling deletes the tunnel data immediately.</p>
    pub fn delete(&self) -> std::option::Option<bool> {
        self.delete
    }
}
impl CloseTunnelInput {
    /// Creates a new builder-style object to manufacture [`CloseTunnelInput`](crate::operation::close_tunnel::CloseTunnelInput).
    pub fn builder() -> crate::operation::close_tunnel::builders::CloseTunnelInputBuilder {
        crate::operation::close_tunnel::builders::CloseTunnelInputBuilder::default()
    }
}

/// A builder for [`CloseTunnelInput`](crate::operation::close_tunnel::CloseTunnelInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct CloseTunnelInputBuilder {
    pub(crate) tunnel_id: std::option::Option<std::string::String>,
    pub(crate) delete: std::option::Option<bool>,
}
impl CloseTunnelInputBuilder {
    /// <p>The ID of the tunnel to close.</p>
    pub fn tunnel_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.tunnel_id = Some(input.into());
        self
    }
    /// <p>The ID of the tunnel to close.</p>
    pub fn set_tunnel_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.tunnel_id = input;
        self
    }
    /// <p>When set to true, IoT Secure Tunneling deletes the tunnel data immediately.</p>
    pub fn delete(mut self, input: bool) -> Self {
        self.delete = Some(input);
        self
    }
    /// <p>When set to true, IoT Secure Tunneling deletes the tunnel data immediately.</p>
    pub fn set_delete(mut self, input: std::option::Option<bool>) -> Self {
        self.delete = input;
        self
    }
    /// Consumes the builder and constructs a [`CloseTunnelInput`](crate::operation::close_tunnel::CloseTunnelInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::close_tunnel::CloseTunnelInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(crate::operation::close_tunnel::CloseTunnelInput {
            tunnel_id: self.tunnel_id,
            delete: self.delete,
        })
    }
}