1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// 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,
})
}
}