aws_sdk_iotdataplane/operation/get_connection/_get_connection_input.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, ::std::fmt::Debug)]
5pub struct GetConnectionInput {
6 /// <p>The unique identifier of the MQTT client to retrieve connection information. The client ID can't start with a dollar sign ($).</p>
7 /// <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>
8 pub client_id: ::std::option::Option<::std::string::String>,
9 /// <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>
10 pub include_socket_information: ::std::option::Option<bool>,
11}
12impl GetConnectionInput {
13 /// <p>The unique identifier of the MQTT client to retrieve connection information. The client ID can't start with a dollar sign ($).</p>
14 /// <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>
15 pub fn client_id(&self) -> ::std::option::Option<&str> {
16 self.client_id.as_deref()
17 }
18 /// <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>
19 pub fn include_socket_information(&self) -> ::std::option::Option<bool> {
20 self.include_socket_information
21 }
22}
23impl GetConnectionInput {
24 /// Creates a new builder-style object to manufacture [`GetConnectionInput`](crate::operation::get_connection::GetConnectionInput).
25 pub fn builder() -> crate::operation::get_connection::builders::GetConnectionInputBuilder {
26 crate::operation::get_connection::builders::GetConnectionInputBuilder::default()
27 }
28}
29
30/// A builder for [`GetConnectionInput`](crate::operation::get_connection::GetConnectionInput).
31#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
32#[non_exhaustive]
33pub struct GetConnectionInputBuilder {
34 pub(crate) client_id: ::std::option::Option<::std::string::String>,
35 pub(crate) include_socket_information: ::std::option::Option<bool>,
36}
37impl GetConnectionInputBuilder {
38 /// <p>The unique identifier of the MQTT client to retrieve connection information. The client ID can't start with a dollar sign ($).</p>
39 /// <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>
40 /// This field is required.
41 pub fn client_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
42 self.client_id = ::std::option::Option::Some(input.into());
43 self
44 }
45 /// <p>The unique identifier of the MQTT client to retrieve connection information. The client ID can't start with a dollar sign ($).</p>
46 /// <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>
47 pub fn set_client_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
48 self.client_id = input;
49 self
50 }
51 /// <p>The unique identifier of the MQTT client to retrieve connection information. The client ID can't start with a dollar sign ($).</p>
52 /// <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>
53 pub fn get_client_id(&self) -> &::std::option::Option<::std::string::String> {
54 &self.client_id
55 }
56 /// <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>
57 pub fn include_socket_information(mut self, input: bool) -> Self {
58 self.include_socket_information = ::std::option::Option::Some(input);
59 self
60 }
61 /// <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>
62 pub fn set_include_socket_information(mut self, input: ::std::option::Option<bool>) -> Self {
63 self.include_socket_information = input;
64 self
65 }
66 /// <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>
67 pub fn get_include_socket_information(&self) -> &::std::option::Option<bool> {
68 &self.include_socket_information
69 }
70 /// Consumes the builder and constructs a [`GetConnectionInput`](crate::operation::get_connection::GetConnectionInput).
71 pub fn build(
72 self,
73 ) -> ::std::result::Result<crate::operation::get_connection::GetConnectionInput, ::aws_smithy_types::error::operation::BuildError> {
74 ::std::result::Result::Ok(crate::operation::get_connection::GetConnectionInput {
75 client_id: self.client_id,
76 include_socket_information: self.include_socket_information,
77 })
78 }
79}