aws-sdk-rolesanywhere 0.9.0

AWS SDK for IAM Roles Anywhere
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The state of the trust anchor after a read or write operation. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TrustAnchorDetail {
    /// <p>The unique identifier of the trust anchor.</p>
    #[doc(hidden)]
    pub trust_anchor_id: std::option::Option<std::string::String>,
    /// <p>The ARN of the trust anchor.</p>
    #[doc(hidden)]
    pub trust_anchor_arn: std::option::Option<std::string::String>,
    /// <p>The name of the trust anchor.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>The trust anchor type and its related certificate data.</p>
    #[doc(hidden)]
    pub source: std::option::Option<crate::model::Source>,
    /// <p>Indicates whether the trust anchor is enabled.</p>
    #[doc(hidden)]
    pub enabled: std::option::Option<bool>,
    /// <p>The ISO-8601 timestamp when the trust anchor was created. </p>
    #[doc(hidden)]
    pub created_at: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The ISO-8601 timestamp when the trust anchor was last updated. </p>
    #[doc(hidden)]
    pub updated_at: std::option::Option<aws_smithy_types::DateTime>,
}
impl TrustAnchorDetail {
    /// <p>The unique identifier of the trust anchor.</p>
    pub fn trust_anchor_id(&self) -> std::option::Option<&str> {
        self.trust_anchor_id.as_deref()
    }
    /// <p>The ARN of the trust anchor.</p>
    pub fn trust_anchor_arn(&self) -> std::option::Option<&str> {
        self.trust_anchor_arn.as_deref()
    }
    /// <p>The name of the trust anchor.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The trust anchor type and its related certificate data.</p>
    pub fn source(&self) -> std::option::Option<&crate::model::Source> {
        self.source.as_ref()
    }
    /// <p>Indicates whether the trust anchor is enabled.</p>
    pub fn enabled(&self) -> std::option::Option<bool> {
        self.enabled
    }
    /// <p>The ISO-8601 timestamp when the trust anchor was created. </p>
    pub fn created_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
    /// <p>The ISO-8601 timestamp when the trust anchor was last updated. </p>
    pub fn updated_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.updated_at.as_ref()
    }
}
/// See [`TrustAnchorDetail`](crate::model::TrustAnchorDetail).
pub mod trust_anchor_detail {

    /// A builder for [`TrustAnchorDetail`](crate::model::TrustAnchorDetail).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) trust_anchor_id: std::option::Option<std::string::String>,
        pub(crate) trust_anchor_arn: std::option::Option<std::string::String>,
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) source: std::option::Option<crate::model::Source>,
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) created_at: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) updated_at: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>The unique identifier of the trust anchor.</p>
        pub fn trust_anchor_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.trust_anchor_id = Some(input.into());
            self
        }
        /// <p>The unique identifier of the trust anchor.</p>
        pub fn set_trust_anchor_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.trust_anchor_id = input;
            self
        }
        /// <p>The ARN of the trust anchor.</p>
        pub fn trust_anchor_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.trust_anchor_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the trust anchor.</p>
        pub fn set_trust_anchor_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.trust_anchor_arn = input;
            self
        }
        /// <p>The name of the trust anchor.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the trust anchor.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>The trust anchor type and its related certificate data.</p>
        pub fn source(mut self, input: crate::model::Source) -> Self {
            self.source = Some(input);
            self
        }
        /// <p>The trust anchor type and its related certificate data.</p>
        pub fn set_source(mut self, input: std::option::Option<crate::model::Source>) -> Self {
            self.source = input;
            self
        }
        /// <p>Indicates whether the trust anchor is enabled.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Indicates whether the trust anchor is enabled.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>The ISO-8601 timestamp when the trust anchor was created. </p>
        pub fn created_at(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.created_at = Some(input);
            self
        }
        /// <p>The ISO-8601 timestamp when the trust anchor was created. </p>
        pub fn set_created_at(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.created_at = input;
            self
        }
        /// <p>The ISO-8601 timestamp when the trust anchor was last updated. </p>
        pub fn updated_at(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.updated_at = Some(input);
            self
        }
        /// <p>The ISO-8601 timestamp when the trust anchor was last updated. </p>
        pub fn set_updated_at(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.updated_at = input;
            self
        }
        /// Consumes the builder and constructs a [`TrustAnchorDetail`](crate::model::TrustAnchorDetail).
        pub fn build(self) -> crate::model::TrustAnchorDetail {
            crate::model::TrustAnchorDetail {
                trust_anchor_id: self.trust_anchor_id,
                trust_anchor_arn: self.trust_anchor_arn,
                name: self.name,
                source: self.source,
                enabled: self.enabled,
                created_at: self.created_at,
                updated_at: self.updated_at,
            }
        }
    }
}
impl TrustAnchorDetail {
    /// Creates a new builder-style object to manufacture [`TrustAnchorDetail`](crate::model::TrustAnchorDetail).
    pub fn builder() -> crate::model::trust_anchor_detail::Builder {
        crate::model::trust_anchor_detail::Builder::default()
    }
}

/// <p>The trust anchor type and its related certificate data.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Source {
    /// <p>The type of the trust anchor. </p>
    #[doc(hidden)]
    pub source_type: std::option::Option<crate::model::TrustAnchorType>,
    /// <p>The data field of the trust anchor depending on its type. </p>
    #[doc(hidden)]
    pub source_data: std::option::Option<crate::model::SourceData>,
}
impl Source {
    /// <p>The type of the trust anchor. </p>
    pub fn source_type(&self) -> std::option::Option<&crate::model::TrustAnchorType> {
        self.source_type.as_ref()
    }
    /// <p>The data field of the trust anchor depending on its type. </p>
    pub fn source_data(&self) -> std::option::Option<&crate::model::SourceData> {
        self.source_data.as_ref()
    }
}
/// See [`Source`](crate::model::Source).
pub mod source {

