aws_sdk_securityir/operation/update_case/
_update_case_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct UpdateCaseInput {
6 pub case_id: ::std::option::Option<::std::string::String>,
8 pub title: ::std::option::Option<::std::string::String>,
10 pub description: ::std::option::Option<::std::string::String>,
12 pub reported_incident_start_date: ::std::option::Option<::aws_smithy_types::DateTime>,
14 pub actual_incident_start_date: ::std::option::Option<::aws_smithy_types::DateTime>,
16 pub engagement_type: ::std::option::Option<crate::types::EngagementType>,
18 pub watchers_to_add: ::std::option::Option<::std::vec::Vec<crate::types::Watcher>>,
20 pub watchers_to_delete: ::std::option::Option<::std::vec::Vec<crate::types::Watcher>>,
22 pub threat_actor_ip_addresses_to_add: ::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>>,
24 pub threat_actor_ip_addresses_to_delete: ::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>>,
26 pub impacted_services_to_add: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
28 pub impacted_services_to_delete: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
30 pub impacted_aws_regions_to_add: ::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>>,
32 pub impacted_aws_regions_to_delete: ::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>>,
34 pub impacted_accounts_to_add: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
38 pub impacted_accounts_to_delete: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
42 pub case_metadata: ::std::option::Option<::std::vec::Vec<crate::types::CaseMetadataEntry>>,
44}
45impl UpdateCaseInput {
46 pub fn case_id(&self) -> ::std::option::Option<&str> {
48 self.case_id.as_deref()
49 }
50 pub fn title(&self) -> ::std::option::Option<&str> {
52 self.title.as_deref()
53 }
54 pub fn description(&self) -> ::std::option::Option<&str> {
56 self.description.as_deref()
57 }
58 pub fn reported_incident_start_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
60 self.reported_incident_start_date.as_ref()
61 }
62 pub fn actual_incident_start_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
64 self.actual_incident_start_date.as_ref()
65 }
66 pub fn engagement_type(&self) -> ::std::option::Option<&crate::types::EngagementType> {
68 self.engagement_type.as_ref()
69 }
70 pub fn watchers_to_add(&self) -> &[crate::types::Watcher] {
74 self.watchers_to_add.as_deref().unwrap_or_default()
75 }
76 pub fn watchers_to_delete(&self) -> &[crate::types::Watcher] {
80 self.watchers_to_delete.as_deref().unwrap_or_default()
81 }
82 pub fn threat_actor_ip_addresses_to_add(&self) -> &[crate::types::ThreatActorIp] {
86 self.threat_actor_ip_addresses_to_add.as_deref().unwrap_or_default()
87 }
88 pub fn threat_actor_ip_addresses_to_delete(&self) -> &[crate::types::ThreatActorIp] {
92 self.threat_actor_ip_addresses_to_delete.as_deref().unwrap_or_default()
93 }
94 pub fn impacted_services_to_add(&self) -> &[::std::string::String] {
98 self.impacted_services_to_add.as_deref().unwrap_or_default()
99 }
100 pub fn impacted_services_to_delete(&self) -> &[::std::string::String] {
104 self.impacted_services_to_delete.as_deref().unwrap_or_default()
105 }
106 pub fn impacted_aws_regions_to_add(&self) -> &[crate::types::ImpactedAwsRegion] {
110 self.impacted_aws_regions_to_add.as_deref().unwrap_or_default()
111 }
112 pub fn impacted_aws_regions_to_delete(&self) -> &[crate::types::ImpactedAwsRegion] {
116 self.impacted_aws_regions_to_delete.as_deref().unwrap_or_default()
117 }
118 pub fn impacted_accounts_to_add(&self) -> &[::std::string::String] {
124 self.impacted_accounts_to_add.as_deref().unwrap_or_default()
125 }
126 pub fn impacted_accounts_to_delete(&self) -> &[::std::string::String] {
132 self.impacted_accounts_to_delete.as_deref().unwrap_or_default()
133 }
134 pub fn case_metadata(&self) -> &[crate::types::CaseMetadataEntry] {
138 self.case_metadata.as_deref().unwrap_or_default()
139 }
140}
141impl ::std::fmt::Debug for UpdateCaseInput {
142 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
143 let mut formatter = f.debug_struct("UpdateCaseInput");
144 formatter.field("case_id", &self.case_id);
145 formatter.field("title", &"*** Sensitive Data Redacted ***");
146 formatter.field("description", &"*** Sensitive Data Redacted ***");
147 formatter.field("reported_incident_start_date", &self.reported_incident_start_date);
148 formatter.field("actual_incident_start_date", &self.actual_incident_start_date);
149 formatter.field("engagement_type", &self.engagement_type);
150 formatter.field("watchers_to_add", &self.watchers_to_add);
151 formatter.field("watchers_to_delete", &self.watchers_to_delete);
152 formatter.field("threat_actor_ip_addresses_to_add", &self.threat_actor_ip_addresses_to_add);
153 formatter.field("threat_actor_ip_addresses_to_delete", &self.threat_actor_ip_addresses_to_delete);
154 formatter.field("impacted_services_to_add", &self.impacted_services_to_add);
155 formatter.field("impacted_services_to_delete", &self.impacted_services_to_delete);
156 formatter.field("impacted_aws_regions_to_add", &self.impacted_aws_regions_to_add);
157 formatter.field("impacted_aws_regions_to_delete", &self.impacted_aws_regions_to_delete);
158 formatter.field("impacted_accounts_to_add", &self.impacted_accounts_to_add);
159 formatter.field("impacted_accounts_to_delete", &self.impacted_accounts_to_delete);
160 formatter.field("case_metadata", &self.case_metadata);
161 formatter.finish()
162 }
163}
164impl UpdateCaseInput {
165 pub fn builder() -> crate::operation::update_case::builders::UpdateCaseInputBuilder {
167 crate::operation::update_case::builders::UpdateCaseInputBuilder::default()
168 }
169}
170
171#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
173#[non_exhaustive]
174pub struct UpdateCaseInputBuilder {
175 pub(crate) case_id: ::std::option::Option<::std::string::String>,
176 pub(crate) title: ::std::option::Option<::std::string::String>,
177 pub(crate) description: ::std::option::Option<::std::string::String>,
178 pub(crate) reported_incident_start_date: ::std::option::Option<::aws_smithy_types::DateTime>,
179 pub(crate) actual_incident_start_date: ::std::option::Option<::aws_smithy_types::DateTime>,
180 pub(crate) engagement_type: ::std::option::Option<crate::types::EngagementType>,
181 pub(crate) watchers_to_add: ::std::option::Option<::std::vec::Vec<crate::types::Watcher>>,
182 pub(crate) watchers_to_delete: ::std::option::Option<::std::vec::Vec<crate::types::Watcher>>,
183 pub(crate) threat_actor_ip_addresses_to_add: ::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>>,
184 pub(crate) threat_actor_ip_addresses_to_delete: ::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>>,
185 pub(crate) impacted_services_to_add: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
186 pub(crate) impacted_services_to_delete: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
187 pub(crate) impacted_aws_regions_to_add: ::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>>,
188 pub(crate) impacted_aws_regions_to_delete: ::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>>,
189 pub(crate) impacted_accounts_to_add: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
190 pub(crate) impacted_accounts_to_delete: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
191 pub(crate) case_metadata: ::std::option::Option<::std::vec::Vec<crate::types::CaseMetadataEntry>>,
192}
193impl UpdateCaseInputBuilder {
194 pub fn case_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
197 self.case_id = ::std::option::Option::Some(input.into());
198 self
199 }
200 pub fn set_case_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
202 self.case_id = input;
203 self
204 }
205 pub fn get_case_id(&self) -> &::std::option::Option<::std::string::String> {
207 &self.case_id
208 }
209 pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
211 self.title = ::std::option::Option::Some(input.into());
212 self
213 }
214 pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
216 self.title = input;
217 self
218 }
219 pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
221 &self.title
222 }
223 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
225 self.description = ::std::option::Option::Some(input.into());
226 self
227 }
228 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
230 self.description = input;
231 self
232 }
233 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
235 &self.description
236 }
237 pub fn reported_incident_start_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
239 self.reported_incident_start_date = ::std::option::Option::Some(input);
240 self
241 }
242 pub fn set_reported_incident_start_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
244 self.reported_incident_start_date = input;
245 self
246 }
247 pub fn get_reported_incident_start_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
249 &self.reported_incident_start_date
250 }
251 pub fn actual_incident_start_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
253 self.actual_incident_start_date = ::std::option::Option::Some(input);
254 self
255 }
256 pub fn set_actual_incident_start_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
258 self.actual_incident_start_date = input;
259 self
260 }
261 pub fn get_actual_incident_start_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
263 &self.actual_incident_start_date
264 }
265 pub fn engagement_type(mut self, input: crate::types::EngagementType) -> Self {
267 self.engagement_type = ::std::option::Option::Some(input);
268 self
269 }
270 pub fn set_engagement_type(mut self, input: ::std::option::Option<crate::types::EngagementType>) -> Self {
272 self.engagement_type = input;
273 self
274 }
275 pub fn get_engagement_type(&self) -> &::std::option::Option<crate::types::EngagementType> {
277 &self.engagement_type
278 }
279 pub fn watchers_to_add(mut self, input: crate::types::Watcher) -> Self {
285 let mut v = self.watchers_to_add.unwrap_or_default();
286 v.push(input);
287 self.watchers_to_add = ::std::option::Option::Some(v);
288 self
289 }
290 pub fn set_watchers_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Watcher>>) -> Self {
292 self.watchers_to_add = input;
293 self
294 }
295 pub fn get_watchers_to_add(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Watcher>> {
297 &self.watchers_to_add
298 }
299 pub fn watchers_to_delete(mut self, input: crate::types::Watcher) -> Self {
305 let mut v = self.watchers_to_delete.unwrap_or_default();
306 v.push(input);
307 self.watchers_to_delete = ::std::option::Option::Some(v);
308 self
309 }
310 pub fn set_watchers_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Watcher>>) -> Self {
312 self.watchers_to_delete = input;
313 self
314 }
315 pub fn get_watchers_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Watcher>> {
317 &self.watchers_to_delete
318 }
319 pub fn threat_actor_ip_addresses_to_add(mut self, input: crate::types::ThreatActorIp) -> Self {
325 let mut v = self.threat_actor_ip_addresses_to_add.unwrap_or_default();
326 v.push(input);
327 self.threat_actor_ip_addresses_to_add = ::std::option::Option::Some(v);
328 self
329 }
330 pub fn set_threat_actor_ip_addresses_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>>) -> Self {
332 self.threat_actor_ip_addresses_to_add = input;
333 self
334 }
335 pub fn get_threat_actor_ip_addresses_to_add(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>> {
337 &self.threat_actor_ip_addresses_to_add
338 }
339 pub fn threat_actor_ip_addresses_to_delete(mut self, input: crate::types::ThreatActorIp) -> Self {
345 let mut v = self.threat_actor_ip_addresses_to_delete.unwrap_or_default();
346 v.push(input);
347 self.threat_actor_ip_addresses_to_delete = ::std::option::Option::Some(v);
348 self
349 }
350 pub fn set_threat_actor_ip_addresses_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>>) -> Self {
352 self.threat_actor_ip_addresses_to_delete = input;
353 self
354 }
355 pub fn get_threat_actor_ip_addresses_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>> {
357 &self.threat_actor_ip_addresses_to_delete
358 }
359 pub fn impacted_services_to_add(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
365 let mut v = self.impacted_services_to_add.unwrap_or_default();
366 v.push(input.into());
367 self.impacted_services_to_add = ::std::option::Option::Some(v);
368 self
369 }
370 pub fn set_impacted_services_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
372 self.impacted_services_to_add = input;
373 self
374 }
375 pub fn get_impacted_services_to_add(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
377 &self.impacted_services_to_add
378 }
379 pub fn impacted_services_to_delete(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
385 let mut v = self.impacted_services_to_delete.unwrap_or_default();
386 v.push(input.into());
387 self.impacted_services_to_delete = ::std::option::Option::Some(v);
388 self
389 }
390 pub fn set_impacted_services_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
392 self.impacted_services_to_delete = input;
393 self
394 }
395 pub fn get_impacted_services_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
397 &self.impacted_services_to_delete
398 }
399 pub fn impacted_aws_regions_to_add(mut self, input: crate::types::ImpactedAwsRegion) -> Self {
405 let mut v = self.impacted_aws_regions_to_add.unwrap_or_default();
406 v.push(input);
407 self.impacted_aws_regions_to_add = ::std::option::Option::Some(v);
408 self
409 }
410 pub fn set_impacted_aws_regions_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>>) -> Self {
412 self.impacted_aws_regions_to_add = input;
413 self
414 }
415 pub fn get_impacted_aws_regions_to_add(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>> {
417 &self.impacted_aws_regions_to_add
418 }
419 pub fn impacted_aws_regions_to_delete(mut self, input: crate::types::ImpactedAwsRegion) -> Self {
425 let mut v = self.impacted_aws_regions_to_delete.unwrap_or_default();
426 v.push(input);
427 self.impacted_aws_regions_to_delete = ::std::option::Option::Some(v);
428 self
429 }
430 pub fn set_impacted_aws_regions_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>>) -> Self {
432 self.impacted_aws_regions_to_delete = input;
433 self
434 }
435 pub fn get_impacted_aws_regions_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>> {
437 &self.impacted_aws_regions_to_delete
438 }
439 pub fn impacted_accounts_to_add(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
447 let mut v = self.impacted_accounts_to_add.unwrap_or_default();
448 v.push(input.into());
449 self.impacted_accounts_to_add = ::std::option::Option::Some(v);
450 self
451 }
452 pub fn set_impacted_accounts_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
456 self.impacted_accounts_to_add = input;
457 self
458 }
459 pub fn get_impacted_accounts_to_add(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
463 &self.impacted_accounts_to_add
464 }
465 pub fn impacted_accounts_to_delete(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
473 let mut v = self.impacted_accounts_to_delete.unwrap_or_default();
474 v.push(input.into());
475 self.impacted_accounts_to_delete = ::std::option::Option::Some(v);
476 self
477 }
478 pub fn set_impacted_accounts_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
482 self.impacted_accounts_to_delete = input;
483 self
484 }
485 pub fn get_impacted_accounts_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
489 &self.impacted_accounts_to_delete
490 }
491 pub fn case_metadata(mut self, input: crate::types::CaseMetadataEntry) -> Self {
497 let mut v = self.case_metadata.unwrap_or_default();
498 v.push(input);
499 self.case_metadata = ::std::option::Option::Some(v);
500 self
501 }
502 pub fn set_case_metadata(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CaseMetadataEntry>>) -> Self {
504 self.case_metadata = input;
505 self
506 }
507 pub fn get_case_metadata(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CaseMetadataEntry>> {
509 &self.case_metadata
510 }
511 pub fn build(self) -> ::std::result::Result<crate::operation::update_case::UpdateCaseInput, ::aws_smithy_types::error::operation::BuildError> {
513 ::std::result::Result::Ok(crate::operation::update_case::UpdateCaseInput {
514 case_id: self.case_id,
515 title: self.title,
516 description: self.description,
517 reported_incident_start_date: self.reported_incident_start_date,
518 actual_incident_start_date: self.actual_incident_start_date,
519 engagement_type: self.engagement_type,
520 watchers_to_add: self.watchers_to_add,
521 watchers_to_delete: self.watchers_to_delete,
522 threat_actor_ip_addresses_to_add: self.threat_actor_ip_addresses_to_add,
523 threat_actor_ip_addresses_to_delete: self.threat_actor_ip_addresses_to_delete,
524 impacted_services_to_add: self.impacted_services_to_add,
525 impacted_services_to_delete: self.impacted_services_to_delete,
526 impacted_aws_regions_to_add: self.impacted_aws_regions_to_add,
527 impacted_aws_regions_to_delete: self.impacted_aws_regions_to_delete,
528 impacted_accounts_to_add: self.impacted_accounts_to_add,
529 impacted_accounts_to_delete: self.impacted_accounts_to_delete,
530 case_metadata: self.case_metadata,
531 })
532 }
533}
534impl ::std::fmt::Debug for UpdateCaseInputBuilder {
535 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
536 let mut formatter = f.debug_struct("UpdateCaseInputBuilder");
537 formatter.field("case_id", &self.case_id);
538 formatter.field("title", &"*** Sensitive Data Redacted ***");
539 formatter.field("description", &"*** Sensitive Data Redacted ***");
540 formatter.field("reported_incident_start_date", &self.reported_incident_start_date);
541 formatter.field("actual_incident_start_date", &self.actual_incident_start_date);
542 formatter.field("engagement_type", &self.engagement_type);
543 formatter.field("watchers_to_add", &self.watchers_to_add);
544 formatter.field("watchers_to_delete", &self.watchers_to_delete);
545 formatter.field("threat_actor_ip_addresses_to_add", &self.threat_actor_ip_addresses_to_add);
546 formatter.field("threat_actor_ip_addresses_to_delete", &self.threat_actor_ip_addresses_to_delete);
547 formatter.field("impacted_services_to_add", &self.impacted_services_to_add);
548 formatter.field("impacted_services_to_delete", &self.impacted_services_to_delete);
549 formatter.field("impacted_aws_regions_to_add", &self.impacted_aws_regions_to_add);
550 formatter.field("impacted_aws_regions_to_delete", &self.impacted_aws_regions_to_delete);
551 formatter.field("impacted_accounts_to_add", &self.impacted_accounts_to_add);
552 formatter.field("impacted_accounts_to_delete", &self.impacted_accounts_to_delete);
553 formatter.field("case_metadata", &self.case_metadata);
554 formatter.finish()
555 }
556}