Skip to main content

aws_sdk_macie2/operation/get_sensitive_data_occurrences/
_get_sensitive_data_occurrences_output.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 GetSensitiveDataOccurrencesOutput {
6    /// <p>If an error occurred when Amazon Macie attempted to retrieve occurrences of sensitive data reported by the finding, a description of the error that occurred. This value is null if the status (status) of the request is PROCESSING or SUCCESS.</p>
7    pub error: ::std::option::Option<::std::string::String>,
8    /// <p>A map that specifies 1-100 types of sensitive data reported by the finding and, for each type, 1-10 occurrences of sensitive data.</p>
9    pub sensitive_data_occurrences:
10        ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::DetectedDataDetails>>>,
11    /// <p>The status of the request to retrieve occurrences of sensitive data reported by the finding. Possible values are:</p>
12    /// <ul>
13    /// <li>
14    /// <p>ERROR - An error occurred when Amazon Macie attempted to locate, retrieve, or encrypt the sensitive data. The error value indicates the nature of the error that occurred.</p></li>
15    /// <li>
16    /// <p>PROCESSING - Macie is processing the request.</p></li>
17    /// <li>
18    /// <p>SUCCESS - Macie successfully located, retrieved, and encrypted the sensitive data.</p></li>
19    /// </ul>
20    pub status: ::std::option::Option<crate::types::RevealRequestStatus>,
21    _request_id: Option<String>,
22}
23impl GetSensitiveDataOccurrencesOutput {
24    /// <p>If an error occurred when Amazon Macie attempted to retrieve occurrences of sensitive data reported by the finding, a description of the error that occurred. This value is null if the status (status) of the request is PROCESSING or SUCCESS.</p>
25    pub fn error(&self) -> ::std::option::Option<&str> {
26        self.error.as_deref()
27    }
28    /// <p>A map that specifies 1-100 types of sensitive data reported by the finding and, for each type, 1-10 occurrences of sensitive data.</p>
29    pub fn sensitive_data_occurrences(
30        &self,
31    ) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::DetectedDataDetails>>> {
32        self.sensitive_data_occurrences.as_ref()
33    }
34    /// <p>The status of the request to retrieve occurrences of sensitive data reported by the finding. Possible values are:</p>
35    /// <ul>
36    /// <li>
37    /// <p>ERROR - An error occurred when Amazon Macie attempted to locate, retrieve, or encrypt the sensitive data. The error value indicates the nature of the error that occurred.</p></li>
38    /// <li>
39    /// <p>PROCESSING - Macie is processing the request.</p></li>
40    /// <li>
41    /// <p>SUCCESS - Macie successfully located, retrieved, and encrypted the sensitive data.</p></li>
42    /// </ul>
43    pub fn status(&self) -> ::std::option::Option<&crate::types::RevealRequestStatus> {
44        self.status.as_ref()
45    }
46}
47impl ::aws_types::request_id::RequestId for GetSensitiveDataOccurrencesOutput {
48    fn request_id(&self) -> Option<&str> {
49        self._request_id.as_deref()
50    }
51}
52impl GetSensitiveDataOccurrencesOutput {
53    /// Creates a new builder-style object to manufacture [`GetSensitiveDataOccurrencesOutput`](crate::operation::get_sensitive_data_occurrences::GetSensitiveDataOccurrencesOutput).
54    pub fn builder() -> crate::operation::get_sensitive_data_occurrences::builders::GetSensitiveDataOccurrencesOutputBuilder {
55        crate::operation::get_sensitive_data_occurrences::builders::GetSensitiveDataOccurrencesOutputBuilder::default()
56    }
57}
58
59/// A builder for [`GetSensitiveDataOccurrencesOutput`](crate::operation::get_sensitive_data_occurrences::GetSensitiveDataOccurrencesOutput).
60#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
61#[non_exhaustive]
62pub struct GetSensitiveDataOccurrencesOutputBuilder {
63    pub(crate) error: ::std::option::Option<::std::string::String>,
64    pub(crate) sensitive_data_occurrences:
65        ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::DetectedDataDetails>>>,
66    pub(crate) status: ::std::option::Option<crate::types::RevealRequestStatus>,
67    _request_id: Option<String>,
68}
69impl GetSensitiveDataOccurrencesOutputBuilder {
70    /// <p>If an error occurred when Amazon Macie attempted to retrieve occurrences of sensitive data reported by the finding, a description of the error that occurred. This value is null if the status (status) of the request is PROCESSING or SUCCESS.</p>
71    pub fn error(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
72        self.error = ::std::option::Option::Some(input.into());
73        self
74    }
75    /// <p>If an error occurred when Amazon Macie attempted to retrieve occurrences of sensitive data reported by the finding, a description of the error that occurred. This value is null if the status (status) of the request is PROCESSING or SUCCESS.</p>
76    pub fn set_error(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
77        self.error = input;
78        self
79    }
80    /// <p>If an error occurred when Amazon Macie attempted to retrieve occurrences of sensitive data reported by the finding, a description of the error that occurred. This value is null if the status (status) of the request is PROCESSING or SUCCESS.</p>
81    pub fn get_error(&self) -> &::std::option::Option<::std::string::String> {
82        &self.error
83    }
84    /// Adds a key-value pair to `sensitive_data_occurrences`.
85    ///
86    /// To override the contents of this collection use [`set_sensitive_data_occurrences`](Self::set_sensitive_data_occurrences).
87    ///
88    /// <p>A map that specifies 1-100 types of sensitive data reported by the finding and, for each type, 1-10 occurrences of sensitive data.</p>
89    pub fn sensitive_data_occurrences(
90        mut self,
91        k: impl ::std::convert::Into<::std::string::String>,
92        v: ::std::vec::Vec<crate::types::DetectedDataDetails>,
93    ) -> Self {
94        let mut hash_map = self.sensitive_data_occurrences.unwrap_or_default();
95        hash_map.insert(k.into(), v);
96        self.sensitive_data_occurrences = ::std::option::Option::Some(hash_map);
97        self
98    }
99    /// <p>A map that specifies 1-100 types of sensitive data reported by the finding and, for each type, 1-10 occurrences of sensitive data.</p>
100    pub fn set_sensitive_data_occurrences(
101        mut self,
102        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::DetectedDataDetails>>>,
103    ) -> Self {
104        self.sensitive_data_occurrences = input;
105        self
106    }
107    /// <p>A map that specifies 1-100 types of sensitive data reported by the finding and, for each type, 1-10 occurrences of sensitive data.</p>
108    pub fn get_sensitive_data_occurrences(
109        &self,
110    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::DetectedDataDetails>>> {
111        &self.sensitive_data_occurrences
112    }
113    /// <p>The status of the request to retrieve occurrences of sensitive data reported by the finding. Possible values are:</p>
114    /// <ul>
115    /// <li>
116    /// <p>ERROR - An error occurred when Amazon Macie attempted to locate, retrieve, or encrypt the sensitive data. The error value indicates the nature of the error that occurred.</p></li>
117    /// <li>
118    /// <p>PROCESSING - Macie is processing the request.</p></li>
119    /// <li>
120    /// <p>SUCCESS - Macie successfully located, retrieved, and encrypted the sensitive data.</p></li>
121    /// </ul>
122    pub fn status(mut self, input: crate::types::RevealRequestStatus) -> Self {
123        self.status = ::std::option::Option::Some(input);
124        self
125    }
126    /// <p>The status of the request to retrieve occurrences of sensitive data reported by the finding. Possible values are:</p>
127    /// <ul>
128    /// <li>
129    /// <p>ERROR - An error occurred when Amazon Macie attempted to locate, retrieve, or encrypt the sensitive data. The error value indicates the nature of the error that occurred.</p></li>
130    /// <li>
131    /// <p>PROCESSING - Macie is processing the request.</p></li>
132    /// <li>
133    /// <p>SUCCESS - Macie successfully located, retrieved, and encrypted the sensitive data.</p></li>
134    /// </ul>
135    pub fn set_status(mut self, input: ::std::option::Option<crate::types::RevealRequestStatus>) -> Self {
136        self.status = input;
137        self
138    }
139    /// <p>The status of the request to retrieve occurrences of sensitive data reported by the finding. Possible values are:</p>
140    /// <ul>
141    /// <li>
142    /// <p>ERROR - An error occurred when Amazon Macie attempted to locate, retrieve, or encrypt the sensitive data. The error value indicates the nature of the error that occurred.</p></li>
143    /// <li>
144    /// <p>PROCESSING - Macie is processing the request.</p></li>
145    /// <li>
146    /// <p>SUCCESS - Macie successfully located, retrieved, and encrypted the sensitive data.</p></li>
147    /// </ul>
148    pub fn get_status(&self) -> &::std::option::Option<crate::types::RevealRequestStatus> {
149        &self.status
150    }
151    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
152        self._request_id = Some(request_id.into());
153        self
154    }
155
156    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
157        self._request_id = request_id;
158        self
159    }
160    /// Consumes the builder and constructs a [`GetSensitiveDataOccurrencesOutput`](crate::operation::get_sensitive_data_occurrences::GetSensitiveDataOccurrencesOutput).
161    pub fn build(self) -> crate::operation::get_sensitive_data_occurrences::GetSensitiveDataOccurrencesOutput {
162        crate::operation::get_sensitive_data_occurrences::GetSensitiveDataOccurrencesOutput {
163            error: self.error,
164            sensitive_data_occurrences: self.sensitive_data_occurrences,
165            status: self.status,
166            _request_id: self._request_id,
167        }
168    }
169}