aws-sdk-cloudwatchomni 1.2.0

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

/// The request for updating the intelligence configuration of the calling account.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PutIntelligenceConfigurationInput {
    /// Optional KMS key ARN to configure customer-managed encryption for anomaly data.
    pub kms_key_arn: ::std::option::Option<::std::string::String>,
    /// Set to true to disassociate the configured KMS key. Mutually exclusive with kmsKeyArn; the service returns ValidationException if both are provided.
    pub remove_kms_key: ::std::option::Option<bool>,
    /// Idempotency token for safe retries. Repeating a request with the same token applies the update at most once instead of reprocessing it.
    pub client_token: ::std::option::Option<::std::string::String>,
}
impl PutIntelligenceConfigurationInput {
    /// Optional KMS key ARN to configure customer-managed encryption for anomaly data.
    pub fn kms_key_arn(&self) -> ::std::option::Option<&str> {
        self.kms_key_arn.as_deref()
    }
    /// Set to true to disassociate the configured KMS key. Mutually exclusive with kmsKeyArn; the service returns ValidationException if both are provided.
    pub fn remove_kms_key(&self) -> ::std::option::Option<bool> {
        self.remove_kms_key
    }
    /// Idempotency token for safe retries. Repeating a request with the same token applies the update at most once instead of reprocessing it.
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
}
impl PutIntelligenceConfigurationInput {
    /// Creates a new builder-style object to manufacture [`PutIntelligenceConfigurationInput`](crate::operation::put_intelligence_configuration::PutIntelligenceConfigurationInput).
    pub fn builder() -> crate::operation::put_intelligence_configuration::builders::PutIntelligenceConfigurationInputBuilder {
        crate::operation::put_intelligence_configuration::builders::PutIntelligenceConfigurationInputBuilder::default()
    }
}

/// A builder for [`PutIntelligenceConfigurationInput`](crate::operation::put_intelligence_configuration::PutIntelligenceConfigurationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PutIntelligenceConfigurationInputBuilder {
    pub(crate) kms_key_arn: ::std::option::Option<::std::string::String>,
    pub(crate) remove_kms_key: ::std::option::Option<bool>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl PutIntelligenceConfigurationInputBuilder {
    /// Optional KMS key ARN to configure customer-managed encryption for anomaly data.
    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
    }
    /// Optional KMS key ARN to configure customer-managed encryption for anomaly data.
    pub fn set_kms_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.kms_key_arn = input;
        self
    }
    /// Optional KMS key ARN to configure customer-managed encryption for anomaly data.
    pub fn get_kms_key_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.kms_key_arn
    }
    /// Set to true to disassociate the configured KMS key. Mutually exclusive with kmsKeyArn; the service returns ValidationException if both are provided.
    pub fn remove_kms_key(mut self, input: bool) -> Self {
        self.remove_kms_key = ::std::option::Option::Some(input);
        self
    }
    /// Set to true to disassociate the configured KMS key. Mutually exclusive with kmsKeyArn; the service returns ValidationException if both are provided.
    pub fn set_remove_kms_key(mut self, input: ::std::option::Option<bool>) -> Self {
        self.remove_kms_key = input;
        self
    }
    /// Set to true to disassociate the configured KMS key. Mutually exclusive with kmsKeyArn; the service returns ValidationException if both are provided.
    pub fn get_remove_kms_key(&self) -> &::std::option::Option<bool> {
        &self.remove_kms_key
    }
    /// Idempotency token for safe retries. Repeating a request with the same token applies the update at most once instead of reprocessing it.
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// Idempotency token for safe retries. Repeating a request with the same token applies the update at most once instead of reprocessing it.
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// Idempotency token for safe retries. Repeating a request with the same token applies the update at most once instead of reprocessing it.
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Consumes the builder and constructs a [`PutIntelligenceConfigurationInput`](crate::operation::put_intelligence_configuration::PutIntelligenceConfigurationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::put_intelligence_configuration::PutIntelligenceConfigurationInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::put_intelligence_configuration::PutIntelligenceConfigurationInput {
            kms_key_arn: self.kms_key_arn,
            remove_kms_key: self.remove_kms_key,
            client_token: self.client_token,
        })
    }
}