// 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)]
pub struct CreateLoginProfileInput {
/// <p>The name of the IAM user to create a password for. The user must already exist.</p>
/// <p>This parameter is optional. If no user name is included, it defaults to the principal making the request. When you make this request with root user credentials, you must use an <a href="https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoot.html">AssumeRoot</a> session to omit the user name.</p>
/// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
pub user_name: ::std::option::Option<::std::string::String>,
/// <p>The new password for the user.</p>
/// <p>This parameter must be omitted when you make the request with an <a href="https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoot.html">AssumeRoot</a> session. It is required in all other cases.</p>
/// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> that is used to validate this parameter is a string of characters. That string can include almost any printable ASCII character from the space (<code>\u0020</code>) through the end of the ASCII character range (<code>\u00FF</code>). You can also include the tab (<code>\u0009</code>), line feed (<code>\u000A</code>), and carriage return (<code>\u000D</code>) characters. Any of these characters are valid in a password. However, many tools, such as the Amazon Web Services Management Console, might restrict the ability to type certain characters because they have special meaning within that tool.</p>
pub password: ::std::option::Option<::std::string::String>,
/// <p>Specifies whether the user is required to set a new password on next sign-in.</p>
pub password_reset_required: ::std::option::Option<bool>,
}
impl CreateLoginProfileInput {
/// <p>The name of the IAM user to create a password for. The user must already exist.</p>
/// <p>This parameter is optional. If no user name is included, it defaults to the principal making the request. When you make this request with root user credentials, you must use an <a href="https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoot.html">AssumeRoot</a> session to omit the user name.</p>
/// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
pub fn user_name(&self) -> ::std::option::Option<&str> {
self.user_name.as_deref()
}
/// <p>The new password for the user.</p>
/// <p>This parameter must be omitted when you make the request with an <a href="https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoot.html">AssumeRoot</a> session. It is required in all other cases.</p>
/// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> that is used to validate this parameter is a string of characters. That string can include almost any printable ASCII character from the space (<code>\u0020</code>) through the end of the ASCII character range (<code>\u00FF</code>). You can also include the tab (<code>\u0009</code>), line feed (<code>\u000A</code>), and carriage return (<code>\u000D</code>) characters. Any of these characters are valid in a password. However, many tools, such as the Amazon Web Services Management Console, might restrict the ability to type certain characters because they have special meaning within that tool.</p>
pub fn password(&self) -> ::std::option::Option<&str> {
self.password.as_deref()
}
/// <p>Specifies whether the user is required to set a new password on next sign-in.</p>
pub fn password_reset_required(&self) -> ::std::option::Option<bool> {
self.password_reset_required
}
}
impl ::std::fmt::Debug for CreateLoginProfileInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateLoginProfileInput");
formatter.field("user_name", &self.user_name);
formatter.field("password", &"*** Sensitive Data Redacted ***");
formatter.field("password_reset_required", &self.password_reset_required);
formatter.finish()
}
}
impl CreateLoginProfileInput {
/// Creates a new builder-style object to manufacture [`CreateLoginProfileInput`](crate::operation::create_login_profile::CreateLoginProfileInput).
pub fn builder() -> crate::operation::create_login_profile::builders::CreateLoginProfileInputBuilder {
crate::operation::create_login_profile::builders::CreateLoginProfileInputBuilder::default()
}
}
/// A builder for [`CreateLoginProfileInput`](crate::operation::create_login_profile::CreateLoginProfileInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateLoginProfileInputBuilder {
pub(crate) user_name: ::std::option::Option<::std::string::String>,
pub(crate) password: ::std::option::Option<::std::string::String>,
pub(crate) password_reset_required: ::std::option::Option<bool>,
}
impl CreateLoginProfileInputBuilder {
/// <p>The name of the IAM user to create a password for. The user must already exist.</p>
/// <p>This parameter is optional. If no user name is included, it defaults to the principal making the request. When you make this request with root user credentials, you must use an <a href="https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoot.html">AssumeRoot</a> session to omit the user name.</p>
/// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
pub fn user_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.user_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the IAM user to create a password for. The user must already exist.</p>
/// <p>This parameter is optional. If no user name is included, it defaults to the principal making the request. When you make this request with root user credentials, you must use an <a href="https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoot.html">AssumeRoot</a> session to omit the user name.</p>
/// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
pub fn set_user_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.user_name = input;
self
}
/// <p>The name of the IAM user to create a password for. The user must already exist.</p>
/// <p>This parameter is optional. If no user name is included, it defaults to the principal making the request. When you make this request with root user credentials, you must use an <a href="https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoot.html">AssumeRoot</a> session to omit the user name.</p>
/// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
pub fn get_user_name(&self) -> &::std::option::Option<::std::string::String> {
&self.user_name
}
/// <p>The new password for the user.</p>
/// <p>This parameter must be omitted when you make the request with an <a href="https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoot.html">AssumeRoot</a> session. It is required in all other cases.</p>
/// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> that is used to validate this parameter is a string of characters. That string can include almost any printable ASCII character from the space (<code>\u0020</code>) through the end of the ASCII character range (<code>\u00FF</code>). You can also include the tab (<code>\u0009</code>), line feed (<code>\u000A</code>), and carriage return (<code>\u000D</code>) characters. Any of these characters are valid in a password. However, many tools, such as the Amazon Web Services Management Console, might restrict the ability to type certain characters because they have special meaning within that tool.</p>
pub fn password(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.password = ::std::option::Option::Some(input.into());
self
}
/// <p>The new password for the user.</p>
/// <p>This parameter must be omitted when you make the request with an <a href="https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoot.html">AssumeRoot</a> session. It is required in all other cases.</p>
/// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> that is used to validate this parameter is a string of characters. That string can include almost any printable ASCII character from the space (<code>\u0020</code>) through the end of the ASCII character range (<code>\u00FF</code>). You can also include the tab (<code>\u0009</code>), line feed (<code>\u000A</code>), and carriage return (<code>\u000D</code>) characters. Any of these characters are valid in a password. However, many tools, such as the Amazon Web Services Management Console, might restrict the ability to type certain characters because they have special meaning within that tool.</p>
pub fn set_password(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.password = input;
self
}
/// <p>The new password for the user.</p>
/// <p>This parameter must be omitted when you make the request with an <a href="https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoot.html">AssumeRoot</a> session. It is required in all other cases.</p>
/// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> that is used to validate this parameter is a string of characters. That string can include almost any printable ASCII character from the space (<code>\u0020</code>) through the end of the ASCII character range (<code>\u00FF</code>). You can also include the tab (<code>\u0009</code>), line feed (<code>\u000A</code>), and carriage return (<code>\u000D</code>) characters. Any of these characters are valid in a password. However, many tools, such as the Amazon Web Services Management Console, might restrict the ability to type certain characters because they have special meaning within that tool.</p>
pub fn get_password(&self) -> &::std::option::Option<::std::string::String> {
&self.password
}
/// <p>Specifies whether the user is required to set a new password on next sign-in.</p>
pub fn password_reset_required(mut self, input: bool) -> Self {
self.password_reset_required = ::std::option::Option::Some(input);
self
}
/// <p>Specifies whether the user is required to set a new password on next sign-in.</p>
pub fn set_password_reset_required(mut self, input: ::std::option::Option<bool>) -> Self {
self.password_reset_required = input;
self
}
/// <p>Specifies whether the user is required to set a new password on next sign-in.</p>
pub fn get_password_reset_required(&self) -> &::std::option::Option<bool> {
&self.password_reset_required
}
/// Consumes the builder and constructs a [`CreateLoginProfileInput`](crate::operation::create_login_profile::CreateLoginProfileInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_login_profile::CreateLoginProfileInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::create_login_profile::CreateLoginProfileInput {
user_name: self.user_name,
password: self.password,
password_reset_required: self.password_reset_required,
})
}
}
impl ::std::fmt::Debug for CreateLoginProfileInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateLoginProfileInputBuilder");
formatter.field("user_name", &self.user_name);
formatter.field("password", &"*** Sensitive Data Redacted ***");
formatter.field("password_reset_required", &self.password_reset_required);
formatter.finish()
}
}