aws_sdk_appstream/operation/disable_user/
_disable_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 DisableUserInput {
6    /// <p>The email address of the user.</p><note>
7    /// <p>Users' email addresses are case-sensitive.</p>
8    /// </note>
9    pub user_name: ::std::option::Option<::std::string::String>,
10    /// <p>The authentication type for the user. You must specify USERPOOL.</p>
11    pub authentication_type: ::std::option::Option<crate::types::AuthenticationType>,
12}
13impl DisableUserInput {
14    /// <p>The email address of the user.</p><note>
15    /// <p>Users' email addresses are case-sensitive.</p>
16    /// </note>
17    pub fn user_name(&self) -> ::std::option::Option<&str> {
18        self.user_name.as_deref()
19    }
20    /// <p>The authentication type for the user. You must specify USERPOOL.</p>
21    pub fn authentication_type(&self) -> ::std::option::Option<&crate::types::AuthenticationType> {
22        self.authentication_type.as_ref()
23    }
24}
25impl ::std::fmt::Debug for DisableUserInput {
26    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
27        let mut formatter = f.debug_struct("DisableUserInput");
28        formatter.field("user_name", &"*** Sensitive Data Redacted ***");
29        formatter.field("authentication_type", &self.authentication_type);
30        formatter.finish()
31    }
32}
33impl DisableUserInput {
34    /// Creates a new builder-style object to manufacture [`DisableUserInput`](crate::operation::disable_user::DisableUserInput).
35    pub fn builder() -> crate::operation::disable_user::builders::DisableUserInputBuilder {
36        crate::operation::disable_user::builders::DisableUserInputBuilder::default()
37    }
38}
39
40/// A builder for [`DisableUserInput`](crate::operation::disable_user::DisableUserInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
42#[non_exhaustive]
43pub struct DisableUserInputBuilder {
44    pub(crate) user_name: ::std::option::Option<::std::string::String>,
45    pub(crate) authentication_type: ::std::option::Option<crate::types::AuthenticationType>,
46}
47impl DisableUserInputBuilder {
48    /// <p>The email address of the user.</p><note>
49    /// <p>Users' email addresses are case-sensitive.</p>
50    /// </note>
51    /// This field is required.
52    pub fn user_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.user_name = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The email address of the user.</p><note>
57    /// <p>Users' email addresses are case-sensitive.</p>
58    /// </note>
59    pub fn set_user_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60        self.user_name = input;
61        self
62    }
63    /// <p>The email address of the user.</p><note>
64    /// <p>Users' email addresses are case-sensitive.</p>
65    /// </note>
66    pub fn get_user_name(&self) -> &::std::option::Option<::std::string::String> {
67        &self.user_name
68    }
69    /// <p>The authentication type for the user. You must specify USERPOOL.</p>
70    /// This field is required.
71    pub fn authentication_type(mut self, input: crate::types::AuthenticationType) -> Self {
72        self.authentication_type = ::std::option::Option::Some(input);
73        self
74    }
75    /// <p>The authentication type for the user. You must specify USERPOOL.</p>
76    pub fn set_authentication_type(mut self, input: ::std::option::Option<crate::types::AuthenticationType>) -> Self {
77        self.authentication_type = input;
78        self
79    }
80    /// <p>The authentication type for the user. You must specify USERPOOL.</p>
81    pub fn get_authentication_type(&self) -> &::std::option::Option<crate::types::AuthenticationType> {
82        &self.authentication_type
83    }
84    /// Consumes the builder and constructs a [`DisableUserInput`](crate::operation::disable_user::DisableUserInput).
85    pub fn build(self) -> ::std::result::Result<crate::operation::disable_user::DisableUserInput, ::aws_smithy_types::error::operation::BuildError> {
86        ::std::result::Result::Ok(crate::operation::disable_user::DisableUserInput {
87            user_name: self.user_name,
88            authentication_type: self.authentication_type,
89        })
90    }
91}
92impl ::std::fmt::Debug for DisableUserInputBuilder {
93    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
94        let mut formatter = f.debug_struct("DisableUserInputBuilder");
95        formatter.field("user_name", &"*** Sensitive Data Redacted ***");
96        formatter.field("authentication_type", &self.authentication_type);
97        formatter.finish()
98    }
99}