aws-sdk-datazone 1.136.0

AWS SDK for Amazon DataZone
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, ::std::fmt::Debug)]
pub struct CreateUserProfileInput {
    /// <p>The identifier of the Amazon DataZone domain in which a user profile is created.</p>
    pub domain_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The identifier of the user for which the user profile is created.</p>
    pub user_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The user type of the user for which the user profile is created.</p>
    pub user_type: ::std::option::Option<crate::types::UserType>,
    /// <p>The session name for IAM role sessions.</p>
    pub session_name: ::std::option::Option<::std::string::String>,
    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
}
impl CreateUserProfileInput {
    /// <p>The identifier of the Amazon DataZone domain in which a user profile is created.</p>
    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
        self.domain_identifier.as_deref()
    }
    /// <p>The identifier of the user for which the user profile is created.</p>
    pub fn user_identifier(&self) -> ::std::option::Option<&str> {
        self.user_identifier.as_deref()
    }
    /// <p>The user type of the user for which the user profile is created.</p>
    pub fn user_type(&self) -> ::std::option::Option<&crate::types::UserType> {
        self.user_type.as_ref()
    }
    /// <p>The session name for IAM role sessions.</p>
    pub fn session_name(&self) -> ::std::option::Option<&str> {
        self.session_name.as_deref()
    }
    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
}
impl CreateUserProfileInput {
    /// Creates a new builder-style object to manufacture [`CreateUserProfileInput`](crate::operation::create_user_profile::CreateUserProfileInput).
    pub fn builder() -> crate::operation::create_user_profile::builders::CreateUserProfileInputBuilder {
        crate::operation::create_user_profile::builders::CreateUserProfileInputBuilder::default()
    }
}

/// A builder for [`CreateUserProfileInput`](crate::operation::create_user_profile::CreateUserProfileInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateUserProfileInputBuilder {
    pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) user_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) user_type: ::std::option::Option<crate::types::UserType>,
    pub(crate) session_name: ::std::option::Option<::std::string::String>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl CreateUserProfileInputBuilder {
    /// <p>The identifier of the Amazon DataZone domain in which a user profile is created.</p>
    /// This field is required.
    pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the Amazon DataZone domain in which a user profile is created.</p>
    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_identifier = input;
        self
    }
    /// <p>The identifier of the Amazon DataZone domain in which a user profile is created.</p>
    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_identifier
    }
    /// <p>The identifier of the user for which the user profile is created.</p>
    /// This field is required.
    pub fn user_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.user_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the user for which the user profile is created.</p>
    pub fn set_user_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.user_identifier = input;
        self
    }
    /// <p>The identifier of the user for which the user profile is created.</p>
    pub fn get_user_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.user_identifier
    }
    /// <p>The user type of the user for which the user profile is created.</p>
    pub fn user_type(mut self, input: crate::types::UserType) -> Self {
        self.user_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The user type of the user for which the user profile is created.</p>
    pub fn set_user_type(mut self, input: ::std::option::Option<crate::types::UserType>) -> Self {
        self.user_type = input;
        self
    }
    /// <p>The user type of the user for which the user profile is created.</p>
    pub fn get_user_type(&self) -> &::std::option::Option<crate::types::UserType> {
        &self.user_type
    }
    /// <p>The session name for IAM role sessions.</p>
    pub fn session_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.session_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The session name for IAM role sessions.</p>
    pub fn set_session_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.session_name = input;
        self
    }
    /// <p>The session name for IAM role sessions.</p>
    pub fn get_session_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.session_name
    }
    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Consumes the builder and constructs a [`CreateUserProfileInput`](crate::operation::create_user_profile::CreateUserProfileInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_user_profile::CreateUserProfileInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_user_profile::CreateUserProfileInput {
            domain_identifier: self.domain_identifier,
            user_identifier: self.user_identifier,
            user_type: self.user_type,
            session_name: self.session_name,
            client_token: self.client_token,
        })
    }
}