    /// A builder for [`Source`](crate::model::Source).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) source_type: std::option::Option<crate::model::TrustAnchorType>,
        pub(crate) source_data: std::option::Option<crate::model::SourceData>,
    }
    impl Builder {
        /// <p>The type of the trust anchor. </p>
        pub fn source_type(mut self, input: crate::model::TrustAnchorType) -> Self {
            self.source_type = Some(input);
            self
        }
        /// <p>The type of the trust anchor. </p>
        pub fn set_source_type(
            mut self,
            input: std::option::Option<crate::model::TrustAnchorType>,
        ) -> Self {
            self.source_type = input;
            self
        }
        /// <p>The data field of the trust anchor depending on its type. </p>
        pub fn source_data(mut self, input: crate::model::SourceData) -> Self {
            self.source_data = Some(input);
            self
        }
        /// <p>The data field of the trust anchor depending on its type. </p>
        pub fn set_source_data(
            mut self,
            input: std::option::Option<crate::model::SourceData>,
        ) -> Self {
            self.source_data = input;
            self
        }
        /// Consumes the builder and constructs a [`Source`](crate::model::Source).
        pub fn build(self) -> crate::model::Source {
            crate::model::Source {
                source_type: self.source_type,
                source_data: self.source_data,
            }
        }
    }
}
impl Source {
    /// Creates a new builder-style object to manufacture [`Source`](crate::model::Source).
    pub fn builder() -> crate::model::source::Builder {
        crate::model::source::Builder::default()
    }
}

/// <p>The data field of the trust anchor depending on its type. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub enum SourceData {
    /// <p>The root certificate of the Certificate Manager Private Certificate Authority specified by this ARN is used in trust validation for <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operations. Included for trust anchors of type <code>AWS_ACM_PCA</code>. </p>
    AcmPcaArn(std::string::String),
    /// <p>The PEM-encoded data for the certificate anchor. Included for trust anchors of type <code>CERTIFICATE_BUNDLE</code>. </p>
    X509CertificateData(std::string::String),
    /// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
    /// An unknown enum variant
    ///
    /// _Note: If you encounter this error, consider upgrading your SDK to the latest version._
    /// The `Unknown` variant represents cases where the server sent a value that wasn't recognized
    /// by the client. This can happen when the server adds new functionality, but the client has not been updated.
    /// To investigate this, consider turning on debug logging to print the raw HTTP response.
    #[non_exhaustive]
    Unknown,
}
impl SourceData {
    /// Tries to convert the enum instance into [`AcmPcaArn`](crate::model::SourceData::AcmPcaArn), extracting the inner [`String`](std::string::String).
    /// Returns `Err(&Self)` if it can't be converted.
    pub fn as_acm_pca_arn(&self) -> std::result::Result<&std::string::String, &Self> {
        if let SourceData::AcmPcaArn(val) = &self {
            Ok(val)
        } else {
            Err(self)
        }
    }
    /// Returns true if this is a [`AcmPcaArn`](crate::model::SourceData::AcmPcaArn).
    pub fn is_acm_pca_arn(&self) -> bool {
        self.as_acm_pca_arn().is_ok()
    }
    /// Tries to convert the enum instance into [`X509CertificateData`](crate::model::SourceData::X509CertificateData), extracting the inner [`String`](std::string::String).
    /// Returns `Err(&Self)` if it can't be converted.
    pub fn as_x509_certificate_data(&self) -> std::result::Result<&std::string::String, &Self> {
        if let SourceData::X509CertificateData(val) = &self {
            Ok(val)
        } else {
            Err(self)
        }
    }
    /// Returns true if this is a [`X509CertificateData`](crate::model::SourceData::X509CertificateData).
    pub fn is_x509_certificate_data(&self) -> bool {
        self.as_x509_certificate_data().is_ok()
    }
    /// Returns true if the enum instance is the `Unknown` variant.
    pub fn is_unknown(&self) -> bool {
        matches!(self, Self::Unknown)
    }
}

/// When writing a match expression against `TrustAnchorType`, it is important to ensure
/// your code is forward-compatible. That is, if a match arm handles a case for a
/// feature that is supported by the service but has not been represented as an enum
/// variant in a current version of SDK, your code should continue to work when you
/// upgrade SDK to a future version in which the enum does include a variant for that
/// feature.
///
/// Here is an example of how you can make a match expression forward-compatible:
///
/// ```text
/// # let trustanchortype = unimplemented!();
/// match trustanchortype {
///     TrustAnchorType::AwsAcmPca => { /* ... */ },
///     TrustAnchorType::CertificateBundle => { /* ... */ },
///     TrustAnchorType::SelfSignedRepository => { /* ... */ },
///     other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
///     _ => { /* ... */ },
/// }
/// ```
/// The above code demonstrates that when `trustanchortype` represents
/// `NewFeature`, the execution path will lead to the second last match arm,
/// even though the enum does not contain a variant `TrustAnchorType::NewFeature`
/// in the current version of SDK. The reason is that the variable `other`,
/// created by the `@` operator, is bound to
/// `TrustAnchorType::Unknown(UnknownVariantValue("NewFeature".to_owned()))`
/// and calling `as_str` on it yields `"NewFeature"`.
/// This match expression is forward-compatible when executed with a newer
/// version of SDK where the variant `TrustAnchorType::NewFeature` is defined.
/// Specifically, when `trustanchortype` represents `NewFeature`,
/// the execution path will hit the second last match arm as before by virtue of
/// calling `as_str` on `TrustAnchorType::NewFeature` also yielding `"NewFeature"`.
///
/// Explicitly matching on the `Unknown` variant should
/// be avoided for two reasons:
/// - The inner data `UnknownVariantValue` is opaque, and no further information can be extracted.
/// - It might inadvertently shadow other intended match arms.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum TrustAnchorType {
    #[allow(missing_docs)] // documentation missing in model
    AwsAcmPca,
    #[allow(missing_docs)] // documentation missing in model
    CertificateBundle,
    #[allow(missing_docs)] // documentation missing in model
    SelfSignedRepository,
    /// `Unknown` contains new variants that have been added since this code was generated.
    Unknown(crate::types::UnknownVariantValue),
}
impl std::convert::From<&str> for TrustAnchorType {
    fn from(s: &str) -> Self {
        match s {
            "AWS_ACM_PCA" => TrustAnchorType::AwsAcmPca,
            "CERTIFICATE_BUNDLE" => TrustAnchorType::CertificateBundle,
            "SELF_SIGNED_REPOSITORY" => TrustAnchorType::SelfSignedRepository,
            other => TrustAnchorType::Unknown(crate::types::UnknownVariantValue(other.to_owned())),
        }
    }
}
impl std::str::FromStr for TrustAnchorType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TrustAnchorType::from(s))
    }
}
impl TrustAnchorType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TrustAnchorType::AwsAcmPca => "AWS_ACM_PCA",
            TrustAnchorType::CertificateBundle => "CERTIFICATE_BUNDLE",
            TrustAnchorType::SelfSignedRepository => "SELF_SIGNED_REPOSITORY",
            TrustAnchorType::Unknown(value) => value.as_str(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub const fn values() -> &'static [&'static str] {
        &[
            "AWS_ACM_PCA",
            "CERTIFICATE_BUNDLE",
            "SELF_SIGNED_REPOSITORY",
        ]
    }
}
impl AsRef<str> for TrustAnchorType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>A label that consists of a key and value you define. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Tag {
    /// <p>The tag key.</p>
    #[doc(hidden)]
    pub key: std::option::Option<std::string::String>,
    /// <p>The tag value.</p>
    #[doc(hidden)]
    pub value: std::option::Option<std::string::String>,
}
impl Tag {
    /// <p>The tag key.</p>
    pub fn key(&self) -> std::option::Option<&str> {
        self.key.as_deref()
    }
    /// <p>The tag value.</p>
    pub fn value(&self) -> std::option::Option<&str> {
        self.value.as_deref()
    }
}
impl std::fmt::Debug for Tag {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("Tag");
        formatter.field("key", &"*** Sensitive Data Redacted ***");
        formatter.field("value", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
/// See [`Tag`](crate::model::Tag).
pub mod tag {

    /// A builder for [`Tag`](crate::model::Tag).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default)]
    pub struct Builder {
        pub(crate) key: std::option::Option<std::string::String>,
        pub(crate) value: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The tag key.</p>
        pub fn key(mut self, input: impl Into<std::string::String>) -> Self {
            self.key = Some(input.into());
            self
        }
        /// <p>The tag key.</p>
        pub fn set_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.key = input;
            self
        }
        /// <p>The tag value.</p>
        pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
            self.value = Some(input.into());
            self
        }
        /// <p>The tag value.</p>
        pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`Tag`](crate::model::Tag).
        pub fn build(self) -> crate::model::Tag {
            crate::model::Tag {
                key: self.key,
                value: self.value,
            }
        }
    }
    impl std::fmt::Debug for Builder {
        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
            let mut formatter = f.debug_struct("Builder");
            formatter.field("key", &"*** Sensitive Data Redacted ***");
            formatter.field("value", &"*** Sensitive Data Redacted ***");
            formatter.finish()
        }
    }
}
impl Tag {
    /// Creates a new builder-style object to manufacture [`Tag`](crate::model::Tag).
    pub fn builder() -> crate::model::tag::Builder {
        crate::model::tag::Builder::default()
    }
}

