aws_sdk_ivschat/operation/disconnect_user/
_disconnect_user_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)]
5pub struct DisconnectUserInput {
6    /// <p>Identifier of the room from which the user's clients should be disconnected. Currently this must be an ARN.</p>
7    pub room_identifier: ::std::option::Option<::std::string::String>,
8    /// <p>ID of the user (connection) to disconnect from the room.</p>
9    pub user_id: ::std::option::Option<::std::string::String>,
10    /// <p>Reason for disconnecting the user.</p>
11    pub reason: ::std::option::Option<::std::string::String>,
12}
13impl DisconnectUserInput {
14    /// <p>Identifier of the room from which the user's clients should be disconnected. Currently this must be an ARN.</p>
15    pub fn room_identifier(&self) -> ::std::option::Option<&str> {
16        self.room_identifier.as_deref()
17    }
18    /// <p>ID of the user (connection) to disconnect from the room.</p>
19    pub fn user_id(&self) -> ::std::option::Option<&str> {
20        self.user_id.as_deref()
21    }
22    /// <p>Reason for disconnecting the user.</p>
23    pub fn reason(&self) -> ::std::option::Option<&str> {
24        self.reason.as_deref()
25    }
26}
27impl ::std::fmt::Debug for DisconnectUserInput {
28    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29        let mut formatter = f.debug_struct("DisconnectUserInput");
30        formatter.field("room_identifier", &self.room_identifier);
31        formatter.field("user_id", &"*** Sensitive Data Redacted ***");
32        formatter.field("reason", &self.reason);
33        formatter.finish()
34    }
35}
36impl DisconnectUserInput {
37    /// Creates a new builder-style object to manufacture [`DisconnectUserInput`](crate::operation::disconnect_user::DisconnectUserInput).
38    pub fn builder() -> crate::operation::disconnect_user::builders::DisconnectUserInputBuilder {
39        crate::operation::disconnect_user::builders::DisconnectUserInputBuilder::default()
40    }
41}
42
43/// A builder for [`DisconnectUserInput`](crate::operation::disconnect_user::DisconnectUserInput).
44#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
45#[non_exhaustive]
46pub struct DisconnectUserInputBuilder {
47    pub(crate) room_identifier: ::std::option::Option<::std::string::String>,
48    pub(crate) user_id: ::std::option::Option<::std::string::String>,
49    pub(crate) reason: ::std::option::Option<::std::string::String>,
50}
51impl DisconnectUserInputBuilder {
52    /// <p>Identifier of the room from which the user's clients should be disconnected. Currently this must be an ARN.</p>
53    /// This field is required.
54    pub fn room_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55        self.room_identifier = ::std::option::Option::Some(input.into());
56        self
57    }
58    /// <p>Identifier of the room from which the user's clients should be disconnected. Currently this must be an ARN.</p>
59    pub fn set_room_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60        self.room_identifier = input;
61        self
62    }
63    /// <p>Identifier of the room from which the user's clients should be disconnected. Currently this must be an ARN.</p>
64    pub fn get_room_identifier(&self) -> &::std::option::Option<::std::string::String> {
65        &self.room_identifier
66    }
67    /// <p>ID of the user (connection) to disconnect from the room.</p>
68    /// This field is required.
69    pub fn user_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
70        self.user_id = ::std::option::Option::Some(input.into());
71        self
72    }
73    /// <p>ID of the user (connection) to disconnect from the room.</p>
74    pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
75        self.user_id = input;
76        self
77    }
78    /// <p>ID of the user (connection) to disconnect from the room.</p>
79    pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
80        &self.user_id
81    }
82    /// <p>Reason for disconnecting the user.</p>
83    pub fn reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
84        self.reason = ::std::option::Option::Some(input.into());
85        self
86    }
87    /// <p>Reason for disconnecting the user.</p>
88    pub fn set_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
89        self.reason = input;
90        self
91    }
92    /// <p>Reason for disconnecting the user.</p>
93    pub fn get_reason(&self) -> &::std::option::Option<::std::string::String> {
94        &self.reason
95    }
96    /// Consumes the builder and constructs a [`DisconnectUserInput`](crate::operation::disconnect_user::DisconnectUserInput).
97    pub fn build(
98        self,
99    ) -> ::std::result::Result<crate::operation::disconnect_user::DisconnectUserInput, ::aws_smithy_types::error::operation::BuildError> {
100        ::std::result::Result::Ok(crate::operation::disconnect_user::DisconnectUserInput {
101            room_identifier: self.room_identifier,
102            user_id: self.user_id,
103            reason: self.reason,
104        })
105    }
106}
107impl ::std::fmt::Debug for DisconnectUserInputBuilder {
108    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
109        let mut formatter = f.debug_struct("DisconnectUserInputBuilder");
110        formatter.field("room_identifier", &self.room_identifier);
111        formatter.field("user_id", &"*** Sensitive Data Redacted ***");
112        formatter.field("reason", &self.reason);
113        formatter.finish()
114    }
115}