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 GetUserProfileInput {
    /// <p>the ID of the Amazon DataZone domain the data portal of which you want to get.</p>
    pub domain_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The identifier of the user for which you want to get the user profile.</p>
    pub user_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The type of the user profile.</p>
    pub r#type: ::std::option::Option<crate::types::UserProfileType>,
    /// <p>The session name for IAM role sessions.</p>
    pub session_name: ::std::option::Option<::std::string::String>,
}
impl GetUserProfileInput {
    /// <p>the ID of the Amazon DataZone domain the data portal of which you want to get.</p>
    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
        self.domain_identifier.as_deref()
    }
    /// <p>The identifier of the user for which you want to get the user profile.</p>
    pub fn user_identifier(&self) -> ::std::option::Option<&str> {
        self.user_identifier.as_deref()
    }
    /// <p>The type of the user profile.</p>
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::UserProfileType> {
        self.r#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()
    }
}
impl GetUserProfileInput {
    /// Creates a new builder-style object to manufacture [`GetUserProfileInput`](crate::operation::get_user_profile::GetUserProfileInput).
    pub fn builder() -> crate::operation::get_user_profile::builders::GetUserProfileInputBuilder {
        crate::operation::get_user_profile::builders::GetUserProfileInputBuilder::default()
    }
}

/// A builder for [`GetUserProfileInput`](crate::operation::get_user_profile::GetUserProfileInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetUserProfileInputBuilder {
    pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) user_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) r#type: ::std::option::Option<crate::types::UserProfileType>,
    pub(crate) session_name: ::std::option::Option<::std::string::String>,
}
impl GetUserProfileInputBuilder {
    /// <p>the ID of the Amazon DataZone domain the data portal of which you want to get.</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 ID of the Amazon DataZone domain the data portal of which you want to get.</p>
    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_identifier = input;
        self
    }
    /// <p>the ID of the Amazon DataZone domain the data portal of which you want to get.</p>
    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_identifier
    }
    /// <p>The identifier of the user for which you want to get the user profile.</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 you want to get the user profile.</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 you want to get the user profile.</p>
    pub fn get_user_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.user_identifier
    }
    /// <p>The type of the user profile.</p>
    pub fn r#type(mut self, input: crate::types::UserProfileType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of the user profile.</p>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::UserProfileType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The type of the user profile.</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::UserProfileType> {
        &self.r#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
    }
    /// Consumes the builder and constructs a [`GetUserProfileInput`](crate::operation::get_user_profile::GetUserProfileInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_user_profile::GetUserProfileInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_user_profile::GetUserProfileInput {
            domain_identifier: self.domain_identifier,
            user_identifier: self.user_identifier,
            r#type: self.r#type,
            session_name: self.session_name,
        })
    }
}