/// <p>A summary representation of Subject resources returned in read operations; primarily ListSubjects.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SubjectSummary {
    /// <p>The ARN of the resource.</p>
    #[doc(hidden)]
    pub subject_arn: std::option::Option<std::string::String>,
    /// <p>The id of the resource.</p>
    #[doc(hidden)]
    pub subject_id: std::option::Option<std::string::String>,
    /// <p>The enabled status of the Subject. </p>
    #[doc(hidden)]
    pub enabled: std::option::Option<bool>,
    /// <p>The x509 principal identifier of the authenticating certificate.</p>
    #[doc(hidden)]
    pub x509_subject: std::option::Option<std::string::String>,
    /// <p>The ISO-8601 time stamp of when the certificate was last used in a <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operation.</p>
    #[doc(hidden)]
    pub last_seen_at: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The ISO-8601 time stamp of when the certificate was first used in a <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operation.</p>
    #[doc(hidden)]
    pub created_at: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The ISO-8601 timestamp when the subject was last updated. </p>
    #[doc(hidden)]
    pub updated_at: std::option::Option<aws_smithy_types::DateTime>,
}
impl SubjectSummary {
    /// <p>The ARN of the resource.</p>
    pub fn subject_arn(&self) -> std::option::Option<&str> {
        self.subject_arn.as_deref()
    }
    /// <p>The id of the resource.</p>
    pub fn subject_id(&self) -> std::option::Option<&str> {
        self.subject_id.as_deref()
    }
    /// <p>The enabled status of the Subject. </p>
    pub fn enabled(&self) -> std::option::Option<bool> {
        self.enabled
    }
    /// <p>The x509 principal identifier of the authenticating certificate.</p>
    pub fn x509_subject(&self) -> std::option::Option<&str> {
        self.x509_subject.as_deref()
    }
    /// <p>The ISO-8601 time stamp of when the certificate was last used in a <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operation.</p>
    pub fn last_seen_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.last_seen_at.as_ref()
    }
    /// <p>The ISO-8601 time stamp of when the certificate was first used in a <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operation.</p>
    pub fn created_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
    /// <p>The ISO-8601 timestamp when the subject was last updated. </p>
    pub fn updated_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.updated_at.as_ref()
    }
}
/// See [`SubjectSummary`](crate::model::SubjectSummary).
pub mod subject_summary {

    /// A builder for [`SubjectSummary`](crate::model::SubjectSummary).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) subject_arn: std::option::Option<std::string::String>,
        pub(crate) subject_id: std::option::Option<std::string::String>,
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) x509_subject: std::option::Option<std::string::String>,
        pub(crate) last_seen_at: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) created_at: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) updated_at: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>The ARN of the resource.</p>
        pub fn subject_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.subject_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the resource.</p>
        pub fn set_subject_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subject_arn = input;
            self
        }
        /// <p>The id of the resource.</p>
        pub fn subject_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.subject_id = Some(input.into());
            self
        }
        /// <p>The id of the resource.</p>
        pub fn set_subject_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subject_id = input;
            self
        }
        /// <p>The enabled status of the Subject. </p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>The enabled status of the Subject. </p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>The x509 principal identifier of the authenticating certificate.</p>
        pub fn x509_subject(mut self, input: impl Into<std::string::String>) -> Self {
            self.x509_subject = Some(input.into());
            self
        }
        /// <p>The x509 principal identifier of the authenticating certificate.</p>
        pub fn set_x509_subject(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.x509_subject = input;
            self
        }
        /// <p>The ISO-8601 time stamp of when the certificate was last used in a <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operation.</p>
        pub fn last_seen_at(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.last_seen_at = Some(input);
            self
        }
        /// <p>The ISO-8601 time stamp of when the certificate was last used in a <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operation.</p>
        pub fn set_last_seen_at(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.last_seen_at = input;
            self
        }
        /// <p>The ISO-8601 time stamp of when the certificate was first used in a <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operation.</p>
        pub fn created_at(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.created_at = Some(input);
            self
        }
        /// <p>The ISO-8601 time stamp of when the certificate was first used in a <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operation.</p>
        pub fn set_created_at(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.created_at = input;
            self
        }
        /// <p>The ISO-8601 timestamp when the subject was last updated. </p>
        pub fn updated_at(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.updated_at = Some(input);
            self
        }
        /// <p>The ISO-8601 timestamp when the subject was last updated. </p>
        pub fn set_updated_at(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.updated_at = input;
            self
        }
        /// Consumes the builder and constructs a [`SubjectSummary`](crate::model::SubjectSummary).
        pub fn build(self) -> crate::model::SubjectSummary {
            crate::model::SubjectSummary {
                subject_arn: self.subject_arn,
                subject_id: self.subject_id,
                enabled: self.enabled,
                x509_subject: self.x509_subject,
                last_seen_at: self.last_seen_at,
                created_at: self.created_at,
                updated_at: self.updated_at,
            }
        }
    }
}
impl SubjectSummary {
    /// Creates a new builder-style object to manufacture [`SubjectSummary`](crate::model::SubjectSummary).
    pub fn builder() -> crate::model::subject_summary::Builder {
        crate::model::subject_summary::Builder::default()
    }
}

