aws-sdk-quicksight 1.134.0

AWS SDK for Amazon QuickSight
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>///////////////////////// /////////////////////////</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetIdentityContextInput {
    /// <p>The ID for the Amazon Web Services account that the user whose identity context you want to retrieve is in. Currently, you use the ID for the Amazon Web Services account that contains your Quick Sight account.</p>
    pub aws_account_id: ::std::option::Option<::std::string::String>,
    /// <p>The identifier for the user whose identity context you want to retrieve.</p>
    pub user_identifier: ::std::option::Option<crate::types::UserIdentifier>,
    /// <p>The namespace of the user that you want to get identity context for. This parameter is required when the UserIdentifier is specified using Email or UserName.</p>
    pub namespace: ::std::option::Option<::std::string::String>,
    /// <p>The timestamp at which the session will expire.</p>
    pub session_expires_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The region in which the context is to be used. Use this parameter to obtain an identity context for cross-region use.</p>
    /// <p>The specified region must meet the following conditions:</p>
    /// <ul>
    /// <li>
    /// <p>The region must be in the same Amazon Web Services partition as the region you are calling from. Cross-partition requests are not supported. For example, you cannot specify a region in the <code>aws-cn</code> partition when calling from a region in the <code>aws</code> partition.</p></li>
    /// <li>
    /// <p>It must be a valid Amazon QuickSight supported region.</p></li>
    /// <li>
    /// <p>The calling customer account must be enabled in the specified context region.</p></li>
    /// <li>
    /// <p>This parameter is not supported when calling from an opt-in region.</p></li>
    /// </ul>
    pub context_region: ::std::option::Option<::std::string::String>,
}
impl GetIdentityContextInput {
    /// <p>The ID for the Amazon Web Services account that the user whose identity context you want to retrieve is in. Currently, you use the ID for the Amazon Web Services account that contains your Quick Sight account.</p>
    pub fn aws_account_id(&self) -> ::std::option::Option<&str> {
        self.aws_account_id.as_deref()
    }
    /// <p>The identifier for the user whose identity context you want to retrieve.</p>
    pub fn user_identifier(&self) -> ::std::option::Option<&crate::types::UserIdentifier> {
        self.user_identifier.as_ref()
    }
    /// <p>The namespace of the user that you want to get identity context for. This parameter is required when the UserIdentifier is specified using Email or UserName.</p>
    pub fn namespace(&self) -> ::std::option::Option<&str> {
        self.namespace.as_deref()
    }
    /// <p>The timestamp at which the session will expire.</p>
    pub fn session_expires_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.session_expires_at.as_ref()
    }
    /// <p>The region in which the context is to be used. Use this parameter to obtain an identity context for cross-region use.</p>
    /// <p>The specified region must meet the following conditions:</p>
    /// <ul>
    /// <li>
    /// <p>The region must be in the same Amazon Web Services partition as the region you are calling from. Cross-partition requests are not supported. For example, you cannot specify a region in the <code>aws-cn</code> partition when calling from a region in the <code>aws</code> partition.</p></li>
    /// <li>
    /// <p>It must be a valid Amazon QuickSight supported region.</p></li>
    /// <li>
    /// <p>The calling customer account must be enabled in the specified context region.</p></li>
    /// <li>
    /// <p>This parameter is not supported when calling from an opt-in region.</p></li>
    /// </ul>
    pub fn context_region(&self) -> ::std::option::Option<&str> {
        self.context_region.as_deref()
    }
}
impl GetIdentityContextInput {
    /// Creates a new builder-style object to manufacture [`GetIdentityContextInput`](crate::operation::get_identity_context::GetIdentityContextInput).
    pub fn builder() -> crate::operation::get_identity_context::builders::GetIdentityContextInputBuilder {
        crate::operation::get_identity_context::builders::GetIdentityContextInputBuilder::default()
    }
}

