aws_sdk_macie2/operation/enable_macie/
_enable_macie_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct EnableMacieInput {
6    /// <p>A unique, case-sensitive token that you provide to ensure the idempotency of the request.</p>
7    pub client_token: ::std::option::Option<::std::string::String>,
8    /// <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>
9    pub finding_publishing_frequency: ::std::option::Option<crate::types::FindingPublishingFrequency>,
10    /// <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>
11    pub status: ::std::option::Option<crate::types::MacieStatus>,
12}
13impl EnableMacieInput {
14    /// <p>A unique, case-sensitive token that you provide to ensure the idempotency of the request.</p>
15    pub fn client_token(&self) -> ::std::option::Option<&str> {
16        self.client_token.as_deref()
17    }
18    /// <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>
19    pub fn finding_publishing_frequency(&self) -> ::std::option::Option<&crate::types::FindingPublishingFrequency> {
20        self.finding_publishing_frequency.as_ref()
21    }
22    /// <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>
23    pub fn status(&self) -> ::std::option::Option<&crate::types::MacieStatus> {
24        self.status.as_ref()
25    }
26}
27impl EnableMacieInput {
28    /// Creates a new builder-style object to manufacture [`EnableMacieInput`](crate::operation::enable_macie::EnableMacieInput).
29    pub fn builder() -> crate::operation::enable_macie::builders::EnableMacieInputBuilder {
30        crate::operation::enable_macie::builders::EnableMacieInputBuilder::default()
31    }
32}
33
34/// A builder for [`EnableMacieInput`](crate::operation::enable_macie::EnableMacieInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct EnableMacieInputBuilder {
38    pub(crate) client_token: ::std::option::Option<::std::string::String>,
39    pub(crate) finding_publishing_frequency: ::std::option::Option<crate::types::FindingPublishingFrequency>,
40    pub(crate) status: ::std::option::Option<crate::types::MacieStatus>,
41}
42impl EnableMacieInputBuilder {
43    /// <p>A unique, case-sensitive token that you provide to ensure the idempotency of the request.</p>
44    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
45        self.client_token = ::std::option::Option::Some(input.into());
46        self
47    }
48    /// <p>A unique, case-sensitive token that you provide to ensure the idempotency of the request.</p>
49    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
50        self.client_token = input;
51        self
52    }
53    /// <p>A unique, case-sensitive token that you provide to ensure the idempotency of the request.</p>
54    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
55        &self.client_token
56    }
57    /// <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>
58    pub fn finding_publishing_frequency(mut self, input: crate::types::FindingPublishingFrequency) -> Self {
59        self.finding_publishing_frequency = ::std::option::Option::Some(input);
60        self
61    }
62    /// <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>
63    pub fn set_finding_publishing_frequency(mut self, input: ::std::option::Option<crate::types::FindingPublishingFrequency>) -> Self {
64        self.finding_publishing_frequency = input;
65        self
66    }
67    /// <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>
68    pub fn get_finding_publishing_frequency(&self) -> &::std::option::Option<crate::types::FindingPublishingFrequency> {
69        &self.finding_publishing_frequency
70    }
71    /// <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>
72    pub fn status(mut self, input: crate::types::MacieStatus) -> Self {
73        self.status = ::std::option::Option::Some(input);
74        self
75    }
76    /// <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>
77    pub fn set_status(mut self, input: ::std::option::Option<crate::types::MacieStatus>) -> Self {
78        self.status = input;
79        self
80    }
81    /// <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>
82    pub fn get_status(&self) -> &::std::option::Option<crate::types::MacieStatus> {
83        &self.status
84    }
85    /// Consumes the builder and constructs a [`EnableMacieInput`](crate::operation::enable_macie::EnableMacieInput).
86    pub fn build(self) -> ::std::result::Result<crate::operation::enable_macie::EnableMacieInput, ::aws_smithy_types::error::operation::BuildError> {
87        ::std::result::Result::Ok(crate::operation::enable_macie::EnableMacieInput {
88            client_token: self.client_token,
89            finding_publishing_frequency: self.finding_publishing_frequency,
90            status: self.status,
91        })
92    }
93}