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 UpdateUserInput {
    /// <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>,
    /// <p>The ID of the user.</p>
    pub user_id: ::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 type of the user.</p>
    pub r#type: ::std::option::Option<crate::types::UserType>,
    /// <p>The amount of storage for the user.</p>
    pub storage_rule: ::std::option::Option<crate::types::StorageRuleType>,
    /// <p>The time zone ID of the user.</p>
    pub time_zone_id: ::std::option::Option<::std::string::String>,
    /// <p>The locale of the user.</p>
    pub locale: ::std::option::Option<crate::types::LocaleType>,
    /// <p>Boolean value to determine whether the user is granted Power user privileges.</p>
    pub grant_poweruser_privileges: ::std::option::Option<crate::types::BooleanEnumType>,
}
impl UpdateUserInput {
    /// <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()
    }
    /// <p>The ID of the user.</p>
    pub fn user_id(&self) -> ::std::option::Option<&str> {
        self.user_id.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 type of the user.</p>
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::UserType> {
        self.r#type.as_ref()
    }
    /// <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>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 locale of the user.</p>
    pub fn locale(&self) -> ::std::option::Option<&crate::types::LocaleType> {
        self.locale.as_ref()
    }
    /// <p>Boolean value to determine whether the user is granted Power user privileges.</p>
    pub fn grant_poweruser_privileges(&self) -> ::std::option::Option<&crate::types::BooleanEnumType> {
        self.grant_poweruser_privileges.as_ref()
    }
}
impl ::std::fmt::Debug for UpdateUserInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateUserInput");
        formatter.field("authentication_token", &"*** Sensitive Data Redacted ***");
        formatter.field("user_id", &self.user_id);
        formatter.field("given_name", &"*** Sensitive Data Redacted ***");
        formatter.field("surname", &"*** Sensitive Data Redacted ***");
        formatter.field("r#type", &self.r#type);
        formatter.field("storage_rule", &self.storage_rule);
        formatter.field("time_zone_id", &self.time_zone_id);
        formatter.field("locale", &self.locale);
        formatter.field("grant_poweruser_privileges", &self.grant_poweruser_privileges);
        formatter.finish()
    }
}
impl UpdateUserInput {
    /// Creates a new builder-style object to manufacture [`UpdateUserInput`](crate::operation::update_user::UpdateUserInput).
    pub fn builder() -> crate::operation::update_user::builders::UpdateUserInputBuilder {
        crate::operation::update_user::builders::UpdateUserInputBuilder::default()
    }
}

/// A builder for [`UpdateUserInput`](crate::operation::update_user::UpdateUserInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct UpdateUserInputBuilder {
    pub(crate) authentication_token: ::std::option::Option<::std::string::String>,
    pub(crate) user_id: ::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) r#type: ::std::option::Option<crate::types::UserType>,
    pub(crate) storage_rule: ::std::option::Option<crate::types::StorageRuleType>,
    pub(crate) time_zone_id: ::std::option::Option<::std::string::String>,
    pub(crate) locale: ::std::option::Option<crate::types::LocaleType>,
    pub(crate) grant_poweruser_privileges: ::std::option::Option<crate::types::BooleanEnumType>,
}
impl UpdateUserInputBuilder {
    /// <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
    }
    /// <p>The ID of the user.</p>
    /// This field is required.
    pub fn user_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.user_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the user.</p>
    pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.user_id = input;
        self
    }
    /// <p>The ID of the user.</p>
    pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.user_id
    }
    /// <p>The given name of the user.</p>
    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>
    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 type of the user.</p>
    pub fn r#type(mut self, input: crate::types::UserType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of the user.</p>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::UserType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The type of the user.</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::UserType> {
        &self.r#type
    }
    /// <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>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 locale of the user.</p>
    pub fn locale(mut self, input: crate::types::LocaleType) -> Self {
        self.locale = ::std::option::Option::Some(input);
        self
    }
    /// <p>The locale of the user.</p>
    pub fn set_locale(mut self, input: ::std::option::Option<crate::types::LocaleType>) -> Self {
        self.locale = input;
        self
    }
    /// <p>The locale of the user.</p>
    pub fn get_locale(&self) -> &::std::option::Option<crate::types::LocaleType> {
        &self.locale
    }
    /// <p>Boolean value to determine whether the user is granted Power user privileges.</p>
    pub fn grant_poweruser_privileges(mut self, input: crate::types::BooleanEnumType) -> Self {
        self.grant_poweruser_privileges = ::std::option::Option::Some(input);
        self
    }
    /// <p>Boolean value to determine whether the user is granted Power user privileges.</p>
    pub fn set_grant_poweruser_privileges(mut self, input: ::std::option::Option<crate::types::BooleanEnumType>) -> Self {
        self.grant_poweruser_privileges = input;
        self
    }
    /// <p>Boolean value to determine whether the user is granted Power user privileges.</p>
    pub fn get_grant_poweruser_privileges(&self) -> &::std::option::Option<crate::types::BooleanEnumType> {
        &self.grant_poweruser_privileges
    }
    /// Consumes the builder and constructs a [`UpdateUserInput`](crate::operation::update_user::UpdateUserInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::update_user::UpdateUserInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_user::UpdateUserInput {
            authentication_token: self.authentication_token,
            user_id: self.user_id,
            given_name: self.given_name,
            surname: self.surname,
            r#type: self.r#type,
            storage_rule: self.storage_rule,
            time_zone_id: self.time_zone_id,
            locale: self.locale,
            grant_poweruser_privileges: self.grant_poweruser_privileges,
        })
    }
}
impl ::std::fmt::Debug for UpdateUserInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateUserInputBuilder");
        formatter.field("authentication_token", &"*** Sensitive Data Redacted ***");
        formatter.field("user_id", &self.user_id);
        formatter.field("given_name", &"*** Sensitive Data Redacted ***");
        formatter.field("surname", &"*** Sensitive Data Redacted ***");
        formatter.field("r#type", &self.r#type);
        formatter.field("storage_rule", &self.storage_rule);
        formatter.field("time_zone_id", &self.time_zone_id);
        formatter.field("locale", &self.locale);
        formatter.field("grant_poweruser_privileges", &self.grant_poweruser_privileges);
        formatter.finish()
    }
}