aws-sdk-iot 1.104.0

AWS SDK for AWS IoT
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 DescribeEncryptionConfigurationOutput {
    /// <p>The type of the KMS key.</p>
    pub encryption_type: ::std::option::Option<crate::types::EncryptionType>,
    /// <p>The ARN of the customer managed KMS key.</p>
    pub kms_key_arn: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the IAM role assumed by Amazon Web Services IoT Core to call KMS on behalf of the customer.</p>
    pub kms_access_role_arn: ::std::option::Option<::std::string::String>,
    /// <p>The encryption configuration details that include the status information of the KMS key and the KMS access role.</p>
    pub configuration_details: ::std::option::Option<crate::types::ConfigurationDetails>,
    /// <p>The date when encryption configuration is last updated.</p>
    pub last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl DescribeEncryptionConfigurationOutput {
    /// <p>The type of the KMS key.</p>
    pub fn encryption_type(&self) -> ::std::option::Option<&crate::types::EncryptionType> {
        self.encryption_type.as_ref()
    }
    /// <p>The ARN of the customer managed KMS key.</p>
    pub fn kms_key_arn(&self) -> ::std::option::Option<&str> {
        self.kms_key_arn.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role assumed by Amazon Web Services IoT Core to call KMS on behalf of the customer.</p>
    pub fn kms_access_role_arn(&self) -> ::std::option::Option<&str> {
        self.kms_access_role_arn.as_deref()
    }
    /// <p>The encryption configuration details that include the status information of the KMS key and the KMS access role.</p>
    pub fn configuration_details(&self) -> ::std::option::Option<&crate::types::ConfigurationDetails> {
        self.configuration_details.as_ref()
    }
    /// <p>The date when encryption configuration is last updated.</p>
    pub fn last_modified_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_modified_date.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for DescribeEncryptionConfigurationOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DescribeEncryptionConfigurationOutput {
    /// Creates a new builder-style object to manufacture [`DescribeEncryptionConfigurationOutput`](crate::operation::describe_encryption_configuration::DescribeEncryptionConfigurationOutput).
    pub fn builder() -> crate::operation::describe_encryption_configuration::builders::DescribeEncryptionConfigurationOutputBuilder {
        crate::operation::describe_encryption_configuration::builders::DescribeEncryptionConfigurationOutputBuilder::default()
    }
}

/// A builder for [`DescribeEncryptionConfigurationOutput`](crate::operation::describe_encryption_configuration::DescribeEncryptionConfigurationOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeEncryptionConfigurationOutputBuilder {
    pub(crate) encryption_type: ::std::option::Option<crate::types::EncryptionType>,
    pub(crate) kms_key_arn: ::std::option::Option<::std::string::String>,
    pub(crate) kms_access_role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) configuration_details: ::std::option::Option<crate::types::ConfigurationDetails>,
    pub(crate) last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl DescribeEncryptionConfigurationOutputBuilder {
    /// <p>The type of the KMS key.</p>
    pub fn encryption_type(mut self, input: crate::types::EncryptionType) -> Self {
        self.encryption_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of the KMS key.</p>
    pub fn set_encryption_type(mut self, input: ::std::option::Option<crate::types::EncryptionType>) -> Self {
        self.encryption_type = input;
        self
    }
    /// <p>The type of the KMS key.</p>
    pub fn get_encryption_type(&self) -> &::std::option::Option<crate::types::EncryptionType> {
        &self.encryption_type
    }
    /// <p>The ARN of the customer managed KMS key.</p>
    pub fn kms_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.kms_key_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the customer managed KMS key.</p>
    pub fn set_kms_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.kms_key_arn = input;
        self
    }
    /// <p>The ARN of the customer managed KMS key.</p>
    pub fn get_kms_key_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.kms_key_arn
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role assumed by Amazon Web Services IoT Core to call KMS on behalf of the customer.</p>
    pub fn kms_access_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.kms_access_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role assumed by Amazon Web Services IoT Core to call KMS on behalf of the customer.</p>
    pub fn set_kms_access_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.kms_access_role_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role assumed by Amazon Web Services IoT Core to call KMS on behalf of the customer.</p>
    pub fn get_kms_access_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.kms_access_role_arn
    }
    /// <p>The encryption configuration details that include the status information of the KMS key and the KMS access role.</p>
    pub fn configuration_details(mut self, input: crate::types::ConfigurationDetails) -> Self {
        self.configuration_details = ::std::option::Option::Some(input);
        self
    }
    /// <p>The encryption configuration details that include the status information of the KMS key and the KMS access role.</p>
    pub fn set_configuration_details(mut self, input: ::std::option::Option<crate::types::ConfigurationDetails>) -> Self {
        self.configuration_details = input;
        self
    }
    /// <p>The encryption configuration details that include the status information of the KMS key and the KMS access role.</p>
    pub fn get_configuration_details(&self) -> &::std::option::Option<crate::types::ConfigurationDetails> {
        &self.configuration_details
    }
    /// <p>The date when encryption configuration is last updated.</p>
    pub fn last_modified_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_modified_date = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date when encryption configuration is last updated.</p>
    pub fn set_last_modified_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_modified_date = input;
        self
    }
    /// <p>The date when encryption configuration is last updated.</p>
    pub fn get_last_modified_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_modified_date
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`DescribeEncryptionConfigurationOutput`](crate::operation::describe_encryption_configuration::DescribeEncryptionConfigurationOutput).
    pub fn build(self) -> crate::operation::describe_encryption_configuration::DescribeEncryptionConfigurationOutput {
        crate::operation::describe_encryption_configuration::DescribeEncryptionConfigurationOutput {
            encryption_type: self.encryption_type,
            kms_key_arn: self.kms_key_arn,
            kms_access_role_arn: self.kms_access_role_arn,
            configuration_details: self.configuration_details,
            last_modified_date: self.last_modified_date,
            _request_id: self._request_id,
        }
    }
}