/// <p>The state of the subject after a read or write operation.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SubjectDetail {
    /// <p>The ARN of the resource.</p>
    #[doc(hidden)]
    pub subject_arn: std::option::Option<std::string::String>,
    /// <p>The id of the resource</p>
    #[doc(hidden)]
    pub subject_id: std::option::Option<std::string::String>,
    /// <p>The enabled status of the subject.</p>
    #[doc(hidden)]
    pub enabled: std::option::Option<bool>,
    /// <p>The x509 principal identifier of the authenticating certificate.</p>
    #[doc(hidden)]
    pub x509_subject: std::option::Option<std::string::String>,
    /// <p>The ISO-8601 timestamp of the last time this Subject requested temporary session credentials.</p>
    #[doc(hidden)]
    pub last_seen_at: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The ISO-8601 timestamp when the subject was created. </p>
    #[doc(hidden)]
    pub created_at: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The ISO-8601 timestamp when the subject was last updated.</p>
    #[doc(hidden)]
    pub updated_at: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The temporary session credentials vended at the last authenticating call with this Subject.</p>
    #[doc(hidden)]
    pub credentials: std::option::Option<std::vec::Vec<crate::model::CredentialSummary>>,
    /// <p>The specified instance properties associated with the request.</p>
    #[doc(hidden)]
    pub instance_properties: std::option::Option<std::vec::Vec<crate::model::InstanceProperty>>,
}
impl SubjectDetail {
    /// <p>The ARN of the resource.</p>
    pub fn subject_arn(&self) -> std::option::Option<&str> {
        self.subject_arn.as_deref()
    }
    /// <p>The id of the resource</p>
    pub fn subject_id(&self) -> std::option::Option<&str> {
        self.subject_id.as_deref()
    }
    /// <p>The enabled status of the subject.</p>
    pub fn enabled(&self) -> std::option::Option<bool> {
        self.enabled
    }
    /// <p>The x509 principal identifier of the authenticating certificate.</p>
    pub fn x509_subject(&self) -> std::option::Option<&str> {
        self.x509_subject.as_deref()
    }
    /// <p>The ISO-8601 timestamp of the last time this Subject requested temporary session credentials.</p>
    pub fn last_seen_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.last_seen_at.as_ref()
    }
    /// <p>The ISO-8601 timestamp when the subject was created. </p>
    pub fn created_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
    /// <p>The ISO-8601 timestamp when the subject was last updated.</p>
    pub fn updated_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.updated_at.as_ref()
    }
    /// <p>The temporary session credentials vended at the last authenticating call with this Subject.</p>
    pub fn credentials(&self) -> std::option::Option<&[crate::model::CredentialSummary]> {
        self.credentials.as_deref()
    }
    /// <p>The specified instance properties associated with the request.</p>
    pub fn instance_properties(&self) -> std::option::Option<&[crate::model::InstanceProperty]> {
        self.instance_properties.as_deref()
    }
}
/// See [`SubjectDetail`](crate::model::SubjectDetail).
pub mod subject_detail {

