// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>This structure contains Amazon Web Services-specific parameter extensions and the <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/trustedidentitypropagation-overview.html">identity context</a>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AwsAdditionalDetails {
    /// <p>The trusted context assertion is signed and encrypted by STS. It provides access to <code>sts:identity_context</code> claim in the <code>idToken</code> without JWT parsing</p>
    /// <p>Identity context comprises information that Amazon Web Services services use to make authorization decisions when they receive requests.</p>
    pub identity_context: ::std::option::Option<::std::string::String>,
}
impl AwsAdditionalDetails {
    /// <p>The trusted context assertion is signed and encrypted by STS. It provides access to <code>sts:identity_context</code> claim in the <code>idToken</code> without JWT parsing</p>
    /// <p>Identity context comprises information that Amazon Web Services services use to make authorization decisions when they receive requests.</p>
    pub fn identity_context(&self) -> ::std::option::Option<&str> {
        self.identity_context.as_deref()
    }
}
impl AwsAdditionalDetails {
    /// Creates a new builder-style object to manufacture [`AwsAdditionalDetails`](crate::types::AwsAdditionalDetails).
    pub fn builder() -> crate::types::builders::AwsAdditionalDetailsBuilder {
        crate::types::builders::AwsAdditionalDetailsBuilder::default()
    }
}

/// A builder for [`AwsAdditionalDetails`](crate::types::AwsAdditionalDetails).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AwsAdditionalDetailsBuilder {
    pub(crate) identity_context: ::std::option::Option<::std::string::String>,
}
impl AwsAdditionalDetailsBuilder {
    /// <p>The trusted context assertion is signed and encrypted by STS. It provides access to <code>sts:identity_context</code> claim in the <code>idToken</code> without JWT parsing</p>
    /// <p>Identity context comprises information that Amazon Web Services services use to make authorization decisions when they receive requests.</p>
    pub fn identity_context(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.identity_context = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The trusted context assertion is signed and encrypted by STS. It provides access to <code>sts:identity_context</code> claim in the <code>idToken</code> without JWT parsing</p>
    /// <p>Identity context comprises information that Amazon Web Services services use to make authorization decisions when they receive requests.</p>
    pub fn set_identity_context(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.identity_context = input;
        self
    }
    /// <p>The trusted context assertion is signed and encrypted by STS. It provides access to <code>sts:identity_context</code> claim in the <code>idToken</code> without JWT parsing</p>
    /// <p>Identity context comprises information that Amazon Web Services services use to make authorization decisions when they receive requests.</p>
    pub fn get_identity_context(&self) -> &::std::option::Option<::std::string::String> {
        &self.identity_context
    }
    /// Consumes the builder and constructs a [`AwsAdditionalDetails`](crate::types::AwsAdditionalDetails).
    pub fn build(self) -> crate::types::AwsAdditionalDetails {
        crate::types::AwsAdditionalDetails {
            identity_context: self.identity_context,
        }
    }
}
