aws-sdk-iotdataplane 1.99.0

AWS SDK for AWS IoT Data Plane
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 DeleteConnectionInput {
    /// <p>The unique identifier of the MQTT client to disconnect. The client ID can't start with a dollar sign ($).</p>
    pub client_id: ::std::option::Option<::std::string::String>,
    /// <p>Specifies whether to remove the client's session state when disconnecting. Set to <code>TRUE</code> to delete all session information, including subscriptions and queued messages. Set to <code>FALSE</code> to preserve the session state. By default, this is set to <code>FALSE</code> (preserves the session state).</p>
    pub clean_session: ::std::option::Option<bool>,
    /// <p>Controls if Amazon Web Services IoT Core publishes the client's Last Will and Testament (LWT) message upon disconnection. Set to <code>TRUE</code> to prevent publishing the LWT message. Set to <code>FALSE</code> to allow publishing. By default, this is set to <code>FALSE</code> (allows publishing the LWT message).</p>
    pub prevent_will_message: ::std::option::Option<bool>,
}
impl DeleteConnectionInput {
    /// <p>The unique identifier of the MQTT client to disconnect. The client ID can't start with a dollar sign ($).</p>
    pub fn client_id(&self) -> ::std::option::Option<&str> {
        self.client_id.as_deref()
    }
    /// <p>Specifies whether to remove the client's session state when disconnecting. Set to <code>TRUE</code> to delete all session information, including subscriptions and queued messages. Set to <code>FALSE</code> to preserve the session state. By default, this is set to <code>FALSE</code> (preserves the session state).</p>
    pub fn clean_session(&self) -> ::std::option::Option<bool> {
        self.clean_session
    }
    /// <p>Controls if Amazon Web Services IoT Core publishes the client's Last Will and Testament (LWT) message upon disconnection. Set to <code>TRUE</code> to prevent publishing the LWT message. Set to <code>FALSE</code> to allow publishing. By default, this is set to <code>FALSE</code> (allows publishing the LWT message).</p>
    pub fn prevent_will_message(&self) -> ::std::option::Option<bool> {
        self.prevent_will_message
    }
}
impl DeleteConnectionInput {
    /// Creates a new builder-style object to manufacture [`DeleteConnectionInput`](crate::operation::delete_connection::DeleteConnectionInput).
    pub fn builder() -> crate::operation::delete_connection::builders::DeleteConnectionInputBuilder {
        crate::operation::delete_connection::builders::DeleteConnectionInputBuilder::default()
    }
}

/// A builder for [`DeleteConnectionInput`](crate::operation::delete_connection::DeleteConnectionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteConnectionInputBuilder {
    pub(crate) client_id: ::std::option::Option<::std::string::String>,
    pub(crate) clean_session: ::std::option::Option<bool>,
    pub(crate) prevent_will_message: ::std::option::Option<bool>,
}
impl DeleteConnectionInputBuilder {
    /// <p>The unique identifier of the MQTT client to disconnect. The client ID can't start with a dollar sign ($).</p>
    /// This field is required.
    pub fn client_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the MQTT client to disconnect. The client ID can't start with a dollar sign ($).</p>
    pub fn set_client_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_id = input;
        self
    }
    /// <p>The unique identifier of the MQTT client to disconnect. The client ID can't start with a dollar sign ($).</p>
    pub fn get_client_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_id
    }
    /// <p>Specifies whether to remove the client's session state when disconnecting. Set to <code>TRUE</code> to delete all session information, including subscriptions and queued messages. Set to <code>FALSE</code> to preserve the session state. By default, this is set to <code>FALSE</code> (preserves the session state).</p>
    pub fn clean_session(mut self, input: bool) -> Self {
        self.clean_session = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies whether to remove the client's session state when disconnecting. Set to <code>TRUE</code> to delete all session information, including subscriptions and queued messages. Set to <code>FALSE</code> to preserve the session state. By default, this is set to <code>FALSE</code> (preserves the session state).</p>
    pub fn set_clean_session(mut self, input: ::std::option::Option<bool>) -> Self {
        self.clean_session = input;
        self
    }
    /// <p>Specifies whether to remove the client's session state when disconnecting. Set to <code>TRUE</code> to delete all session information, including subscriptions and queued messages. Set to <code>FALSE</code> to preserve the session state. By default, this is set to <code>FALSE</code> (preserves the session state).</p>
    pub fn get_clean_session(&self) -> &::std::option::Option<bool> {
        &self.clean_session
    }
    /// <p>Controls if Amazon Web Services IoT Core publishes the client's Last Will and Testament (LWT) message upon disconnection. Set to <code>TRUE</code> to prevent publishing the LWT message. Set to <code>FALSE</code> to allow publishing. By default, this is set to <code>FALSE</code> (allows publishing the LWT message).</p>
    pub fn prevent_will_message(mut self, input: bool) -> Self {
        self.prevent_will_message = ::std::option::Option::Some(input);
        self
    }
    /// <p>Controls if Amazon Web Services IoT Core publishes the client's Last Will and Testament (LWT) message upon disconnection. Set to <code>TRUE</code> to prevent publishing the LWT message. Set to <code>FALSE</code> to allow publishing. By default, this is set to <code>FALSE</code> (allows publishing the LWT message).</p>
    pub fn set_prevent_will_message(mut self, input: ::std::option::Option<bool>) -> Self {
        self.prevent_will_message = input;
        self
    }
    /// <p>Controls if Amazon Web Services IoT Core publishes the client's Last Will and Testament (LWT) message upon disconnection. Set to <code>TRUE</code> to prevent publishing the LWT message. Set to <code>FALSE</code> to allow publishing. By default, this is set to <code>FALSE</code> (allows publishing the LWT message).</p>
    pub fn get_prevent_will_message(&self) -> &::std::option::Option<bool> {
        &self.prevent_will_message
    }
    /// Consumes the builder and constructs a [`DeleteConnectionInput`](crate::operation::delete_connection::DeleteConnectionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::delete_connection::DeleteConnectionInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::delete_connection::DeleteConnectionInput {
            client_id: self.client_id,
            clean_session: self.clean_session,
            prevent_will_message: self.prevent_will_message,
        })
    }
}