    /// A builder for [`SubjectDetail`](crate::model::SubjectDetail).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) subject_arn: std::option::Option<std::string::String>,
        pub(crate) subject_id: std::option::Option<std::string::String>,
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) x509_subject: std::option::Option<std::string::String>,
        pub(crate) last_seen_at: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) created_at: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) updated_at: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) credentials: std::option::Option<std::vec::Vec<crate::model::CredentialSummary>>,
        pub(crate) instance_properties:
            std::option::Option<std::vec::Vec<crate::model::InstanceProperty>>,
    }
    impl Builder {
        /// <p>The ARN of the resource.</p>
        pub fn subject_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.subject_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the resource.</p>
        pub fn set_subject_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subject_arn = input;
            self
        }
        /// <p>The id of the resource</p>
        pub fn subject_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.subject_id = Some(input.into());
            self
        }
        /// <p>The id of the resource</p>
        pub fn set_subject_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.subject_id = input;
            self
        }
        /// <p>The enabled status of the subject.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>The enabled status of the subject.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>The x509 principal identifier of the authenticating certificate.</p>
        pub fn x509_subject(mut self, input: impl Into<std::string::String>) -> Self {
            self.x509_subject = Some(input.into());
            self
        }
        /// <p>The x509 principal identifier of the authenticating certificate.</p>
        pub fn set_x509_subject(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.x509_subject = input;
            self
        }
        /// <p>The ISO-8601 timestamp of the last time this Subject requested temporary session credentials.</p>
        pub fn last_seen_at(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.last_seen_at = Some(input);
            self
        }
        /// <p>The ISO-8601 timestamp of the last time this Subject requested temporary session credentials.</p>
        pub fn set_last_seen_at(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.last_seen_at = input;
            self
        }
        /// <p>The ISO-8601 timestamp when the subject was created. </p>
        pub fn created_at(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.created_at = Some(input);
            self
        }
        /// <p>The ISO-8601 timestamp when the subject was created. </p>
        pub fn set_created_at(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.created_at = input;
            self
        }
        /// <p>The ISO-8601 timestamp when the subject was last updated.</p>
        pub fn updated_at(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.updated_at = Some(input);
            self
        }
        /// <p>The ISO-8601 timestamp when the subject was last updated.</p>
        pub fn set_updated_at(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.updated_at = input;
            self
        }
        /// Appends an item to `credentials`.
        ///
        /// To override the contents of this collection use [`set_credentials`](Self::set_credentials).
        ///
        /// <p>The temporary session credentials vended at the last authenticating call with this Subject.</p>
        pub fn credentials(mut self, input: crate::model::CredentialSummary) -> Self {
            let mut v = self.credentials.unwrap_or_default();
            v.push(input);
            self.credentials = Some(v);
            self
        }
        /// <p>The temporary session credentials vended at the last authenticating call with this Subject.</p>
        pub fn set_credentials(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::CredentialSummary>>,
        ) -> Self {
            self.credentials = input;
            self
        }
        /// Appends an item to `instance_properties`.
        ///
        /// To override the contents of this collection use [`set_instance_properties`](Self::set_instance_properties).
        ///
        /// <p>The specified instance properties associated with the request.</p>
        pub fn instance_properties(mut self, input: crate::model::InstanceProperty) -> Self {
            let mut v = self.instance_properties.unwrap_or_default();
            v.push(input);
            self.instance_properties = Some(v);
            self
        }
        /// <p>The specified instance properties associated with the request.</p>
        pub fn set_instance_properties(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::InstanceProperty>>,
        ) -> Self {
            self.instance_properties = input;
            self
        }
        /// Consumes the builder and constructs a [`SubjectDetail`](crate::model::SubjectDetail).
        pub fn build(self) -> crate::model::SubjectDetail {
            crate::model::SubjectDetail {
                subject_arn: self.subject_arn,
                subject_id: self.subject_id,
                enabled: self.enabled,
                x509_subject: self.x509_subject,
                last_seen_at: self.last_seen_at,
                created_at: self.created_at,
                updated_at: self.updated_at,
                credentials: self.credentials,
                instance_properties: self.instance_properties,
            }
        }
    }
}
impl SubjectDetail {
    /// Creates a new builder-style object to manufacture [`SubjectDetail`](crate::model::SubjectDetail).
    pub fn builder() -> crate::model::subject_detail::Builder {
        crate::model::subject_detail::Builder::default()
    }
}

/// <p>A key-value pair you set that identifies a property of the authenticating instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InstanceProperty {
    /// <p>The ISO-8601 time stamp of when the certificate was last used in a <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operation.</p>
    #[doc(hidden)]
    pub seen_at: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>A list of instanceProperty objects. </p>
    #[doc(hidden)]
    pub properties:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>Indicates whether the <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operation was successful. </p>
    #[doc(hidden)]
    pub failed: std::option::Option<bool>,
}
impl InstanceProperty {
    /// <p>The ISO-8601 time stamp of when the certificate was last used in a <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operation.</p>
    pub fn seen_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.seen_at.as_ref()
    }
    /// <p>A list of instanceProperty objects. </p>
    pub fn properties(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.properties.as_ref()
    }
    /// <p>Indicates whether the <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operation was successful. </p>
    pub fn failed(&self) -> std::option::Option<bool> {
        self.failed
    }
}
/// See [`InstanceProperty`](crate::model::InstanceProperty).
pub mod instance_property {

