aws-sdk-iotdataplane 1.103.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 GetConnectionInput {
    /// <p>The unique identifier of the MQTT client to retrieve connection information. The client ID can't start with a dollar sign ($).</p>
    /// <p>MQTT client IDs must be URL encoded (percent-encoded) when they contain characters that are not valid in HTTP requests, such as spaces, forward slashes (/), and UTF-8 characters.</p>
    pub client_id: ::std::option::Option<::std::string::String>,
    /// <p>Specifies if socket information (sourcePort, targetPort, sourceIp, targetIp) should be included in the GetConnection response. Set to <code>TRUE</code> to include socket information. Set to <code>FALSE</code> to omit socket information. By default, this is set to <code>FALSE</code>. See the <a href="https://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html#mqtt-client-disconnect">developer guide</a> for how to authorize this parameter.</p>
    pub include_socket_information: ::std::option::Option<bool>,
}
impl GetConnectionInput {
    /// <p>The unique identifier of the MQTT client to retrieve connection information. The client ID can't start with a dollar sign ($).</p>
    /// <p>MQTT client IDs must be URL encoded (percent-encoded) when they contain characters that are not valid in HTTP requests, such as spaces, forward slashes (/), and UTF-8 characters.</p>
    pub fn client_id(&self) -> ::std::option::Option<&str> {
        self.client_id.as_deref()
    }
    /// <p>Specifies if socket information (sourcePort, targetPort, sourceIp, targetIp) should be included in the GetConnection response. Set to <code>TRUE</code> to include socket information. Set to <code>FALSE</code> to omit socket information. By default, this is set to <code>FALSE</code>. See the <a href="https://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html#mqtt-client-disconnect">developer guide</a> for how to authorize this parameter.</p>
    pub fn include_socket_information(&self) -> ::std::option::Option<bool> {
        self.include_socket_information
    }
}
impl GetConnectionInput {
    /// Creates a new builder-style object to manufacture [`GetConnectionInput`](crate::operation::get_connection::GetConnectionInput).
    pub fn builder() -> crate::operation::get_connection::builders::GetConnectionInputBuilder {
        crate::operation::get_connection::builders::GetConnectionInputBuilder::default()
    }
}

/// A builder for [`GetConnectionInput`](crate::operation::get_connection::GetConnectionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetConnectionInputBuilder {
    pub(crate) client_id: ::std::option::Option<::std::string::String>,
    pub(crate) include_socket_information: ::std::option::Option<bool>,
}
impl GetConnectionInputBuilder {
    /// <p>The unique identifier of the MQTT client to retrieve connection information. The client ID can't start with a dollar sign ($).</p>
    /// <p>MQTT client IDs must be URL encoded (percent-encoded) when they contain characters that are not valid in HTTP requests, such as spaces, forward slashes (/), and UTF-8 characters.</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 retrieve connection information. The client ID can't start with a dollar sign ($).</p>
    /// <p>MQTT client IDs must be URL encoded (percent-encoded) when they contain characters that are not valid in HTTP requests, such as spaces, forward slashes (/), and UTF-8 characters.</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 retrieve connection information. The client ID can't start with a dollar sign ($).</p>
    /// <p>MQTT client IDs must be URL encoded (percent-encoded) when they contain characters that are not valid in HTTP requests, such as spaces, forward slashes (/), and UTF-8 characters.</p>
    pub fn get_client_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_id
    }
    /// <p>Specifies if socket information (sourcePort, targetPort, sourceIp, targetIp) should be included in the GetConnection response. Set to <code>TRUE</code> to include socket information. Set to <code>FALSE</code> to omit socket information. By default, this is set to <code>FALSE</code>. See the <a href="https://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html#mqtt-client-disconnect">developer guide</a> for how to authorize this parameter.</p>
    pub fn include_socket_information(mut self, input: bool) -> Self {
        self.include_socket_information = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies if socket information (sourcePort, targetPort, sourceIp, targetIp) should be included in the GetConnection response. Set to <code>TRUE</code> to include socket information. Set to <code>FALSE</code> to omit socket information. By default, this is set to <code>FALSE</code>. See the <a href="https://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html#mqtt-client-disconnect">developer guide</a> for how to authorize this parameter.</p>
    pub fn set_include_socket_information(mut self, input: ::std::option::Option<bool>) -> Self {
        self.include_socket_information = input;
        self
    }
    /// <p>Specifies if socket information (sourcePort, targetPort, sourceIp, targetIp) should be included in the GetConnection response. Set to <code>TRUE</code> to include socket information. Set to <code>FALSE</code> to omit socket information. By default, this is set to <code>FALSE</code>. See the <a href="https://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html#mqtt-client-disconnect">developer guide</a> for how to authorize this parameter.</p>
    pub fn get_include_socket_information(&self) -> &::std::option::Option<bool> {
        &self.include_socket_information
    }
    /// Consumes the builder and constructs a [`GetConnectionInput`](crate::operation::get_connection::GetConnectionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_connection::GetConnectionInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_connection::GetConnectionInput {
            client_id: self.client_id,
            include_socket_information: self.include_socket_information,
        })
    }
}