aws_sdk_securityir/operation/get_case/
_get_case_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct GetCaseOutput {
6 pub title: ::std::option::Option<::std::string::String>,
8 pub case_arn: ::std::option::Option<::std::string::String>,
10 pub description: ::std::option::Option<::std::string::String>,
12 pub case_status: ::std::option::Option<crate::types::CaseStatus>,
14 pub engagement_type: ::std::option::Option<crate::types::EngagementType>,
16 pub reported_incident_start_date: ::std::option::Option<::aws_smithy_types::DateTime>,
18 pub actual_incident_start_date: ::std::option::Option<::aws_smithy_types::DateTime>,
20 pub impacted_aws_regions: ::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>>,
22 pub threat_actor_ip_addresses: ::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>>,
24 pub pending_action: ::std::option::Option<crate::types::PendingAction>,
26 pub impacted_accounts: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
28 pub watchers: ::std::option::Option<::std::vec::Vec<crate::types::Watcher>>,
30 pub created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
32 pub last_updated_date: ::std::option::Option<::aws_smithy_types::DateTime>,
34 pub closure_code: ::std::option::Option<crate::types::ClosureCode>,
36 pub resolver_type: ::std::option::Option<crate::types::ResolverType>,
38 pub impacted_services: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
40 pub case_attachments: ::std::option::Option<::std::vec::Vec<crate::types::CaseAttachmentAttributes>>,
42 pub closed_date: ::std::option::Option<::aws_smithy_types::DateTime>,
44 _request_id: Option<String>,
45}
46impl GetCaseOutput {
47 pub fn title(&self) -> ::std::option::Option<&str> {
49 self.title.as_deref()
50 }
51 pub fn case_arn(&self) -> ::std::option::Option<&str> {
53 self.case_arn.as_deref()
54 }
55 pub fn description(&self) -> ::std::option::Option<&str> {
57 self.description.as_deref()
58 }
59 pub fn case_status(&self) -> ::std::option::Option<&crate::types::CaseStatus> {
61 self.case_status.as_ref()
62 }
63 pub fn engagement_type(&self) -> ::std::option::Option<&crate::types::EngagementType> {
65 self.engagement_type.as_ref()
66 }
67 pub fn reported_incident_start_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
69 self.reported_incident_start_date.as_ref()
70 }
71 pub fn actual_incident_start_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
73 self.actual_incident_start_date.as_ref()
74 }
75 pub fn impacted_aws_regions(&self) -> &[crate::types::ImpactedAwsRegion] {
79 self.impacted_aws_regions.as_deref().unwrap_or_default()
80 }
81 pub fn threat_actor_ip_addresses(&self) -> &[crate::types::ThreatActorIp] {
85 self.threat_actor_ip_addresses.as_deref().unwrap_or_default()
86 }
87 pub fn pending_action(&self) -> ::std::option::Option<&crate::types::PendingAction> {
89 self.pending_action.as_ref()
90 }
91 pub fn impacted_accounts(&self) -> &[::std::string::String] {
95 self.impacted_accounts.as_deref().unwrap_or_default()
96 }
97 pub fn watchers(&self) -> &[crate::types::Watcher] {
101 self.watchers.as_deref().unwrap_or_default()
102 }
103 pub fn created_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
105 self.created_date.as_ref()
106 }
107 pub fn last_updated_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
109 self.last_updated_date.as_ref()
110 }
111 pub fn closure_code(&self) -> ::std::option::Option<&crate::types::ClosureCode> {
113 self.closure_code.as_ref()
114 }
115 pub fn resolver_type(&self) -> ::std::option::Option<&crate::types::ResolverType> {
117 self.resolver_type.as_ref()
118 }
119 pub fn impacted_services(&self) -> &[::std::string::String] {
123 self.impacted_services.as_deref().unwrap_or_default()
124 }
125 pub fn case_attachments(&self) -> &[crate::types::CaseAttachmentAttributes] {
129 self.case_attachments.as_deref().unwrap_or_default()
130 }
131 pub fn closed_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
133 self.closed_date.as_ref()
134 }
135}
136impl ::std::fmt::Debug for GetCaseOutput {
137 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
138 let mut formatter = f.debug_struct("GetCaseOutput");
139 formatter.field("title", &"*** Sensitive Data Redacted ***");
140 formatter.field("case_arn", &self.case_arn);
141 formatter.field("description", &"*** Sensitive Data Redacted ***");
142 formatter.field("case_status", &self.case_status);
143 formatter.field("engagement_type", &self.engagement_type);
144 formatter.field("reported_incident_start_date", &self.reported_incident_start_date);
145 formatter.field("actual_incident_start_date", &self.actual_incident_start_date);
146 formatter.field("impacted_aws_regions", &self.impacted_aws_regions);
147 formatter.field("threat_actor_ip_addresses", &self.threat_actor_ip_addresses);
148 formatter.field("pending_action", &self.pending_action);
149 formatter.field("impacted_accounts", &self.impacted_accounts);
150 formatter.field("watchers", &self.watchers);
151 formatter.field("created_date", &self.created_date);
152 formatter.field("last_updated_date", &self.last_updated_date);
153 formatter.field("closure_code", &self.closure_code);
154 formatter.field("resolver_type", &self.resolver_type);
155 formatter.field("impacted_services", &self.impacted_services);
156 formatter.field("case_attachments", &self.case_attachments);
157 formatter.field("closed_date", &self.closed_date);
158 formatter.field("_request_id", &self._request_id);
159 formatter.finish()
160 }
161}
162impl ::aws_types::request_id::RequestId for GetCaseOutput {
163 fn request_id(&self) -> Option<&str> {
164 self._request_id.as_deref()
165 }
166}
167impl GetCaseOutput {
168 pub fn builder() -> crate::operation::get_case::builders::GetCaseOutputBuilder {
170 crate::operation::get_case::builders::GetCaseOutputBuilder::default()
171 }
172}
173
174#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
176#[non_exhaustive]
177pub struct GetCaseOutputBuilder {
178 pub(crate) title: ::std::option::Option<::std::string::String>,
179 pub(crate) case_arn: ::std::option::Option<::std::string::String>,
180 pub(crate) description: ::std::option::Option<::std::string::String>,
181 pub(crate) case_status: ::std::option::Option<crate::types::CaseStatus>,
182 pub(crate) engagement_type: ::std::option::Option<crate::types::EngagementType>,
183 pub(crate) reported_incident_start_date: ::std::option::Option<::aws_smithy_types::DateTime>,
184 pub(crate) actual_incident_start_date: ::std::option::Option<::aws_smithy_types::DateTime>,
185 pub(crate) impacted_aws_regions: ::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>>,
186 pub(crate) threat_actor_ip_addresses: ::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>>,
187 pub(crate) pending_action: ::std::option::Option<crate::types::PendingAction>,
188 pub(crate) impacted_accounts: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
189 pub(crate) watchers: ::std::option::Option<::std::vec::Vec<crate::types::Watcher>>,
190 pub(crate) created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
191 pub(crate) last_updated_date: ::std::option::Option<::aws_smithy_types::DateTime>,
192 pub(crate) closure_code: ::std::option::Option<crate::types::ClosureCode>,
193 pub(crate) resolver_type: ::std::option::Option<crate::types::ResolverType>,
194 pub(crate) impacted_services: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
195 pub(crate) case_attachments: ::std::option::Option<::std::vec::Vec<crate::types::CaseAttachmentAttributes>>,
196 pub(crate) closed_date: ::std::option::Option<::aws_smithy_types::DateTime>,
197 _request_id: Option<String>,
198}
199impl GetCaseOutputBuilder {
200 pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
202 self.title = ::std::option::Option::Some(input.into());
203 self
204 }
205 pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
207 self.title = input;
208 self
209 }
210 pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
212 &self.title
213 }
214 pub fn case_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
216 self.case_arn = ::std::option::Option::Some(input.into());
217 self
218 }
219 pub fn set_case_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
221 self.case_arn = input;
222 self
223 }
224 pub fn get_case_arn(&self) -> &::std::option::Option<::std::string::String> {
226 &self.case_arn
227 }
228 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
230 self.description = ::std::option::Option::Some(input.into());
231 self
232 }
233 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
235 self.description = input;
236 self
237 }
238 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
240 &self.description
241 }
242 pub fn case_status(mut self, input: crate::types::CaseStatus) -> Self {
244 self.case_status = ::std::option::Option::Some(input);
245 self
246 }
247 pub fn set_case_status(mut self, input: ::std::option::Option<crate::types::CaseStatus>) -> Self {
249 self.case_status = input;
250 self
251 }
252 pub fn get_case_status(&self) -> &::std::option::Option<crate::types::CaseStatus> {
254 &self.case_status
255 }
256 pub fn engagement_type(mut self, input: crate::types::EngagementType) -> Self {
258 self.engagement_type = ::std::option::Option::Some(input);
259 self
260 }
261 pub fn set_engagement_type(mut self, input: ::std::option::Option<crate::types::EngagementType>) -> Self {
263 self.engagement_type = input;
264 self
265 }
266 pub fn get_engagement_type(&self) -> &::std::option::Option<crate::types::EngagementType> {
268 &self.engagement_type
269 }
270 pub fn reported_incident_start_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
272 self.reported_incident_start_date = ::std::option::Option::Some(input);
273 self
274 }
275 pub fn set_reported_incident_start_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
277 self.reported_incident_start_date = input;
278 self
279 }
280 pub fn get_reported_incident_start_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
282 &self.reported_incident_start_date
283 }
284 pub fn actual_incident_start_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
286 self.actual_incident_start_date = ::std::option::Option::Some(input);
287 self
288 }
289 pub fn set_actual_incident_start_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
291 self.actual_incident_start_date = input;
292 self
293 }
294 pub fn get_actual_incident_start_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
296 &self.actual_incident_start_date
297 }
298 pub fn impacted_aws_regions(mut self, input: crate::types::ImpactedAwsRegion) -> Self {
304 let mut v = self.impacted_aws_regions.unwrap_or_default();
305 v.push(input);
306 self.impacted_aws_regions = ::std::option::Option::Some(v);
307 self
308 }
309 pub fn set_impacted_aws_regions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>>) -> Self {
311 self.impacted_aws_regions = input;
312 self
313 }
314 pub fn get_impacted_aws_regions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>> {
316 &self.impacted_aws_regions
317 }
318 pub fn threat_actor_ip_addresses(mut self, input: crate::types::ThreatActorIp) -> Self {
324 let mut v = self.threat_actor_ip_addresses.unwrap_or_default();
325 v.push(input);
326 self.threat_actor_ip_addresses = ::std::option::Option::Some(v);
327 self
328 }
329 pub fn set_threat_actor_ip_addresses(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>>) -> Self {
331 self.threat_actor_ip_addresses = input;
332 self
333 }
334 pub fn get_threat_actor_ip_addresses(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>> {
336 &self.threat_actor_ip_addresses
337 }
338 pub fn pending_action(mut self, input: crate::types::PendingAction) -> Self {
340 self.pending_action = ::std::option::Option::Some(input);
341 self
342 }
343 pub fn set_pending_action(mut self, input: ::std::option::Option<crate::types::PendingAction>) -> Self {
345 self.pending_action = input;
346 self
347 }
348 pub fn get_pending_action(&self) -> &::std::option::Option<crate::types::PendingAction> {
350 &self.pending_action
351 }
352 pub fn impacted_accounts(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
358 let mut v = self.impacted_accounts.unwrap_or_default();
359 v.push(input.into());
360 self.impacted_accounts = ::std::option::Option::Some(v);
361 self
362 }
363 pub fn set_impacted_accounts(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
365 self.impacted_accounts = input;
366 self
367 }
368 pub fn get_impacted_accounts(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
370 &self.impacted_accounts
371 }
372 pub fn watchers(mut self, input: crate::types::Watcher) -> Self {
378 let mut v = self.watchers.unwrap_or_default();
379 v.push(input);
380 self.watchers = ::std::option::Option::Some(v);
381 self
382 }
383 pub fn set_watchers(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Watcher>>) -> Self {
385 self.watchers = input;
386 self
387 }
388 pub fn get_watchers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Watcher>> {
390 &self.watchers
391 }
392 pub fn created_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
394 self.created_date = ::std::option::Option::Some(input);
395 self
396 }
397 pub fn set_created_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
399 self.created_date = input;
400 self
401 }
402 pub fn get_created_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
404 &self.created_date
405 }
406 pub fn last_updated_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
408 self.last_updated_date = ::std::option::Option::Some(input);
409 self
410 }
411 pub fn set_last_updated_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
413 self.last_updated_date = input;
414 self
415 }
416 pub fn get_last_updated_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
418 &self.last_updated_date
419 }
420 pub fn closure_code(mut self, input: crate::types::ClosureCode) -> Self {
422 self.closure_code = ::std::option::Option::Some(input);
423 self
424 }
425 pub fn set_closure_code(mut self, input: ::std::option::Option<crate::types::ClosureCode>) -> Self {
427 self.closure_code = input;
428 self
429 }
430 pub fn get_closure_code(&self) -> &::std::option::Option<crate::types::ClosureCode> {
432 &self.closure_code
433 }
434 pub fn resolver_type(mut self, input: crate::types::ResolverType) -> Self {
436 self.resolver_type = ::std::option::Option::Some(input);
437 self
438 }
439 pub fn set_resolver_type(mut self, input: ::std::option::Option<crate::types::ResolverType>) -> Self {
441 self.resolver_type = input;
442 self
443 }
444 pub fn get_resolver_type(&self) -> &::std::option::Option<crate::types::ResolverType> {
446 &self.resolver_type
447 }
448 pub fn impacted_services(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
454 let mut v = self.impacted_services.unwrap_or_default();
455 v.push(input.into());
456 self.impacted_services = ::std::option::Option::Some(v);
457 self
458 }
459 pub fn set_impacted_services(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
461 self.impacted_services = input;
462 self
463 }
464 pub fn get_impacted_services(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
466 &self.impacted_services
467 }
468 pub fn case_attachments(mut self, input: crate::types::CaseAttachmentAttributes) -> Self {
474 let mut v = self.case_attachments.unwrap_or_default();
475 v.push(input);
476 self.case_attachments = ::std::option::Option::Some(v);
477 self
478 }
479 pub fn set_case_attachments(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CaseAttachmentAttributes>>) -> Self {
481 self.case_attachments = input;
482 self
483 }
484 pub fn get_case_attachments(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CaseAttachmentAttributes>> {
486 &self.case_attachments
487 }
488 pub fn closed_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
490 self.closed_date = ::std::option::Option::Some(input);
491 self
492 }
493 pub fn set_closed_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
495 self.closed_date = input;
496 self
497 }
498 pub fn get_closed_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
500 &self.closed_date
501 }
502 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
503 self._request_id = Some(request_id.into());
504 self
505 }
506
507 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
508 self._request_id = request_id;
509 self
510 }
511 pub fn build(self) -> crate::operation::get_case::GetCaseOutput {
513 crate::operation::get_case::GetCaseOutput {
514 title: self.title,
515 case_arn: self.case_arn,
516 description: self.description,
517 case_status: self.case_status,
518 engagement_type: self.engagement_type,
519 reported_incident_start_date: self.reported_incident_start_date,
520 actual_incident_start_date: self.actual_incident_start_date,
521 impacted_aws_regions: self.impacted_aws_regions,
522 threat_actor_ip_addresses: self.threat_actor_ip_addresses,
523 pending_action: self.pending_action,
524 impacted_accounts: self.impacted_accounts,
525 watchers: self.watchers,
526 created_date: self.created_date,
527 last_updated_date: self.last_updated_date,
528 closure_code: self.closure_code,
529 resolver_type: self.resolver_type,
530 impacted_services: self.impacted_services,
531 case_attachments: self.case_attachments,
532 closed_date: self.closed_date,
533 _request_id: self._request_id,
534 }
535 }
536}
537impl ::std::fmt::Debug for GetCaseOutputBuilder {
538 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
539 let mut formatter = f.debug_struct("GetCaseOutputBuilder");
540 formatter.field("title", &"*** Sensitive Data Redacted ***");
541 formatter.field("case_arn", &self.case_arn);
542 formatter.field("description", &"*** Sensitive Data Redacted ***");
543 formatter.field("case_status", &self.case_status);
544 formatter.field("engagement_type", &self.engagement_type);
545 formatter.field("reported_incident_start_date", &self.reported_incident_start_date);
546 formatter.field("actual_incident_start_date", &self.actual_incident_start_date);
547 formatter.field("impacted_aws_regions", &self.impacted_aws_regions);
548 formatter.field("threat_actor_ip_addresses", &self.threat_actor_ip_addresses);
549 formatter.field("pending_action", &self.pending_action);
550 formatter.field("impacted_accounts", &self.impacted_accounts);
551 formatter.field("watchers", &self.watchers);
552 formatter.field("created_date", &self.created_date);
553 formatter.field("last_updated_date", &self.last_updated_date);
554 formatter.field("closure_code", &self.closure_code);
555 formatter.field("resolver_type", &self.resolver_type);
556 formatter.field("impacted_services", &self.impacted_services);
557 formatter.field("case_attachments", &self.case_attachments);
558 formatter.field("closed_date", &self.closed_date);
559 formatter.field("_request_id", &self._request_id);
560 formatter.finish()
561 }
562}