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 pub case_metadata: ::std::option::Option<::std::vec::Vec<crate::types::CaseMetadataEntry>>,
46 _request_id: Option<String>,
47}
48impl GetCaseOutput {
49 pub fn title(&self) -> ::std::option::Option<&str> {
51 self.title.as_deref()
52 }
53 pub fn case_arn(&self) -> ::std::option::Option<&str> {
55 self.case_arn.as_deref()
56 }
57 pub fn description(&self) -> ::std::option::Option<&str> {
59 self.description.as_deref()
60 }
61 pub fn case_status(&self) -> ::std::option::Option<&crate::types::CaseStatus> {
63 self.case_status.as_ref()
64 }
65 pub fn engagement_type(&self) -> ::std::option::Option<&crate::types::EngagementType> {
67 self.engagement_type.as_ref()
68 }
69 pub fn reported_incident_start_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
71 self.reported_incident_start_date.as_ref()
72 }
73 pub fn actual_incident_start_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
75 self.actual_incident_start_date.as_ref()
76 }
77 pub fn impacted_aws_regions(&self) -> &[crate::types::ImpactedAwsRegion] {
81 self.impacted_aws_regions.as_deref().unwrap_or_default()
82 }
83 pub fn threat_actor_ip_addresses(&self) -> &[crate::types::ThreatActorIp] {
87 self.threat_actor_ip_addresses.as_deref().unwrap_or_default()
88 }
89 pub fn pending_action(&self) -> ::std::option::Option<&crate::types::PendingAction> {
91 self.pending_action.as_ref()
92 }
93 pub fn impacted_accounts(&self) -> &[::std::string::String] {
97 self.impacted_accounts.as_deref().unwrap_or_default()
98 }
99 pub fn watchers(&self) -> &[crate::types::Watcher] {
103 self.watchers.as_deref().unwrap_or_default()
104 }
105 pub fn created_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
107 self.created_date.as_ref()
108 }
109 pub fn last_updated_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
111 self.last_updated_date.as_ref()
112 }
113 pub fn closure_code(&self) -> ::std::option::Option<&crate::types::ClosureCode> {
115 self.closure_code.as_ref()
116 }
117 pub fn resolver_type(&self) -> ::std::option::Option<&crate::types::ResolverType> {
119 self.resolver_type.as_ref()
120 }
121 pub fn impacted_services(&self) -> &[::std::string::String] {
125 self.impacted_services.as_deref().unwrap_or_default()
126 }
127 pub fn case_attachments(&self) -> &[crate::types::CaseAttachmentAttributes] {
131 self.case_attachments.as_deref().unwrap_or_default()
132 }
133 pub fn closed_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
135 self.closed_date.as_ref()
136 }
137 pub fn case_metadata(&self) -> &[crate::types::CaseMetadataEntry] {
141 self.case_metadata.as_deref().unwrap_or_default()
142 }
143}
144impl ::std::fmt::Debug for GetCaseOutput {
145 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
146 let mut formatter = f.debug_struct("GetCaseOutput");
147 formatter.field("title", &"*** Sensitive Data Redacted ***");
148 formatter.field("case_arn", &self.case_arn);
149 formatter.field("description", &"*** Sensitive Data Redacted ***");
150 formatter.field("case_status", &self.case_status);
151 formatter.field("engagement_type", &self.engagement_type);
152 formatter.field("reported_incident_start_date", &self.reported_incident_start_date);
153 formatter.field("actual_incident_start_date", &self.actual_incident_start_date);
154 formatter.field("impacted_aws_regions", &self.impacted_aws_regions);
155 formatter.field("threat_actor_ip_addresses", &self.threat_actor_ip_addresses);
156 formatter.field("pending_action", &self.pending_action);
157 formatter.field("impacted_accounts", &self.impacted_accounts);
158 formatter.field("watchers", &self.watchers);
159 formatter.field("created_date", &self.created_date);
160 formatter.field("last_updated_date", &self.last_updated_date);
161 formatter.field("closure_code", &self.closure_code);
162 formatter.field("resolver_type", &self.resolver_type);
163 formatter.field("impacted_services", &self.impacted_services);
164 formatter.field("case_attachments", &self.case_attachments);
165 formatter.field("closed_date", &self.closed_date);
166 formatter.field("case_metadata", &self.case_metadata);
167 formatter.field("_request_id", &self._request_id);
168 formatter.finish()
169 }
170}
171impl ::aws_types::request_id::RequestId for GetCaseOutput {
172 fn request_id(&self) -> Option<&str> {
173 self._request_id.as_deref()
174 }
175}
176impl GetCaseOutput {
177 pub fn builder() -> crate::operation::get_case::builders::GetCaseOutputBuilder {
179 crate::operation::get_case::builders::GetCaseOutputBuilder::default()
180 }
181}
182
183#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
185#[non_exhaustive]
186pub struct GetCaseOutputBuilder {
187 pub(crate) title: ::std::option::Option<::std::string::String>,
188 pub(crate) case_arn: ::std::option::Option<::std::string::String>,
189 pub(crate) description: ::std::option::Option<::std::string::String>,
190 pub(crate) case_status: ::std::option::Option<crate::types::CaseStatus>,
191 pub(crate) engagement_type: ::std::option::Option<crate::types::EngagementType>,
192 pub(crate) reported_incident_start_date: ::std::option::Option<::aws_smithy_types::DateTime>,
193 pub(crate) actual_incident_start_date: ::std::option::Option<::aws_smithy_types::DateTime>,
194 pub(crate) impacted_aws_regions: ::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>>,
195 pub(crate) threat_actor_ip_addresses: ::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>>,
196 pub(crate) pending_action: ::std::option::Option<crate::types::PendingAction>,
197 pub(crate) impacted_accounts: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
198 pub(crate) watchers: ::std::option::Option<::std::vec::Vec<crate::types::Watcher>>,
199 pub(crate) created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
200 pub(crate) last_updated_date: ::std::option::Option<::aws_smithy_types::DateTime>,
201 pub(crate) closure_code: ::std::option::Option<crate::types::ClosureCode>,
202 pub(crate) resolver_type: ::std::option::Option<crate::types::ResolverType>,
203 pub(crate) impacted_services: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
204 pub(crate) case_attachments: ::std::option::Option<::std::vec::Vec<crate::types::CaseAttachmentAttributes>>,
205 pub(crate) closed_date: ::std::option::Option<::aws_smithy_types::DateTime>,
206 pub(crate) case_metadata: ::std::option::Option<::std::vec::Vec<crate::types::CaseMetadataEntry>>,
207 _request_id: Option<String>,
208}
209impl GetCaseOutputBuilder {
210 pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
212 self.title = ::std::option::Option::Some(input.into());
213 self
214 }
215 pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
217 self.title = input;
218 self
219 }
220 pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
222 &self.title
223 }
224 pub fn case_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
226 self.case_arn = ::std::option::Option::Some(input.into());
227 self
228 }
229 pub fn set_case_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
231 self.case_arn = input;
232 self
233 }
234 pub fn get_case_arn(&self) -> &::std::option::Option<::std::string::String> {
236 &self.case_arn
237 }
238 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
240 self.description = ::std::option::Option::Some(input.into());
241 self
242 }
243 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
245 self.description = input;
246 self
247 }
248 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
250 &self.description
251 }
252 pub fn case_status(mut self, input: crate::types::CaseStatus) -> Self {
254 self.case_status = ::std::option::Option::Some(input);
255 self
256 }
257 pub fn set_case_status(mut self, input: ::std::option::Option<crate::types::CaseStatus>) -> Self {
259 self.case_status = input;
260 self
261 }
262 pub fn get_case_status(&self) -> &::std::option::Option<crate::types::CaseStatus> {
264 &self.case_status
265 }
266 pub fn engagement_type(mut self, input: crate::types::EngagementType) -> Self {
268 self.engagement_type = ::std::option::Option::Some(input);
269 self
270 }
271 pub fn set_engagement_type(mut self, input: ::std::option::Option<crate::types::EngagementType>) -> Self {
273 self.engagement_type = input;
274 self
275 }
276 pub fn get_engagement_type(&self) -> &::std::option::Option<crate::types::EngagementType> {
278 &self.engagement_type
279 }
280 pub fn reported_incident_start_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
282 self.reported_incident_start_date = ::std::option::Option::Some(input);
283 self
284 }
285 pub fn set_reported_incident_start_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
287 self.reported_incident_start_date = input;
288 self
289 }
290 pub fn get_reported_incident_start_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
292 &self.reported_incident_start_date
293 }
294 pub fn actual_incident_start_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
296 self.actual_incident_start_date = ::std::option::Option::Some(input);
297 self
298 }
299 pub fn set_actual_incident_start_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
301 self.actual_incident_start_date = input;
302 self
303 }
304 pub fn get_actual_incident_start_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
306 &self.actual_incident_start_date
307 }
308 pub fn impacted_aws_regions(mut self, input: crate::types::ImpactedAwsRegion) -> Self {
314 let mut v = self.impacted_aws_regions.unwrap_or_default();
315 v.push(input);
316 self.impacted_aws_regions = ::std::option::Option::Some(v);
317 self
318 }
319 pub fn set_impacted_aws_regions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>>) -> Self {
321 self.impacted_aws_regions = input;
322 self
323 }
324 pub fn get_impacted_aws_regions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>> {
326 &self.impacted_aws_regions
327 }
328 pub fn threat_actor_ip_addresses(mut self, input: crate::types::ThreatActorIp) -> Self {
334 let mut v = self.threat_actor_ip_addresses.unwrap_or_default();
335 v.push(input);
336 self.threat_actor_ip_addresses = ::std::option::Option::Some(v);
337 self
338 }
339 pub fn set_threat_actor_ip_addresses(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>>) -> Self {
341 self.threat_actor_ip_addresses = input;
342 self
343 }
344 pub fn get_threat_actor_ip_addresses(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>> {
346 &self.threat_actor_ip_addresses
347 }
348 pub fn pending_action(mut self, input: crate::types::PendingAction) -> Self {
350 self.pending_action = ::std::option::Option::Some(input);
351 self
352 }
353 pub fn set_pending_action(mut self, input: ::std::option::Option<crate::types::PendingAction>) -> Self {
355 self.pending_action = input;
356 self
357 }
358 pub fn get_pending_action(&self) -> &::std::option::Option<crate::types::PendingAction> {
360 &self.pending_action
361 }
362 pub fn impacted_accounts(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
368 let mut v = self.impacted_accounts.unwrap_or_default();
369 v.push(input.into());
370 self.impacted_accounts = ::std::option::Option::Some(v);
371 self
372 }
373 pub fn set_impacted_accounts(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
375 self.impacted_accounts = input;
376 self
377 }
378 pub fn get_impacted_accounts(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
380 &self.impacted_accounts
381 }
382 pub fn watchers(mut self, input: crate::types::Watcher) -> Self {
388 let mut v = self.watchers.unwrap_or_default();
389 v.push(input);
390 self.watchers = ::std::option::Option::Some(v);
391 self
392 }
393 pub fn set_watchers(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Watcher>>) -> Self {
395 self.watchers = input;
396 self
397 }
398 pub fn get_watchers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Watcher>> {
400 &self.watchers
401 }
402 pub fn created_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
404 self.created_date = ::std::option::Option::Some(input);
405 self
406 }
407 pub fn set_created_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
409 self.created_date = input;
410 self
411 }
412 pub fn get_created_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
414 &self.created_date
415 }
416 pub fn last_updated_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
418 self.last_updated_date = ::std::option::Option::Some(input);
419 self
420 }
421 pub fn set_last_updated_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
423 self.last_updated_date = input;
424 self
425 }
426 pub fn get_last_updated_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
428 &self.last_updated_date
429 }
430 pub fn closure_code(mut self, input: crate::types::ClosureCode) -> Self {
432 self.closure_code = ::std::option::Option::Some(input);
433 self
434 }
435 pub fn set_closure_code(mut self, input: ::std::option::Option<crate::types::ClosureCode>) -> Self {
437 self.closure_code = input;
438 self
439 }
440 pub fn get_closure_code(&self) -> &::std::option::Option<crate::types::ClosureCode> {
442 &self.closure_code
443 }
444 pub fn resolver_type(mut self, input: crate::types::ResolverType) -> Self {
446 self.resolver_type = ::std::option::Option::Some(input);
447 self
448 }
449 pub fn set_resolver_type(mut self, input: ::std::option::Option<crate::types::ResolverType>) -> Self {
451 self.resolver_type = input;
452 self
453 }
454 pub fn get_resolver_type(&self) -> &::std::option::Option<crate::types::ResolverType> {
456 &self.resolver_type
457 }
458 pub fn impacted_services(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
464 let mut v = self.impacted_services.unwrap_or_default();
465 v.push(input.into());
466 self.impacted_services = ::std::option::Option::Some(v);
467 self
468 }
469 pub fn set_impacted_services(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
471 self.impacted_services = input;
472 self
473 }
474 pub fn get_impacted_services(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
476 &self.impacted_services
477 }
478 pub fn case_attachments(mut self, input: crate::types::CaseAttachmentAttributes) -> Self {
484 let mut v = self.case_attachments.unwrap_or_default();
485 v.push(input);
486 self.case_attachments = ::std::option::Option::Some(v);
487 self
488 }
489 pub fn set_case_attachments(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CaseAttachmentAttributes>>) -> Self {
491 self.case_attachments = input;
492 self
493 }
494 pub fn get_case_attachments(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CaseAttachmentAttributes>> {
496 &self.case_attachments
497 }
498 pub fn closed_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
500 self.closed_date = ::std::option::Option::Some(input);
501 self
502 }
503 pub fn set_closed_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
505 self.closed_date = input;
506 self
507 }
508 pub fn get_closed_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
510 &self.closed_date
511 }
512 pub fn case_metadata(mut self, input: crate::types::CaseMetadataEntry) -> Self {
518 let mut v = self.case_metadata.unwrap_or_default();
519 v.push(input);
520 self.case_metadata = ::std::option::Option::Some(v);
521 self
522 }
523 pub fn set_case_metadata(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CaseMetadataEntry>>) -> Self {
525 self.case_metadata = input;
526 self
527 }
528 pub fn get_case_metadata(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CaseMetadataEntry>> {
530 &self.case_metadata
531 }
532 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
533 self._request_id = Some(request_id.into());
534 self
535 }
536
537 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
538 self._request_id = request_id;
539 self
540 }
541 pub fn build(self) -> crate::operation::get_case::GetCaseOutput {
543 crate::operation::get_case::GetCaseOutput {
544 title: self.title,
545 case_arn: self.case_arn,
546 description: self.description,
547 case_status: self.case_status,
548 engagement_type: self.engagement_type,
549 reported_incident_start_date: self.reported_incident_start_date,
550 actual_incident_start_date: self.actual_incident_start_date,
551 impacted_aws_regions: self.impacted_aws_regions,
552 threat_actor_ip_addresses: self.threat_actor_ip_addresses,
553 pending_action: self.pending_action,
554 impacted_accounts: self.impacted_accounts,
555 watchers: self.watchers,
556 created_date: self.created_date,
557 last_updated_date: self.last_updated_date,
558 closure_code: self.closure_code,
559 resolver_type: self.resolver_type,
560 impacted_services: self.impacted_services,
561 case_attachments: self.case_attachments,
562 closed_date: self.closed_date,
563 case_metadata: self.case_metadata,
564 _request_id: self._request_id,
565 }
566 }
567}
568impl ::std::fmt::Debug for GetCaseOutputBuilder {
569 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
570 let mut formatter = f.debug_struct("GetCaseOutputBuilder");
571 formatter.field("title", &"*** Sensitive Data Redacted ***");
572 formatter.field("case_arn", &self.case_arn);
573 formatter.field("description", &"*** Sensitive Data Redacted ***");
574 formatter.field("case_status", &self.case_status);
575 formatter.field("engagement_type", &self.engagement_type);
576 formatter.field("reported_incident_start_date", &self.reported_incident_start_date);
577 formatter.field("actual_incident_start_date", &self.actual_incident_start_date);
578 formatter.field("impacted_aws_regions", &self.impacted_aws_regions);
579 formatter.field("threat_actor_ip_addresses", &self.threat_actor_ip_addresses);
580 formatter.field("pending_action", &self.pending_action);
581 formatter.field("impacted_accounts", &self.impacted_accounts);
582 formatter.field("watchers", &self.watchers);
583 formatter.field("created_date", &self.created_date);
584 formatter.field("last_updated_date", &self.last_updated_date);
585 formatter.field("closure_code", &self.closure_code);
586 formatter.field("resolver_type", &self.resolver_type);
587 formatter.field("impacted_services", &self.impacted_services);
588 formatter.field("case_attachments", &self.case_attachments);
589 formatter.field("closed_date", &self.closed_date);
590 formatter.field("case_metadata", &self.case_metadata);
591 formatter.field("_request_id", &self._request_id);
592 formatter.finish()
593 }
594}