aws_sdk_detective/operation/get_investigation/
_get_investigation_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 GetInvestigationOutput {
6    /// <p>The Amazon Resource Name (ARN) of the behavior graph.</p>
7    pub graph_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The investigation ID of the investigation report.</p>
9    pub investigation_id: ::std::option::Option<::std::string::String>,
10    /// <p>The unique Amazon Resource Name (ARN). Detective supports IAM user ARNs and IAM role ARNs.</p>
11    pub entity_arn: ::std::option::Option<::std::string::String>,
12    /// <p>Type of entity. For example, Amazon Web Services accounts, such as an IAM user and/or IAM role.</p>
13    pub entity_type: ::std::option::Option<crate::types::EntityType>,
14    /// <p>The creation time of the investigation report in UTC time stamp format.</p>
15    pub created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
16    /// <p>The start date and time used to set the scope time within which you want to generate the investigation report. The value is an UTC ISO8601 formatted string. For example, <code>2021-08-18T16:35:56.284Z</code>.</p>
17    pub scope_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
18    /// <p>The data and time when the investigation began. The value is an UTC ISO8601 formatted string. For example, <code>2021-08-18T16:35:56.284Z</code>.</p>
19    pub scope_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
20    /// <p>The status based on the completion status of the investigation.</p>
21    pub status: ::std::option::Option<crate::types::Status>,
22    /// <p>The severity assigned is based on the likelihood and impact of the indicators of compromise discovered in the investigation.</p>
23    pub severity: ::std::option::Option<crate::types::Severity>,
24    /// <p>The current state of the investigation. An archived investigation indicates that you have completed reviewing the investigation.</p>
25    pub state: ::std::option::Option<crate::types::State>,
26    _request_id: Option<String>,
27}
28impl GetInvestigationOutput {
29    /// <p>The Amazon Resource Name (ARN) of the behavior graph.</p>
30    pub fn graph_arn(&self) -> ::std::option::Option<&str> {
31        self.graph_arn.as_deref()
32    }
33    /// <p>The investigation ID of the investigation report.</p>
34    pub fn investigation_id(&self) -> ::std::option::Option<&str> {
35        self.investigation_id.as_deref()
36    }
37    /// <p>The unique Amazon Resource Name (ARN). Detective supports IAM user ARNs and IAM role ARNs.</p>
38    pub fn entity_arn(&self) -> ::std::option::Option<&str> {
39        self.entity_arn.as_deref()
40    }
41    /// <p>Type of entity. For example, Amazon Web Services accounts, such as an IAM user and/or IAM role.</p>
42    pub fn entity_type(&self) -> ::std::option::Option<&crate::types::EntityType> {
43        self.entity_type.as_ref()
44    }
45    /// <p>The creation time of the investigation report in UTC time stamp format.</p>
46    pub fn created_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
47        self.created_time.as_ref()
48    }
49    /// <p>The start date and time used to set the scope time within which you want to generate the investigation report. The value is an UTC ISO8601 formatted string. For example, <code>2021-08-18T16:35:56.284Z</code>.</p>
50    pub fn scope_start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
51        self.scope_start_time.as_ref()
52    }
53    /// <p>The data and time when the investigation began. The value is an UTC ISO8601 formatted string. For example, <code>2021-08-18T16:35:56.284Z</code>.</p>
54    pub fn scope_end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
55        self.scope_end_time.as_ref()
56    }
57    /// <p>The status based on the completion status of the investigation.</p>
58    pub fn status(&self) -> ::std::option::Option<&crate::types::Status> {
59        self.status.as_ref()
60    }
61    /// <p>The severity assigned is based on the likelihood and impact of the indicators of compromise discovered in the investigation.</p>
62    pub fn severity(&self) -> ::std::option::Option<&crate::types::Severity> {
63        self.severity.as_ref()
64    }
65    /// <p>The current state of the investigation. An archived investigation indicates that you have completed reviewing the investigation.</p>
66    pub fn state(&self) -> ::std::option::Option<&crate::types::State> {
67        self.state.as_ref()
68    }
69}
70impl ::aws_types::request_id::RequestId for GetInvestigationOutput {
71    fn request_id(&self) -> Option<&str> {
72        self._request_id.as_deref()
73    }
74}
75impl GetInvestigationOutput {
76    /// Creates a new builder-style object to manufacture [`GetInvestigationOutput`](crate::operation::get_investigation::GetInvestigationOutput).
77    pub fn builder() -> crate::operation::get_investigation::builders::GetInvestigationOutputBuilder {
78        crate::operation::get_investigation::builders::GetInvestigationOutputBuilder::default()
79    }
80}
81
82/// A builder for [`GetInvestigationOutput`](crate::operation::get_investigation::GetInvestigationOutput).
83#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
84#[non_exhaustive]
85pub struct GetInvestigationOutputBuilder {
86    pub(crate) graph_arn: ::std::option::Option<::std::string::String>,
87    pub(crate) investigation_id: ::std::option::Option<::std::string::String>,
88    pub(crate) entity_arn: ::std::option::Option<::std::string::String>,
89    pub(crate) entity_type: ::std::option::Option<crate::types::EntityType>,
90    pub(crate) created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
91    pub(crate) scope_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
92    pub(crate) scope_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
93    pub(crate) status: ::std::option::Option<crate::types::Status>,
94    pub(crate) severity: ::std::option::Option<crate::types::Severity>,
95    pub(crate) state: ::std::option::Option<crate::types::State>,
96    _request_id: Option<String>,
97}
98impl GetInvestigationOutputBuilder {
99    /// <p>The Amazon Resource Name (ARN) of the behavior graph.</p>
100    pub fn graph_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101        self.graph_arn = ::std::option::Option::Some(input.into());
102        self
103    }
104    /// <p>The Amazon Resource Name (ARN) of the behavior graph.</p>
105    pub fn set_graph_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106        self.graph_arn = input;
107        self
108    }
109    /// <p>The Amazon Resource Name (ARN) of the behavior graph.</p>
110    pub fn get_graph_arn(&self) -> &::std::option::Option<::std::string::String> {
111        &self.graph_arn
112    }
113    /// <p>The investigation ID of the investigation report.</p>
114    pub fn investigation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115        self.investigation_id = ::std::option::Option::Some(input.into());
116        self
117    }
118    /// <p>The investigation ID of the investigation report.</p>
119    pub fn set_investigation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.investigation_id = input;
121        self
122    }
123    /// <p>The investigation ID of the investigation report.</p>
124    pub fn get_investigation_id(&self) -> &::std::option::Option<::std::string::String> {
125        &self.investigation_id
126    }
127    /// <p>The unique Amazon Resource Name (ARN). Detective supports IAM user ARNs and IAM role ARNs.</p>
128    pub fn entity_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129        self.entity_arn = ::std::option::Option::Some(input.into());
130        self
131    }
132    /// <p>The unique Amazon Resource Name (ARN). Detective supports IAM user ARNs and IAM role ARNs.</p>
133    pub fn set_entity_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.entity_arn = input;
135        self
136    }
137    /// <p>The unique Amazon Resource Name (ARN). Detective supports IAM user ARNs and IAM role ARNs.</p>
138    pub fn get_entity_arn(&self) -> &::std::option::Option<::std::string::String> {
139        &self.entity_arn
140    }
141    /// <p>Type of entity. For example, Amazon Web Services accounts, such as an IAM user and/or IAM role.</p>
142    pub fn entity_type(mut self, input: crate::types::EntityType) -> Self {
143        self.entity_type = ::std::option::Option::Some(input);
144        self
145    }
146    /// <p>Type of entity. For example, Amazon Web Services accounts, such as an IAM user and/or IAM role.</p>
147    pub fn set_entity_type(mut self, input: ::std::option::Option<crate::types::EntityType>) -> Self {
148        self.entity_type = input;
149        self
150    }
151    /// <p>Type of entity. For example, Amazon Web Services accounts, such as an IAM user and/or IAM role.</p>
152    pub fn get_entity_type(&self) -> &::std::option::Option<crate::types::EntityType> {
153        &self.entity_type
154    }
155    /// <p>The creation time of the investigation report in UTC time stamp format.</p>
156    pub fn created_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
157        self.created_time = ::std::option::Option::Some(input);
158        self
159    }
160    /// <p>The creation time of the investigation report in UTC time stamp format.</p>
161    pub fn set_created_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
162        self.created_time = input;
163        self
164    }
165    /// <p>The creation time of the investigation report in UTC time stamp format.</p>
166    pub fn get_created_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
167        &self.created_time
168    }
169    /// <p>The start date and time used to set the scope time within which you want to generate the investigation report. The value is an UTC ISO8601 formatted string. For example, <code>2021-08-18T16:35:56.284Z</code>.</p>
170    pub fn scope_start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
171        self.scope_start_time = ::std::option::Option::Some(input);
172        self
173    }
174    /// <p>The start date and time used to set the scope time within which you want to generate the investigation report. The value is an UTC ISO8601 formatted string. For example, <code>2021-08-18T16:35:56.284Z</code>.</p>
175    pub fn set_scope_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
176        self.scope_start_time = input;
177        self
178    }
179    /// <p>The start date and time used to set the scope time within which you want to generate the investigation report. The value is an UTC ISO8601 formatted string. For example, <code>2021-08-18T16:35:56.284Z</code>.</p>
180    pub fn get_scope_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
181        &self.scope_start_time
182    }
183    /// <p>The data and time when the investigation began. The value is an UTC ISO8601 formatted string. For example, <code>2021-08-18T16:35:56.284Z</code>.</p>
184    pub fn scope_end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
185        self.scope_end_time = ::std::option::Option::Some(input);
186        self
187    }
188    /// <p>The data and time when the investigation began. The value is an UTC ISO8601 formatted string. For example, <code>2021-08-18T16:35:56.284Z</code>.</p>
189    pub fn set_scope_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
190        self.scope_end_time = input;
191        self
192    }
193    /// <p>The data and time when the investigation began. The value is an UTC ISO8601 formatted string. For example, <code>2021-08-18T16:35:56.284Z</code>.</p>
194    pub fn get_scope_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
195        &self.scope_end_time
196    }
197    /// <p>The status based on the completion status of the investigation.</p>
198    pub fn status(mut self, input: crate::types::Status) -> Self {
199        self.status = ::std::option::Option::Some(input);
200        self
201    }
202    /// <p>The status based on the completion status of the investigation.</p>
203    pub fn set_status(mut self, input: ::std::option::Option<crate::types::Status>) -> Self {
204        self.status = input;
205        self
206    }
207    /// <p>The status based on the completion status of the investigation.</p>
208    pub fn get_status(&self) -> &::std::option::Option<crate::types::Status> {
209        &self.status
210    }
211    /// <p>The severity assigned is based on the likelihood and impact of the indicators of compromise discovered in the investigation.</p>
212    pub fn severity(mut self, input: crate::types::Severity) -> Self {
213        self.severity = ::std::option::Option::Some(input);
214        self
215    }
216    /// <p>The severity assigned is based on the likelihood and impact of the indicators of compromise discovered in the investigation.</p>
217    pub fn set_severity(mut self, input: ::std::option::Option<crate::types::Severity>) -> Self {
218        self.severity = input;
219        self
220    }
221    /// <p>The severity assigned is based on the likelihood and impact of the indicators of compromise discovered in the investigation.</p>
222    pub fn get_severity(&self) -> &::std::option::Option<crate::types::Severity> {
223        &self.severity
224    }
225    /// <p>The current state of the investigation. An archived investigation indicates that you have completed reviewing the investigation.</p>
226    pub fn state(mut self, input: crate::types::State) -> Self {
227        self.state = ::std::option::Option::Some(input);
228        self
229    }
230    /// <p>The current state of the investigation. An archived investigation indicates that you have completed reviewing the investigation.</p>
231    pub fn set_state(mut self, input: ::std::option::Option<crate::types::State>) -> Self {
232        self.state = input;
233        self
234    }
235    /// <p>The current state of the investigation. An archived investigation indicates that you have completed reviewing the investigation.</p>
236    pub fn get_state(&self) -> &::std::option::Option<crate::types::State> {
237        &self.state
238    }
239    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
240        self._request_id = Some(request_id.into());
241        self
242    }
243
244    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
245        self._request_id = request_id;
246        self
247    }
248    /// Consumes the builder and constructs a [`GetInvestigationOutput`](crate::operation::get_investigation::GetInvestigationOutput).
249    pub fn build(self) -> crate::operation::get_investigation::GetInvestigationOutput {
250        crate::operation::get_investigation::GetInvestigationOutput {
251            graph_arn: self.graph_arn,
252            investigation_id: self.investigation_id,
253            entity_arn: self.entity_arn,
254            entity_type: self.entity_type,
255            created_time: self.created_time,
256            scope_start_time: self.scope_start_time,
257            scope_end_time: self.scope_end_time,
258            status: self.status,
259            severity: self.severity,
260            state: self.state,
261            _request_id: self._request_id,
262        }
263    }
264}