aws-sdk-macie2 1.99.0

AWS SDK for Amazon Macie 2
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 EnableMacieInput {
    /// <p>A unique, case-sensitive token that you provide to ensure the idempotency of the request.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
    /// <p>Specifies how often to publish updates to policy findings for the account. This includes publishing updates to Security Hub and Amazon EventBridge (formerly Amazon CloudWatch Events).</p>
    pub finding_publishing_frequency: ::std::option::Option<crate::types::FindingPublishingFrequency>,
    /// <p>Specifies the new status for the account. To enable Amazon Macie and start all Macie activities for the account, set this value to ENABLED.</p>
    pub status: ::std::option::Option<crate::types::MacieStatus>,
}
impl EnableMacieInput {
    /// <p>A unique, case-sensitive token that you provide to ensure the idempotency of the request.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>Specifies how often to publish updates to policy findings for the account. This includes publishing updates to Security Hub and Amazon EventBridge (formerly Amazon CloudWatch Events).</p>
    pub fn finding_publishing_frequency(&self) -> ::std::option::Option<&crate::types::FindingPublishingFrequency> {
        self.finding_publishing_frequency.as_ref()
    }
    /// <p>Specifies the new status for the account. To enable Amazon Macie and start all Macie activities for the account, set this value to ENABLED.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::MacieStatus> {
        self.status.as_ref()
    }
}
impl EnableMacieInput {
    /// Creates a new builder-style object to manufacture [`EnableMacieInput`](crate::operation::enable_macie::EnableMacieInput).
    pub fn builder() -> crate::operation::enable_macie::builders::EnableMacieInputBuilder {
        crate::operation::enable_macie::builders::EnableMacieInputBuilder::default()
    }
}

/// A builder for [`EnableMacieInput`](crate::operation::enable_macie::EnableMacieInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct EnableMacieInputBuilder {
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) finding_publishing_frequency: ::std::option::Option<crate::types::FindingPublishingFrequency>,
    pub(crate) status: ::std::option::Option<crate::types::MacieStatus>,
}
impl EnableMacieInputBuilder {
    /// <p>A unique, case-sensitive token that you provide to ensure the idempotency of the request.</p>
    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
    }
    /// <p>A unique, case-sensitive token that you provide to ensure the idempotency of the request.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>A unique, case-sensitive token that you provide to ensure the idempotency of the request.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// <p>Specifies how often to publish updates to policy findings for the account. This includes publishing updates to Security Hub and Amazon EventBridge (formerly Amazon CloudWatch Events).</p>
    pub fn finding_publishing_frequency(mut self, input: crate::types::FindingPublishingFrequency) -> Self {
        self.finding_publishing_frequency = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies how often to publish updates to policy findings for the account. This includes publishing updates to Security Hub and Amazon EventBridge (formerly Amazon CloudWatch Events).</p>
    pub fn set_finding_publishing_frequency(mut self, input: ::std::option::Option<crate::types::FindingPublishingFrequency>) -> Self {
        self.finding_publishing_frequency = input;
        self
    }
    /// <p>Specifies how often to publish updates to policy findings for the account. This includes publishing updates to Security Hub and Amazon EventBridge (formerly Amazon CloudWatch Events).</p>
    pub fn get_finding_publishing_frequency(&self) -> &::std::option::Option<crate::types::FindingPublishingFrequency> {
        &self.finding_publishing_frequency
    }
    /// <p>Specifies the new status for the account. To enable Amazon Macie and start all Macie activities for the account, set this value to ENABLED.</p>
    pub fn status(mut self, input: crate::types::MacieStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the new status for the account. To enable Amazon Macie and start all Macie activities for the account, set this value to ENABLED.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::MacieStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>Specifies the new status for the account. To enable Amazon Macie and start all Macie activities for the account, set this value to ENABLED.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::MacieStatus> {
        &self.status
    }
    /// Consumes the builder and constructs a [`EnableMacieInput`](crate::operation::enable_macie::EnableMacieInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::enable_macie::EnableMacieInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::enable_macie::EnableMacieInput {
            client_token: self.client_token,
            finding_publishing_frequency: self.finding_publishing_frequency,
            status: self.status,
        })
    }
}