aws-sdk-workdocs 1.98.0

AWS SDK for Amazon WorkDocs
Documentation
// 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 CreateUserInput {
    /// <p>The ID of the organization.</p>
    pub organization_id: ::std::option::Option<::std::string::String>,
    /// <p>The login name of the user.</p>
    pub username: ::std::option::Option<::std::string::String>,
    /// <p>The email address of the user.</p>
    pub email_address: ::std::option::Option<::std::string::String>,
    /// <p>The given name of the user.</p>
    pub given_name: ::std::option::Option<::std::string::String>,
    /// <p>The surname of the user.</p>
    pub surname: ::std::option::Option<::std::string::String>,
    /// <p>The password of the user.</p>
    pub password: ::std::option::Option<::std::string::String>,
    /// <p>The time zone ID of the user.</p>
    pub time_zone_id: ::std::option::Option<::std::string::String>,
    /// <p>The amount of storage for the user.</p>
    pub storage_rule: ::std::option::Option<crate::types::StorageRuleType>,
    /// <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
    pub authentication_token: ::std::option::Option<::std::string::String>,
}
impl CreateUserInput {
    /// <p>The ID of the organization.</p>
    pub fn organization_id(&self) -> ::std::option::Option<&str> {
        self.organization_id.as_deref()
    }
    /// <p>The login name of the user.</p>
    pub fn username(&self) -> ::std::option::Option<&str> {
        self.username.as_deref()
    }
    /// <p>The email address of the user.</p>
    pub fn email_address(&self) -> ::std::option::Option<&str> {
        self.email_address.as_deref()
    }
    /// <p>The given name of the user.</p>
    pub fn given_name(&self) -> ::std::option::Option<&str> {
        self.given_name.as_deref()
    }
    /// <p>The surname of the user.</p>
    pub fn surname(&self) -> ::std::option::Option<&str> {
        self.surname.as_deref()
    }
    /// <p>The password of the user.</p>
    pub fn password(&self) -> ::std::option::Option<&str> {
        self.password.as_deref()
    }
    /// <p>The time zone ID of the user.</p>
    pub fn time_zone_id(&self) -> ::std::option::Option<&str> {
        self.time_zone_id.as_deref()
    }
    /// <p>The amount of storage for the user.</p>
    pub fn storage_rule(&self) -> ::std::option::Option<&crate::types::StorageRuleType> {
        self.storage_rule.as_ref()
    }
    /// <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
    pub fn authentication_token(&self) -> ::std::option::Option<&str> {
        self.authentication_token.as_deref()
    }
}
impl ::std::fmt::Debug for CreateUserInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateUserInput");
        formatter.field("organization_id", &self.organization_id);
        formatter.field("username", &"*** Sensitive Data Redacted ***");
        formatter.field("email_address", &"*** Sensitive Data Redacted ***");
        formatter.field("given_name", &"*** Sensitive Data Redacted ***");
        formatter.field("surname", &"*** Sensitive Data Redacted ***");
        formatter.field("password", &"*** Sensitive Data Redacted ***");
        formatter.field("time_zone_id", &self.time_zone_id);
        formatter.field("storage_rule", &self.storage_rule);
        formatter.field("authentication_token", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl CreateUserInput {
    /// Creates a new builder-style object to manufacture [`CreateUserInput`](crate::operation::create_user::CreateUserInput).
    pub fn builder() -> crate::operation::create_user::builders::CreateUserInputBuilder {
        crate::operation::create_user::builders::CreateUserInputBuilder::default()
    }
}

/// A builder for [`CreateUserInput`](crate::operation::create_user::CreateUserInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateUserInputBuilder {
    pub(crate) organization_id: ::std::option::Option<::std::string::String>,
    pub(crate) username: ::std::option::Option<::std::string::String>,
    pub(crate) email_address: ::std::option::Option<::std::string::String>,
    pub(crate) given_name: ::std::option::Option<::std::string::String>,
    pub(crate) surname: ::std::option::Option<::std::string::String>,
    pub(crate) password: ::std::option::Option<::std::string::String>,
    pub(crate) time_zone_id: ::std::option::Option<::std::string::String>,
    pub(crate) storage_rule: ::std::option::Option<crate::types::StorageRuleType>,
    pub(crate) authentication_token: ::std::option::Option<::std::string::String>,
}
impl CreateUserInputBuilder {
    /// <p>The ID of the organization.</p>
    pub fn organization_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.organization_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the organization.</p>
    pub fn set_organization_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.organization_id = input;
        self
    }
    /// <p>The ID of the organization.</p>
    pub fn get_organization_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.organization_id
    }
    /// <p>The login name of the user.</p>
    /// This field is required.
    pub fn username(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.username = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The login name of the user.</p>
    pub fn set_username(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.username = input;
        self
    }
    /// <p>The login name of the user.</p>
    pub fn get_username(&self) -> &::std::option::Option<::std::string::String> {
        &self.username
    }
    /// <p>The email address of the user.</p>
    pub fn email_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.email_address = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The email address of the user.</p>
    pub fn set_email_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.email_address = input;
        self
    }
    /// <p>The email address of the user.</p>
    pub fn get_email_address(&self) -> &::std::option::Option<::std::string::String> {
        &self.email_address
    }
    /// <p>The given name of the user.</p>
    /// This field is required.
    pub fn given_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.given_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The given name of the user.</p>
    pub fn set_given_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.given_name = input;
        self
    }
    /// <p>The given name of the user.</p>
    pub fn get_given_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.given_name
    }
    /// <p>The surname of the user.</p>
    /// This field is required.
    pub fn surname(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.surname = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The surname of the user.</p>
    pub fn set_surname(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.surname = input;
        self
    }
    /// <p>The surname of the user.</p>
    pub fn get_surname(&self) -> &::std::option::Option<::std::string::String> {
        &self.surname
    }
    /// <p>The password of the user.</p>
    /// This field is required.
    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 password of the user.</p>
    pub fn set_password(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.password = input;
        self
    }
    /// <p>The password of the user.</p>
    pub fn get_password(&self) -> &::std::option::Option<::std::string::String> {
        &self.password
    }
    /// <p>The time zone ID of the user.</p>
    pub fn time_zone_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.time_zone_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The time zone ID of the user.</p>
    pub fn set_time_zone_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.time_zone_id = input;
        self
    }
    /// <p>The time zone ID of the user.</p>
    pub fn get_time_zone_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.time_zone_id
    }
    /// <p>The amount of storage for the user.</p>
    pub fn storage_rule(mut self, input: crate::types::StorageRuleType) -> Self {
        self.storage_rule = ::std::option::Option::Some(input);
        self
    }
    /// <p>The amount of storage for the user.</p>
    pub fn set_storage_rule(mut self, input: ::std::option::Option<crate::types::StorageRuleType>) -> Self {
        self.storage_rule = input;
        self
    }
    /// <p>The amount of storage for the user.</p>
    pub fn get_storage_rule(&self) -> &::std::option::Option<crate::types::StorageRuleType> {
        &self.storage_rule
    }
    /// <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
    pub fn authentication_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.authentication_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
    pub fn set_authentication_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.authentication_token = input;
        self
    }
    /// <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
    pub fn get_authentication_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.authentication_token
    }
    /// Consumes the builder and constructs a [`CreateUserInput`](crate::operation::create_user::CreateUserInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::create_user::CreateUserInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_user::CreateUserInput {
            organization_id: self.organization_id,
            username: self.username,
            email_address: self.email_address,
            given_name: self.given_name,
            surname: self.surname,
            password: self.password,
            time_zone_id: self.time_zone_id,
            storage_rule: self.storage_rule,
            authentication_token: self.authentication_token,
        })
    }
}
impl ::std::fmt::Debug for CreateUserInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateUserInputBuilder");
        formatter.field("organization_id", &self.organization_id);
        formatter.field("username", &"*** Sensitive Data Redacted ***");
        formatter.field("email_address", &"*** Sensitive Data Redacted ***");
        formatter.field("given_name", &"*** Sensitive Data Redacted ***");
        formatter.field("surname", &"*** Sensitive Data Redacted ***");
        formatter.field("password", &"*** Sensitive Data Redacted ***");
        formatter.field("time_zone_id", &self.time_zone_id);
        formatter.field("storage_rule", &self.storage_rule);
        formatter.field("authentication_token", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}