aws_sdk_auditmanager/operation/update_settings/
_update_settings_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)]
5pub struct UpdateSettingsInput {
6    /// <p>The Amazon Simple Notification Service (Amazon SNS) topic that Audit Manager sends notifications to.</p>
7    pub sns_topic: ::std::option::Option<::std::string::String>,
8    /// <p>The default S3 destination bucket for storing assessment reports.</p>
9    pub default_assessment_reports_destination: ::std::option::Option<crate::types::AssessmentReportsDestination>,
10    /// <p>A list of the default audit owners.</p>
11    pub default_process_owners: ::std::option::Option<::std::vec::Vec<crate::types::Role>>,
12    /// <p>The KMS key details.</p>
13    pub kms_key: ::std::option::Option<::std::string::String>,
14    /// <p>Specifies whether the evidence finder feature is enabled. Change this attribute to enable or disable evidence finder.</p><important>
15    /// <p>When you use this attribute to disable evidence finder, Audit Manager deletes the event data store that’s used to query your evidence data. As a result, you can’t re-enable evidence finder and use the feature again. Your only alternative is to <a href="https://docs.aws.amazon.com/audit-manager/latest/APIReference/API_DeregisterAccount.html">deregister</a> and then <a href="https://docs.aws.amazon.com/audit-manager/latest/APIReference/API_RegisterAccount.html">re-register</a> Audit Manager.</p>
16    /// </important>
17    pub evidence_finder_enabled: ::std::option::Option<bool>,
18    /// <p>The deregistration policy for your Audit Manager data. You can use this attribute to determine how your data is handled when you deregister Audit Manager.</p>
19    pub deregistration_policy: ::std::option::Option<crate::types::DeregistrationPolicy>,
20    /// <p>The default S3 destination bucket for storing evidence finder exports.</p>
21    pub default_export_destination: ::std::option::Option<crate::types::DefaultExportDestination>,
22}
23impl UpdateSettingsInput {
24    /// <p>The Amazon Simple Notification Service (Amazon SNS) topic that Audit Manager sends notifications to.</p>
25    pub fn sns_topic(&self) -> ::std::option::Option<&str> {
26        self.sns_topic.as_deref()
27    }
28    /// <p>The default S3 destination bucket for storing assessment reports.</p>
29    pub fn default_assessment_reports_destination(&self) -> ::std::option::Option<&crate::types::AssessmentReportsDestination> {
30        self.default_assessment_reports_destination.as_ref()
31    }
32    /// <p>A list of the default audit owners.</p>
33    ///
34    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.default_process_owners.is_none()`.
35    pub fn default_process_owners(&self) -> &[crate::types::Role] {
36        self.default_process_owners.as_deref().unwrap_or_default()
37    }
38    /// <p>The KMS key details.</p>
39    pub fn kms_key(&self) -> ::std::option::Option<&str> {
40        self.kms_key.as_deref()
41    }
42    /// <p>Specifies whether the evidence finder feature is enabled. Change this attribute to enable or disable evidence finder.</p><important>
43    /// <p>When you use this attribute to disable evidence finder, Audit Manager deletes the event data store that’s used to query your evidence data. As a result, you can’t re-enable evidence finder and use the feature again. Your only alternative is to <a href="https://docs.aws.amazon.com/audit-manager/latest/APIReference/API_DeregisterAccount.html">deregister</a> and then <a href="https://docs.aws.amazon.com/audit-manager/latest/APIReference/API_RegisterAccount.html">re-register</a> Audit Manager.</p>
44    /// </important>
45    pub fn evidence_finder_enabled(&self) -> ::std::option::Option<bool> {
46        self.evidence_finder_enabled
47    }
48    /// <p>The deregistration policy for your Audit Manager data. You can use this attribute to determine how your data is handled when you deregister Audit Manager.</p>
49    pub fn deregistration_policy(&self) -> ::std::option::Option<&crate::types::DeregistrationPolicy> {
50        self.deregistration_policy.as_ref()
51    }
52    /// <p>The default S3 destination bucket for storing evidence finder exports.</p>
53    pub fn default_export_destination(&self) -> ::std::option::Option<&crate::types::DefaultExportDestination> {
54        self.default_export_destination.as_ref()
55    }
56}
57impl ::std::fmt::Debug for UpdateSettingsInput {
58    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
59        let mut formatter = f.debug_struct("UpdateSettingsInput");
60        formatter.field("sns_topic", &self.sns_topic);
61        formatter.field("default_assessment_reports_destination", &"*** Sensitive Data Redacted ***");
62        formatter.field("default_process_owners", &"*** Sensitive Data Redacted ***");
63        formatter.field("kms_key", &self.kms_key);
64        formatter.field("evidence_finder_enabled", &self.evidence_finder_enabled);
65        formatter.field("deregistration_policy", &self.deregistration_policy);
66        formatter.field("default_export_destination", &self.default_export_destination);
67        formatter.finish()
68    }
69}
70impl UpdateSettingsInput {
71    /// Creates a new builder-style object to manufacture [`UpdateSettingsInput`](crate::operation::update_settings::UpdateSettingsInput).
72    pub fn builder() -> crate::operation::update_settings::builders::UpdateSettingsInputBuilder {
73        crate::operation::update_settings::builders::UpdateSettingsInputBuilder::default()
74    }
75}
76
77/// A builder for [`UpdateSettingsInput`](crate::operation::update_settings::UpdateSettingsInput).
78#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
79#[non_exhaustive]
80pub struct UpdateSettingsInputBuilder {
81    pub(crate) sns_topic: ::std::option::Option<::std::string::String>,
82    pub(crate) default_assessment_reports_destination: ::std::option::Option<crate::types::AssessmentReportsDestination>,
83    pub(crate) default_process_owners: ::std::option::Option<::std::vec::Vec<crate::types::Role>>,
84    pub(crate) kms_key: ::std::option::Option<::std::string::String>,
85    pub(crate) evidence_finder_enabled: ::std::option::Option<bool>,
86    pub(crate) deregistration_policy: ::std::option::Option<crate::types::DeregistrationPolicy>,
87    pub(crate) default_export_destination: ::std::option::Option<crate::types::DefaultExportDestination>,
88}
89impl UpdateSettingsInputBuilder {
90    /// <p>The Amazon Simple Notification Service (Amazon SNS) topic that Audit Manager sends notifications to.</p>
91    pub fn sns_topic(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
92        self.sns_topic = ::std::option::Option::Some(input.into());
93        self
94    }
95    /// <p>The Amazon Simple Notification Service (Amazon SNS) topic that Audit Manager sends notifications to.</p>
96    pub fn set_sns_topic(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
97        self.sns_topic = input;
98        self
99    }
100    /// <p>The Amazon Simple Notification Service (Amazon SNS) topic that Audit Manager sends notifications to.</p>
101    pub fn get_sns_topic(&self) -> &::std::option::Option<::std::string::String> {
102        &self.sns_topic
103    }
104    /// <p>The default S3 destination bucket for storing assessment reports.</p>
105    pub fn default_assessment_reports_destination(mut self, input: crate::types::AssessmentReportsDestination) -> Self {
106        self.default_assessment_reports_destination = ::std::option::Option::Some(input);
107        self
108    }
109    /// <p>The default S3 destination bucket for storing assessment reports.</p>
110    pub fn set_default_assessment_reports_destination(mut self, input: ::std::option::Option<crate::types::AssessmentReportsDestination>) -> Self {
111        self.default_assessment_reports_destination = input;
112        self
113    }
114    /// <p>The default S3 destination bucket for storing assessment reports.</p>
115    pub fn get_default_assessment_reports_destination(&self) -> &::std::option::Option<crate::types::AssessmentReportsDestination> {
116        &self.default_assessment_reports_destination
117    }
118    /// Appends an item to `default_process_owners`.
119    ///
120    /// To override the contents of this collection use [`set_default_process_owners`](Self::set_default_process_owners).
121    ///
122    /// <p>A list of the default audit owners.</p>
123    pub fn default_process_owners(mut self, input: crate::types::Role) -> Self {
124        let mut v = self.default_process_owners.unwrap_or_default();
125        v.push(input);
126        self.default_process_owners = ::std::option::Option::Some(v);
127        self
128    }
129    /// <p>A list of the default audit owners.</p>
130    pub fn set_default_process_owners(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Role>>) -> Self {
131        self.default_process_owners = input;
132        self
133    }
134    /// <p>A list of the default audit owners.</p>
135    pub fn get_default_process_owners(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Role>> {
136        &self.default_process_owners
137    }
138    /// <p>The KMS key details.</p>
139    pub fn kms_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
140        self.kms_key = ::std::option::Option::Some(input.into());
141        self
142    }
143    /// <p>The KMS key details.</p>
144    pub fn set_kms_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
145        self.kms_key = input;
146        self
147    }
148    /// <p>The KMS key details.</p>
149    pub fn get_kms_key(&self) -> &::std::option::Option<::std::string::String> {
150        &self.kms_key
151    }
152    /// <p>Specifies whether the evidence finder feature is enabled. Change this attribute to enable or disable evidence finder.</p><important>
153    /// <p>When you use this attribute to disable evidence finder, Audit Manager deletes the event data store that’s used to query your evidence data. As a result, you can’t re-enable evidence finder and use the feature again. Your only alternative is to <a href="https://docs.aws.amazon.com/audit-manager/latest/APIReference/API_DeregisterAccount.html">deregister</a> and then <a href="https://docs.aws.amazon.com/audit-manager/latest/APIReference/API_RegisterAccount.html">re-register</a> Audit Manager.</p>
154    /// </important>
155    pub fn evidence_finder_enabled(mut self, input: bool) -> Self {
156        self.evidence_finder_enabled = ::std::option::Option::Some(input);
157        self
158    }
159    /// <p>Specifies whether the evidence finder feature is enabled. Change this attribute to enable or disable evidence finder.</p><important>
160    /// <p>When you use this attribute to disable evidence finder, Audit Manager deletes the event data store that’s used to query your evidence data. As a result, you can’t re-enable evidence finder and use the feature again. Your only alternative is to <a href="https://docs.aws.amazon.com/audit-manager/latest/APIReference/API_DeregisterAccount.html">deregister</a> and then <a href="https://docs.aws.amazon.com/audit-manager/latest/APIReference/API_RegisterAccount.html">re-register</a> Audit Manager.</p>
161    /// </important>
162    pub fn set_evidence_finder_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
163        self.evidence_finder_enabled = input;
164        self
165    }
166    /// <p>Specifies whether the evidence finder feature is enabled. Change this attribute to enable or disable evidence finder.</p><important>
167    /// <p>When you use this attribute to disable evidence finder, Audit Manager deletes the event data store that’s used to query your evidence data. As a result, you can’t re-enable evidence finder and use the feature again. Your only alternative is to <a href="https://docs.aws.amazon.com/audit-manager/latest/APIReference/API_DeregisterAccount.html">deregister</a> and then <a href="https://docs.aws.amazon.com/audit-manager/latest/APIReference/API_RegisterAccount.html">re-register</a> Audit Manager.</p>
168    /// </important>
169    pub fn get_evidence_finder_enabled(&self) -> &::std::option::Option<bool> {
170        &self.evidence_finder_enabled
171    }
172    /// <p>The deregistration policy for your Audit Manager data. You can use this attribute to determine how your data is handled when you deregister Audit Manager.</p>
173    pub fn deregistration_policy(mut self, input: crate::types::DeregistrationPolicy) -> Self {
174        self.deregistration_policy = ::std::option::Option::Some(input);
175        self
176    }
177    /// <p>The deregistration policy for your Audit Manager data. You can use this attribute to determine how your data is handled when you deregister Audit Manager.</p>
178    pub fn set_deregistration_policy(mut self, input: ::std::option::Option<crate::types::DeregistrationPolicy>) -> Self {
179        self.deregistration_policy = input;
180        self
181    }
182    /// <p>The deregistration policy for your Audit Manager data. You can use this attribute to determine how your data is handled when you deregister Audit Manager.</p>
183    pub fn get_deregistration_policy(&self) -> &::std::option::Option<crate::types::DeregistrationPolicy> {
184        &self.deregistration_policy
185    }
186    /// <p>The default S3 destination bucket for storing evidence finder exports.</p>
187    pub fn default_export_destination(mut self, input: crate::types::DefaultExportDestination) -> Self {
188        self.default_export_destination = ::std::option::Option::Some(input);
189        self
190    }
191    /// <p>The default S3 destination bucket for storing evidence finder exports.</p>
192    pub fn set_default_export_destination(mut self, input: ::std::option::Option<crate::types::DefaultExportDestination>) -> Self {
193        self.default_export_destination = input;
194        self
195    }
196    /// <p>The default S3 destination bucket for storing evidence finder exports.</p>
197    pub fn get_default_export_destination(&self) -> &::std::option::Option<crate::types::DefaultExportDestination> {
198        &self.default_export_destination
199    }
200    /// Consumes the builder and constructs a [`UpdateSettingsInput`](crate::operation::update_settings::UpdateSettingsInput).
201    pub fn build(
202        self,
203    ) -> ::std::result::Result<crate::operation::update_settings::UpdateSettingsInput, ::aws_smithy_types::error::operation::BuildError> {
204        ::std::result::Result::Ok(crate::operation::update_settings::UpdateSettingsInput {
205            sns_topic: self.sns_topic,
206            default_assessment_reports_destination: self.default_assessment_reports_destination,
207            default_process_owners: self.default_process_owners,
208            kms_key: self.kms_key,
209            evidence_finder_enabled: self.evidence_finder_enabled,
210            deregistration_policy: self.deregistration_policy,
211            default_export_destination: self.default_export_destination,
212        })
213    }
214}
215impl ::std::fmt::Debug for UpdateSettingsInputBuilder {
216    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
217        let mut formatter = f.debug_struct("UpdateSettingsInputBuilder");
218        formatter.field("sns_topic", &self.sns_topic);
219        formatter.field("default_assessment_reports_destination", &"*** Sensitive Data Redacted ***");
220        formatter.field("default_process_owners", &"*** Sensitive Data Redacted ***");
221        formatter.field("kms_key", &self.kms_key);
222        formatter.field("evidence_finder_enabled", &self.evidence_finder_enabled);
223        formatter.field("deregistration_policy", &self.deregistration_policy);
224        formatter.field("default_export_destination", &self.default_export_destination);
225        formatter.finish()
226    }
227}