    /// A builder for [`InstanceProperty`](crate::model::InstanceProperty).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) seen_at: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) properties: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) failed: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>The ISO-8601 time stamp of when the certificate was last used in a <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operation.</p>
        pub fn seen_at(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.seen_at = Some(input);
            self
        }
        /// <p>The ISO-8601 time stamp of when the certificate was last used in a <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operation.</p>
        pub fn set_seen_at(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.seen_at = input;
            self
        }
        /// Adds a key-value pair to `properties`.
        ///
        /// To override the contents of this collection use [`set_properties`](Self::set_properties).
        ///
        /// <p>A list of instanceProperty objects. </p>
        pub fn properties(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.properties.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.properties = Some(hash_map);
            self
        }
        /// <p>A list of instanceProperty objects. </p>
        pub fn set_properties(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.properties = input;
            self
        }
        /// <p>Indicates whether the <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operation was successful. </p>
        pub fn failed(mut self, input: bool) -> Self {
            self.failed = Some(input);
            self
        }
        /// <p>Indicates whether the <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operation was successful. </p>
        pub fn set_failed(mut self, input: std::option::Option<bool>) -> Self {
            self.failed = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceProperty`](crate::model::InstanceProperty).
        pub fn build(self) -> crate::model::InstanceProperty {
            crate::model::InstanceProperty {
                seen_at: self.seen_at,
                properties: self.properties,
                failed: self.failed,
            }
        }
    }
}
impl InstanceProperty {
    /// Creates a new builder-style object to manufacture [`InstanceProperty`](crate::model::InstanceProperty).
    pub fn builder() -> crate::model::instance_property::Builder {
        crate::model::instance_property::Builder::default()
    }
}

/// <p>A record of a presented X509 credential to <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a>. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CredentialSummary {
    /// <p>The ISO-8601 time stamp of when the certificate was last used in a <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operation.</p>
    #[doc(hidden)]
    pub seen_at: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The serial number of the certificate.</p>
    #[doc(hidden)]
    pub serial_number: std::option::Option<std::string::String>,
    /// <p>The fully qualified domain name of the issuing certificate for the presented end-entity certificate.</p>
    #[doc(hidden)]
    pub issuer: std::option::Option<std::string::String>,
    /// <p>Indicates whether the credential is enabled.</p>
    #[doc(hidden)]
    pub enabled: std::option::Option<bool>,
    /// <p>The PEM-encoded data of the certificate.</p>
    #[doc(hidden)]
    pub x509_certificate_data: std::option::Option<std::string::String>,
    /// <p>Indicates whether the <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operation was successful. </p>
    #[doc(hidden)]
    pub failed: std::option::Option<bool>,
}
impl CredentialSummary {
    /// <p>The ISO-8601 time stamp of when the certificate was last used in a <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operation.</p>
    pub fn seen_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.seen_at.as_ref()
    }
    /// <p>The serial number of the certificate.</p>
    pub fn serial_number(&self) -> std::option::Option<&str> {
        self.serial_number.as_deref()
    }
    /// <p>The fully qualified domain name of the issuing certificate for the presented end-entity certificate.</p>
    pub fn issuer(&self) -> std::option::Option<&str> {
        self.issuer.as_deref()
    }
    /// <p>Indicates whether the credential is enabled.</p>
    pub fn enabled(&self) -> std::option::Option<bool> {
        self.enabled
    }
    /// <p>The PEM-encoded data of the certificate.</p>
    pub fn x509_certificate_data(&self) -> std::option::Option<&str> {
        self.x509_certificate_data.as_deref()
    }
    /// <p>Indicates whether the <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operation was successful. </p>
    pub fn failed(&self) -> std::option::Option<bool> {
        self.failed
    }
}
/// See [`CredentialSummary`](crate::model::CredentialSummary).
pub mod credential_summary {

    /// A builder for [`CredentialSummary`](crate::model::CredentialSummary).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) seen_at: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) serial_number: std::option::Option<std::string::String>,
        pub(crate) issuer: std::option::Option<std::string::String>,
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) x509_certificate_data: std::option::Option<std::string::String>,
        pub(crate) failed: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>The ISO-8601 time stamp of when the certificate was last used in a <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operation.</p>
        pub fn seen_at(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.seen_at = Some(input);
            self
        }
        /// <p>The ISO-8601 time stamp of when the certificate was last used in a <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operation.</p>
        pub fn set_seen_at(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.seen_at = input;
            self
        }
        /// <p>The serial number of the certificate.</p>
        pub fn serial_number(mut self, input: impl Into<std::string::String>) -> Self {
            self.serial_number = Some(input.into());
            self
        }
        /// <p>The serial number of the certificate.</p>
        pub fn set_serial_number(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.serial_number = input;
            self
        }
        /// <p>The fully qualified domain name of the issuing certificate for the presented end-entity certificate.</p>
        pub fn issuer(mut self, input: impl Into<std::string::String>) -> Self {
            self.issuer = Some(input.into());
            self
        }
        /// <p>The fully qualified domain name of the issuing certificate for the presented end-entity certificate.</p>
        pub fn set_issuer(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.issuer = input;
            self
        }
        /// <p>Indicates whether the credential is enabled.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Indicates whether the credential is enabled.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>The PEM-encoded data of the certificate.</p>
        pub fn x509_certificate_data(mut self, input: impl Into<std::string::String>) -> Self {
            self.x509_certificate_data = Some(input.into());
            self
        }
        /// <p>The PEM-encoded data of the certificate.</p>
        pub fn set_x509_certificate_data(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.x509_certificate_data = input;
            self
        }
        /// <p>Indicates whether the <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operation was successful. </p>
        pub fn failed(mut self, input: bool) -> Self {
            self.failed = Some(input);
            self
        }
        /// <p>Indicates whether the <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operation was successful. </p>
        pub fn set_failed(mut self, input: std::option::Option<bool>) -> Self {
            self.failed = input;
            self
        }
        /// Consumes the builder and constructs a [`CredentialSummary`](crate::model::CredentialSummary).
        pub fn build(self) -> crate::model::CredentialSummary {
            crate::model::CredentialSummary {
                seen_at: self.seen_at,
                serial_number: self.serial_number,
                issuer: self.issuer,
                enabled: self.enabled,
                x509_certificate_data: self.x509_certificate_data,
                failed: self.failed,
            }
        }
    }
}
impl CredentialSummary {
    /// Creates a new builder-style object to manufacture [`CredentialSummary`](crate::model::CredentialSummary).
    pub fn builder() -> crate::model::credential_summary::Builder {
        crate::model::credential_summary::Builder::default()
    }
}

/// <p>The state of the profile after a read or write operation.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ProfileDetail {
    /// <p>The unique identifier of the profile.</p>
    #[doc(hidden)]
    pub profile_id: std::option::Option<std::string::String>,
    /// <p>The ARN of the profile.</p>
    #[doc(hidden)]
    pub profile_arn: std::option::Option<std::string::String>,
    /// <p>The name of the profile.</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>Specifies whether instance properties are required in <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> requests with this profile. </p>
    #[doc(hidden)]
    pub require_instance_properties: std::option::Option<bool>,
    /// <p>Indicates whether the profile is enabled.</p>
    #[doc(hidden)]
    pub enabled: std::option::Option<bool>,
    /// <p>The Amazon Web Services account that created the profile.</p>
    #[doc(hidden)]
    pub created_by: std::option::Option<std::string::String>,
    /// <p>A session policy that applies to the trust boundary of the vended session credentials. </p>
    #[doc(hidden)]
    pub session_policy: std::option::Option<std::string::String>,
    /// <p>A list of IAM roles that this profile can assume in a <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operation.</p>
    #[doc(hidden)]
    pub role_arns: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>A list of managed policy ARNs that apply to the vended session credentials. </p>
    #[doc(hidden)]
    pub managed_policy_arns: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The ISO-8601 timestamp when the profile was created. </p>
    #[doc(hidden)]
    pub created_at: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The ISO-8601 timestamp when the profile was last updated. </p>
    #[doc(hidden)]
    pub updated_at: std::option::Option<aws_smithy_types::DateTime>,
    /// <p> The number of seconds the vended session credentials are valid for. </p>
    #[doc(hidden)]
    pub duration_seconds: std::option::Option<i32>,
}
impl ProfileDetail {
    /// <p>The unique identifier of the profile.</p>
    pub fn profile_id(&self) -> std::option::Option<&str> {
        self.profile_id.as_deref()
    }
    /// <p>The ARN of the profile.</p>
    pub fn profile_arn(&self) -> std::option::Option<&str> {
        self.profile_arn.as_deref()
    }
    /// <p>The name of the profile.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>Specifies whether instance properties are required in <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> requests with this profile. </p>
    pub fn require_instance_properties(&self) -> std::option::Option<bool> {
        self.require_instance_properties
    }
    /// <p>Indicates whether the profile is enabled.</p>
    pub fn enabled(&self) -> std::option::Option<bool> {
        self.enabled
    }
    /// <p>The Amazon Web Services account that created the profile.</p>
    pub fn created_by(&self) -> std::option::Option<&str> {
        self.created_by.as_deref()
    }
    /// <p>A session policy that applies to the trust boundary of the vended session credentials. </p>
    pub fn session_policy(&self) -> std::option::Option<&str> {
        self.session_policy.as_deref()
    }
    /// <p>A list of IAM roles that this profile can assume in a <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operation.</p>
    pub fn role_arns(&self) -> std::option::Option<&[std::string::String]> {
        self.role_arns.as_deref()
    }
    /// <p>A list of managed policy ARNs that apply to the vended session credentials. </p>
    pub fn managed_policy_arns(&self) -> std::option::Option<&[std::string::String]> {
        self.managed_policy_arns.as_deref()
    }
    /// <p>The ISO-8601 timestamp when the profile was created. </p>
    pub fn created_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
    /// <p>The ISO-8601 timestamp when the profile was last updated. </p>
    pub fn updated_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.updated_at.as_ref()
    }
    /// <p> The number of seconds the vended session credentials are valid for. </p>
    pub fn duration_seconds(&self) -> std::option::Option<i32> {
        self.duration_seconds
    }
}
/// See [`ProfileDetail`](crate::model::ProfileDetail).
pub mod profile_detail {

    /// A builder for [`ProfileDetail`](crate::model::ProfileDetail).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) profile_id: std::option::Option<std::string::String>,
        pub(crate) profile_arn: std::option::Option<std::string::String>,
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) require_instance_properties: std::option::Option<bool>,
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) created_by: std::option::Option<std::string::String>,
        pub(crate) session_policy: std::option::Option<std::string::String>,
        pub(crate) role_arns: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) managed_policy_arns: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) created_at: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) updated_at: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) duration_seconds: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The unique identifier of the profile.</p>
        pub fn profile_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.profile_id = Some(input.into());
            self
        }
        /// <p>The unique identifier of the profile.</p>
        pub fn set_profile_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.profile_id = input;
            self
        }
        /// <p>The ARN of the profile.</p>
        pub fn profile_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.profile_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the profile.</p>
        pub fn set_profile_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.profile_arn = input;
            self
        }
        /// <p>The name of the profile.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the profile.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>Specifies whether instance properties are required in <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> requests with this profile. </p>
        pub fn require_instance_properties(mut self, input: bool) -> Self {
            self.require_instance_properties = Some(input);
            self
        }
        /// <p>Specifies whether instance properties are required in <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> requests with this profile. </p>
        pub fn set_require_instance_properties(mut self, input: std::option::Option<bool>) -> Self {
            self.require_instance_properties = input;
            self
        }
        /// <p>Indicates whether the profile is enabled.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Indicates whether the profile is enabled.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>The Amazon Web Services account that created the profile.</p>
        pub fn created_by(mut self, input: impl Into<std::string::String>) -> Self {
            self.created_by = Some(input.into());
            self
        }
        /// <p>The Amazon Web Services account that created the profile.</p>
        pub fn set_created_by(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.created_by = input;
            self
        }
        /// <p>A session policy that applies to the trust boundary of the vended session credentials. </p>
        pub fn session_policy(mut self, input: impl Into<std::string::String>) -> Self {
            self.session_policy = Some(input.into());
            self
        }
        /// <p>A session policy that applies to the trust boundary of the vended session credentials. </p>
        pub fn set_session_policy(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.session_policy = input;
            self
        }
        /// Appends an item to `role_arns`.
        ///
        /// To override the contents of this collection use [`set_role_arns`](Self::set_role_arns).
        ///
        /// <p>A list of IAM roles that this profile can assume in a <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operation.</p>
        pub fn role_arns(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.role_arns.unwrap_or_default();
            v.push(input.into());
            self.role_arns = Some(v);
            self
        }
        /// <p>A list of IAM roles that this profile can assume in a <a href="https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html">CreateSession</a> operation.</p>
        pub fn set_role_arns(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.role_arns = input;
            self
        }
        /// Appends an item to `managed_policy_arns`.
        ///
        /// To override the contents of this collection use [`set_managed_policy_arns`](Self::set_managed_policy_arns).
        ///
        /// <p>A list of managed policy ARNs that apply to the vended session credentials. </p>
        pub fn managed_policy_arns(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.managed_policy_arns.unwrap_or_default();
            v.push(input.into());
            self.managed_policy_arns = Some(v);
            self
        }
        /// <p>A list of managed policy ARNs that apply to the vended session credentials. </p>
        pub fn set_managed_policy_arns(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.managed_policy_arns = input;
            self
        }
        /// <p>The ISO-8601 timestamp when the profile was created. </p>
        pub fn created_at(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.created_at = Some(input);
            self
        }
        /// <p>The ISO-8601 timestamp when the profile was created. </p>
        pub fn set_created_at(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.created_at = input;
            self
        }
        /// <p>The ISO-8601 timestamp when the profile was last updated. </p>
        pub fn updated_at(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.updated_at = Some(input);
            self
        }
        /// <p>The ISO-8601 timestamp when the profile was last updated. </p>
        pub fn set_updated_at(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.updated_at = input;
            self
        }
        /// <p> The number of seconds the vended session credentials are valid for. </p>
        pub fn duration_seconds(mut self, input: i32) -> Self {
            self.duration_seconds = Some(input);
            self
        }
        /// <p> The number of seconds the vended session credentials are valid for. </p>
        pub fn set_duration_seconds(mut self, input: std::option::Option<i32>) -> Self {
            self.duration_seconds = input;
            self
        }
        /// Consumes the builder and constructs a [`ProfileDetail`](crate::model::ProfileDetail).
        pub fn build(self) -> crate::model::ProfileDetail {
            crate::model::ProfileDetail {
                profile_id: self.profile_id,
                profile_arn: self.profile_arn,
                name: self.name,
                require_instance_properties: self.require_instance_properties,
                enabled: self.enabled,
                created_by: self.created_by,
                session_policy: self.session_policy,
                role_arns: self.role_arns,
                managed_policy_arns: self.managed_policy_arns,
                created_at: self.created_at,
                updated_at: self.updated_at,
                duration_seconds: self.duration_seconds,
            }
        }
    }
}
impl ProfileDetail {
    /// Creates a new builder-style object to manufacture [`ProfileDetail`](crate::model::ProfileDetail).
    pub fn builder() -> crate::model::profile_detail::Builder {
        crate::model::profile_detail::Builder::default()
    }
}

/// <p>The state of the certificate revocation list (CRL) after a read or write operation.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CrlDetail {
    /// <p>The unique identifier of the certificate revocation list (CRL).</p>
    #[doc(hidden)]
    pub crl_id: std::option::Option<std::string::String>,
    /// <p>The ARN of the certificate revocation list (CRL).</p>
    #[doc(hidden)]
    pub crl_arn: std::option::Option<std::string::String>,
    /// <p>The name of the certificate revocation list (CRL).</p>
    #[doc(hidden)]
    pub name: std::option::Option<std::string::String>,
    /// <p>Indicates whether the certificate revocation list (CRL) is enabled.</p>
    #[doc(hidden)]
    pub enabled: std::option::Option<bool>,
    /// <p>The state of the certificate revocation list (CRL) after a read or write operation.</p>
    #[doc(hidden)]
    pub crl_data: std::option::Option<aws_smithy_types::Blob>,
    /// <p>The ARN of the TrustAnchor the certificate revocation list (CRL) will provide revocation for. </p>
    #[doc(hidden)]
    pub trust_anchor_arn: std::option::Option<std::string::String>,
    /// <p>The ISO-8601 timestamp when the certificate revocation list (CRL) was created. </p>
    #[doc(hidden)]
    pub created_at: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The ISO-8601 timestamp when the certificate revocation list (CRL) was last updated. </p>
    #[doc(hidden)]
    pub updated_at: std::option::Option<aws_smithy_types::DateTime>,
}
impl CrlDetail {
    /// <p>The unique identifier of the certificate revocation list (CRL).</p>
    pub fn crl_id(&self) -> std::option::Option<&str> {
        self.crl_id.as_deref()
    }
    /// <p>The ARN of the certificate revocation list (CRL).</p>
    pub fn crl_arn(&self) -> std::option::Option<&str> {
        self.crl_arn.as_deref()
    }
    /// <p>The name of the certificate revocation list (CRL).</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>Indicates whether the certificate revocation list (CRL) is enabled.</p>
    pub fn enabled(&self) -> std::option::Option<bool> {
        self.enabled
    }
    /// <p>The state of the certificate revocation list (CRL) after a read or write operation.</p>
    pub fn crl_data(&self) -> std::option::Option<&aws_smithy_types::Blob> {
        self.crl_data.as_ref()
    }
    /// <p>The ARN of the TrustAnchor the certificate revocation list (CRL) will provide revocation for. </p>
    pub fn trust_anchor_arn(&self) -> std::option::Option<&str> {
        self.trust_anchor_arn.as_deref()
    }
    /// <p>The ISO-8601 timestamp when the certificate revocation list (CRL) was created. </p>
    pub fn created_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
    /// <p>The ISO-8601 timestamp when the certificate revocation list (CRL) was last updated. </p>
    pub fn updated_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.updated_at.as_ref()
    }
}
/// See [`CrlDetail`](crate::model::CrlDetail).
pub mod crl_detail {

    /// A builder for [`CrlDetail`](crate::model::CrlDetail).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) crl_id: std::option::Option<std::string::String>,
        pub(crate) crl_arn: std::option::Option<std::string::String>,
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) enabled: std::option::Option<bool>,
        pub(crate) crl_data: std::option::Option<aws_smithy_types::Blob>,
        pub(crate) trust_anchor_arn: std::option::Option<std::string::String>,
        pub(crate) created_at: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) updated_at: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>The unique identifier of the certificate revocation list (CRL).</p>
        pub fn crl_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.crl_id = Some(input.into());
            self
        }
        /// <p>The unique identifier of the certificate revocation list (CRL).</p>
        pub fn set_crl_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.crl_id = input;
            self
        }
        /// <p>The ARN of the certificate revocation list (CRL).</p>
        pub fn crl_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.crl_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the certificate revocation list (CRL).</p>
        pub fn set_crl_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.crl_arn = input;
            self
        }
        /// <p>The name of the certificate revocation list (CRL).</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the certificate revocation list (CRL).</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>Indicates whether the certificate revocation list (CRL) is enabled.</p>
        pub fn enabled(mut self, input: bool) -> Self {
            self.enabled = Some(input);
            self
        }
        /// <p>Indicates whether the certificate revocation list (CRL) is enabled.</p>
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.enabled = input;
            self
        }
        /// <p>The state of the certificate revocation list (CRL) after a read or write operation.</p>
        pub fn crl_data(mut self, input: aws_smithy_types::Blob) -> Self {
            self.crl_data = Some(input);
            self
        }
        /// <p>The state of the certificate revocation list (CRL) after a read or write operation.</p>
        pub fn set_crl_data(mut self, input: std::option::Option<aws_smithy_types::Blob>) -> Self {
            self.crl_data = input;
            self
        }
        /// <p>The ARN of the TrustAnchor the certificate revocation list (CRL) will provide revocation for. </p>
        pub fn trust_anchor_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.trust_anchor_arn = Some(input.into());
            self
        }
        /// <p>The ARN of the TrustAnchor the certificate revocation list (CRL) will provide revocation for. </p>
        pub fn set_trust_anchor_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.trust_anchor_arn = input;
            self
        }
        /// <p>The ISO-8601 timestamp when the certificate revocation list (CRL) was created. </p>
        pub fn created_at(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.created_at = Some(input);
            self
        }
        /// <p>The ISO-8601 timestamp when the certificate revocation list (CRL) was created. </p>
        pub fn set_created_at(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.created_at = input;
            self
        }
        /// <p>The ISO-8601 timestamp when the certificate revocation list (CRL) was last updated. </p>
        pub fn updated_at(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.updated_at = Some(input);
            self
        }
        /// <p>The ISO-8601 timestamp when the certificate revocation list (CRL) was last updated. </p>
        pub fn set_updated_at(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.updated_at = input;
            self
        }
        /// Consumes the builder and constructs a [`CrlDetail`](crate::model::CrlDetail).
        pub fn build(self) -> crate::model::CrlDetail {
            crate::model::CrlDetail {
                crl_id: self.crl_id,
                crl_arn: self.crl_arn,
                name: self.name,
                enabled: self.enabled,
                crl_data: self.crl_data,
                trust_anchor_arn: self.trust_anchor_arn,
                created_at: self.created_at,
                updated_at: self.updated_at,
            }
        }
    }
}
impl CrlDetail {
    /// Creates a new builder-style object to manufacture [`CrlDetail`](crate::model::CrlDetail).
    pub fn builder() -> crate::model::crl_detail::Builder {
        crate::model::crl_detail::Builder::default()
    }
}