/// A builder for [`GetIdentityContextInput`](crate::operation::get_identity_context::GetIdentityContextInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetIdentityContextInputBuilder {
    pub(crate) aws_account_id: ::std::option::Option<::std::string::String>,
    pub(crate) user_identifier: ::std::option::Option<crate::types::UserIdentifier>,
    pub(crate) namespace: ::std::option::Option<::std::string::String>,
    pub(crate) session_expires_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) context_region: ::std::option::Option<::std::string::String>,
}
impl GetIdentityContextInputBuilder {
    /// <p>The ID for the Amazon Web Services account that the user whose identity context you want to retrieve is in. Currently, you use the ID for the Amazon Web Services account that contains your Quick Sight account.</p>
    /// This field is required.
    pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.aws_account_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID for the Amazon Web Services account that the user whose identity context you want to retrieve is in. Currently, you use the ID for the Amazon Web Services account that contains your Quick Sight account.</p>
    pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.aws_account_id = input;
        self
    }
    /// <p>The ID for the Amazon Web Services account that the user whose identity context you want to retrieve is in. Currently, you use the ID for the Amazon Web Services account that contains your Quick Sight account.</p>
    pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.aws_account_id
    }
    /// <p>The identifier for the user whose identity context you want to retrieve.</p>
    /// This field is required.
    pub fn user_identifier(mut self, input: crate::types::UserIdentifier) -> Self {
        self.user_identifier = ::std::option::Option::Some(input);
        self
    }
    /// <p>The identifier for the user whose identity context you want to retrieve.</p>
    pub fn set_user_identifier(mut self, input: ::std::option::Option<crate::types::UserIdentifier>) -> Self {
        self.user_identifier = input;
        self
    }
    /// <p>The identifier for the user whose identity context you want to retrieve.</p>
    pub fn get_user_identifier(&self) -> &::std::option::Option<crate::types::UserIdentifier> {
        &self.user_identifier
    }
    /// <p>The namespace of the user that you want to get identity context for. This parameter is required when the UserIdentifier is specified using Email or UserName.</p>
    pub fn namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.namespace = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The namespace of the user that you want to get identity context for. This parameter is required when the UserIdentifier is specified using Email or UserName.</p>
    pub fn set_namespace(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.namespace = input;
        self
    }
    /// <p>The namespace of the user that you want to get identity context for. This parameter is required when the UserIdentifier is specified using Email or UserName.</p>
    pub fn get_namespace(&self) -> &::std::option::Option<::std::string::String> {
        &self.namespace
    }
    /// <p>The timestamp at which the session will expire.</p>
    pub fn session_expires_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.session_expires_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp at which the session will expire.</p>
    pub fn set_session_expires_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.session_expires_at = input;
        self
    }
    /// <p>The timestamp at which the session will expire.</p>
    pub fn get_session_expires_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.session_expires_at
    }
    /// <p>The region in which the context is to be used. Use this parameter to obtain an identity context for cross-region use.</p>
    /// <p>The specified region must meet the following conditions:</p>
    /// <ul>
    /// <li>
    /// <p>The region must be in the same Amazon Web Services partition as the region you are calling from. Cross-partition requests are not supported. For example, you cannot specify a region in the <code>aws-cn</code> partition when calling from a region in the <code>aws</code> partition.</p></li>
    /// <li>
    /// <p>It must be a valid Amazon QuickSight supported region.</p></li>
    /// <li>
    /// <p>The calling customer account must be enabled in the specified context region.</p></li>
    /// <li>
    /// <p>This parameter is not supported when calling from an opt-in region.</p></li>
    /// </ul>
    pub fn context_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.context_region = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The region in which the context is to be used. Use this parameter to obtain an identity context for cross-region use.</p>
    /// <p>The specified region must meet the following conditions:</p>
    /// <ul>
    /// <li>
    /// <p>The region must be in the same Amazon Web Services partition as the region you are calling from. Cross-partition requests are not supported. For example, you cannot specify a region in the <code>aws-cn</code> partition when calling from a region in the <code>aws</code> partition.</p></li>
    /// <li>
    /// <p>It must be a valid Amazon QuickSight supported region.</p></li>
    /// <li>
    /// <p>The calling customer account must be enabled in the specified context region.</p></li>
    /// <li>
    /// <p>This parameter is not supported when calling from an opt-in region.</p></li>
    /// </ul>
    pub fn set_context_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.context_region = input;
        self
    }
    /// <p>The region in which the context is to be used. Use this parameter to obtain an identity context for cross-region use.</p>
    /// <p>The specified region must meet the following conditions:</p>
    /// <ul>
    /// <li>
    /// <p>The region must be in the same Amazon Web Services partition as the region you are calling from. Cross-partition requests are not supported. For example, you cannot specify a region in the <code>aws-cn</code> partition when calling from a region in the <code>aws</code> partition.</p></li>
    /// <li>
    /// <p>It must be a valid Amazon QuickSight supported region.</p></li>
    /// <li>
    /// <p>The calling customer account must be enabled in the specified context region.</p></li>
    /// <li>
    /// <p>This parameter is not supported when calling from an opt-in region.</p></li>
    /// </ul>
    pub fn get_context_region(&self) -> &::std::option::Option<::std::string::String> {
        &self.context_region
    }
    /// Consumes the builder and constructs a [`GetIdentityContextInput`](crate::operation::get_identity_context::GetIdentityContextInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_identity_context::GetIdentityContextInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::get_identity_context::GetIdentityContextInput {
            aws_account_id: self.aws_account_id,
            user_identifier: self.user_identifier,
            namespace: self.namespace,
            session_expires_at: self.session_expires_at,
            context_region: self.context_region,
        })
    }
}