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