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}
43impl UpdateCaseInput {
44 pub fn case_id(&self) -> ::std::option::Option<&str> {
46 self.case_id.as_deref()
47 }
48 pub fn title(&self) -> ::std::option::Option<&str> {
50 self.title.as_deref()
51 }
52 pub fn description(&self) -> ::std::option::Option<&str> {
54 self.description.as_deref()
55 }
56 pub fn reported_incident_start_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
58 self.reported_incident_start_date.as_ref()
59 }
60 pub fn actual_incident_start_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
62 self.actual_incident_start_date.as_ref()
63 }
64 pub fn engagement_type(&self) -> ::std::option::Option<&crate::types::EngagementType> {
66 self.engagement_type.as_ref()
67 }
68 pub fn watchers_to_add(&self) -> &[crate::types::Watcher] {
72 self.watchers_to_add.as_deref().unwrap_or_default()
73 }
74 pub fn watchers_to_delete(&self) -> &[crate::types::Watcher] {
78 self.watchers_to_delete.as_deref().unwrap_or_default()
79 }
80 pub fn threat_actor_ip_addresses_to_add(&self) -> &[crate::types::ThreatActorIp] {
84 self.threat_actor_ip_addresses_to_add.as_deref().unwrap_or_default()
85 }
86 pub fn threat_actor_ip_addresses_to_delete(&self) -> &[crate::types::ThreatActorIp] {
90 self.threat_actor_ip_addresses_to_delete.as_deref().unwrap_or_default()
91 }
92 pub fn impacted_services_to_add(&self) -> &[::std::string::String] {
96 self.impacted_services_to_add.as_deref().unwrap_or_default()
97 }
98 pub fn impacted_services_to_delete(&self) -> &[::std::string::String] {
102 self.impacted_services_to_delete.as_deref().unwrap_or_default()
103 }
104 pub fn impacted_aws_regions_to_add(&self) -> &[crate::types::ImpactedAwsRegion] {
108 self.impacted_aws_regions_to_add.as_deref().unwrap_or_default()
109 }
110 pub fn impacted_aws_regions_to_delete(&self) -> &[crate::types::ImpactedAwsRegion] {
114 self.impacted_aws_regions_to_delete.as_deref().unwrap_or_default()
115 }
116 pub fn impacted_accounts_to_add(&self) -> &[::std::string::String] {
122 self.impacted_accounts_to_add.as_deref().unwrap_or_default()
123 }
124 pub fn impacted_accounts_to_delete(&self) -> &[::std::string::String] {
130 self.impacted_accounts_to_delete.as_deref().unwrap_or_default()
131 }
132}
133impl ::std::fmt::Debug for UpdateCaseInput {
134 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
135 let mut formatter = f.debug_struct("UpdateCaseInput");
136 formatter.field("case_id", &self.case_id);
137 formatter.field("title", &"*** Sensitive Data Redacted ***");
138 formatter.field("description", &"*** Sensitive Data Redacted ***");
139 formatter.field("reported_incident_start_date", &self.reported_incident_start_date);
140 formatter.field("actual_incident_start_date", &self.actual_incident_start_date);
141 formatter.field("engagement_type", &self.engagement_type);
142 formatter.field("watchers_to_add", &self.watchers_to_add);
143 formatter.field("watchers_to_delete", &self.watchers_to_delete);
144 formatter.field("threat_actor_ip_addresses_to_add", &self.threat_actor_ip_addresses_to_add);
145 formatter.field("threat_actor_ip_addresses_to_delete", &self.threat_actor_ip_addresses_to_delete);
146 formatter.field("impacted_services_to_add", &self.impacted_services_to_add);
147 formatter.field("impacted_services_to_delete", &self.impacted_services_to_delete);
148 formatter.field("impacted_aws_regions_to_add", &self.impacted_aws_regions_to_add);
149 formatter.field("impacted_aws_regions_to_delete", &self.impacted_aws_regions_to_delete);
150 formatter.field("impacted_accounts_to_add", &self.impacted_accounts_to_add);
151 formatter.field("impacted_accounts_to_delete", &self.impacted_accounts_to_delete);
152 formatter.finish()
153 }
154}
155impl UpdateCaseInput {
156 pub fn builder() -> crate::operation::update_case::builders::UpdateCaseInputBuilder {
158 crate::operation::update_case::builders::UpdateCaseInputBuilder::default()
159 }
160}
161
162#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
164#[non_exhaustive]
165pub struct UpdateCaseInputBuilder {
166 pub(crate) case_id: ::std::option::Option<::std::string::String>,
167 pub(crate) title: ::std::option::Option<::std::string::String>,
168 pub(crate) description: ::std::option::Option<::std::string::String>,
169 pub(crate) reported_incident_start_date: ::std::option::Option<::aws_smithy_types::DateTime>,
170 pub(crate) actual_incident_start_date: ::std::option::Option<::aws_smithy_types::DateTime>,
171 pub(crate) engagement_type: ::std::option::Option<crate::types::EngagementType>,
172 pub(crate) watchers_to_add: ::std::option::Option<::std::vec::Vec<crate::types::Watcher>>,
173 pub(crate) watchers_to_delete: ::std::option::Option<::std::vec::Vec<crate::types::Watcher>>,
174 pub(crate) threat_actor_ip_addresses_to_add: ::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>>,
175 pub(crate) threat_actor_ip_addresses_to_delete: ::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>>,
176 pub(crate) impacted_services_to_add: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
177 pub(crate) impacted_services_to_delete: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
178 pub(crate) impacted_aws_regions_to_add: ::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>>,
179 pub(crate) impacted_aws_regions_to_delete: ::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>>,
180 pub(crate) impacted_accounts_to_add: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
181 pub(crate) impacted_accounts_to_delete: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
182}
183impl UpdateCaseInputBuilder {
184 pub fn case_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
187 self.case_id = ::std::option::Option::Some(input.into());
188 self
189 }
190 pub fn set_case_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
192 self.case_id = input;
193 self
194 }
195 pub fn get_case_id(&self) -> &::std::option::Option<::std::string::String> {
197 &self.case_id
198 }
199 pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
201 self.title = ::std::option::Option::Some(input.into());
202 self
203 }
204 pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
206 self.title = input;
207 self
208 }
209 pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
211 &self.title
212 }
213 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
215 self.description = ::std::option::Option::Some(input.into());
216 self
217 }
218 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
220 self.description = input;
221 self
222 }
223 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
225 &self.description
226 }
227 pub fn reported_incident_start_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
229 self.reported_incident_start_date = ::std::option::Option::Some(input);
230 self
231 }
232 pub fn set_reported_incident_start_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
234 self.reported_incident_start_date = input;
235 self
236 }
237 pub fn get_reported_incident_start_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
239 &self.reported_incident_start_date
240 }
241 pub fn actual_incident_start_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
243 self.actual_incident_start_date = ::std::option::Option::Some(input);
244 self
245 }
246 pub fn set_actual_incident_start_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
248 self.actual_incident_start_date = input;
249 self
250 }
251 pub fn get_actual_incident_start_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
253 &self.actual_incident_start_date
254 }
255 pub fn engagement_type(mut self, input: crate::types::EngagementType) -> Self {
257 self.engagement_type = ::std::option::Option::Some(input);
258 self
259 }
260 pub fn set_engagement_type(mut self, input: ::std::option::Option<crate::types::EngagementType>) -> Self {
262 self.engagement_type = input;
263 self
264 }
265 pub fn get_engagement_type(&self) -> &::std::option::Option<crate::types::EngagementType> {
267 &self.engagement_type
268 }
269 pub fn watchers_to_add(mut self, input: crate::types::Watcher) -> Self {
275 let mut v = self.watchers_to_add.unwrap_or_default();
276 v.push(input);
277 self.watchers_to_add = ::std::option::Option::Some(v);
278 self
279 }
280 pub fn set_watchers_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Watcher>>) -> Self {
282 self.watchers_to_add = input;
283 self
284 }
285 pub fn get_watchers_to_add(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Watcher>> {
287 &self.watchers_to_add
288 }
289 pub fn watchers_to_delete(mut self, input: crate::types::Watcher) -> Self {
295 let mut v = self.watchers_to_delete.unwrap_or_default();
296 v.push(input);
297 self.watchers_to_delete = ::std::option::Option::Some(v);
298 self
299 }
300 pub fn set_watchers_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Watcher>>) -> Self {
302 self.watchers_to_delete = input;
303 self
304 }
305 pub fn get_watchers_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Watcher>> {
307 &self.watchers_to_delete
308 }
309 pub fn threat_actor_ip_addresses_to_add(mut self, input: crate::types::ThreatActorIp) -> Self {
315 let mut v = self.threat_actor_ip_addresses_to_add.unwrap_or_default();
316 v.push(input);
317 self.threat_actor_ip_addresses_to_add = ::std::option::Option::Some(v);
318 self
319 }
320 pub fn set_threat_actor_ip_addresses_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>>) -> Self {
322 self.threat_actor_ip_addresses_to_add = input;
323 self
324 }
325 pub fn get_threat_actor_ip_addresses_to_add(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>> {
327 &self.threat_actor_ip_addresses_to_add
328 }
329 pub fn threat_actor_ip_addresses_to_delete(mut self, input: crate::types::ThreatActorIp) -> Self {
335 let mut v = self.threat_actor_ip_addresses_to_delete.unwrap_or_default();
336 v.push(input);
337 self.threat_actor_ip_addresses_to_delete = ::std::option::Option::Some(v);
338 self
339 }
340 pub fn set_threat_actor_ip_addresses_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>>) -> Self {
342 self.threat_actor_ip_addresses_to_delete = input;
343 self
344 }
345 pub fn get_threat_actor_ip_addresses_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>> {
347 &self.threat_actor_ip_addresses_to_delete
348 }
349 pub fn impacted_services_to_add(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
355 let mut v = self.impacted_services_to_add.unwrap_or_default();
356 v.push(input.into());
357 self.impacted_services_to_add = ::std::option::Option::Some(v);
358 self
359 }
360 pub fn set_impacted_services_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
362 self.impacted_services_to_add = input;
363 self
364 }
365 pub fn get_impacted_services_to_add(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
367 &self.impacted_services_to_add
368 }
369 pub fn impacted_services_to_delete(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
375 let mut v = self.impacted_services_to_delete.unwrap_or_default();
376 v.push(input.into());
377 self.impacted_services_to_delete = ::std::option::Option::Some(v);
378 self
379 }
380 pub fn set_impacted_services_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
382 self.impacted_services_to_delete = input;
383 self
384 }
385 pub fn get_impacted_services_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
387 &self.impacted_services_to_delete
388 }
389 pub fn impacted_aws_regions_to_add(mut self, input: crate::types::ImpactedAwsRegion) -> Self {
395 let mut v = self.impacted_aws_regions_to_add.unwrap_or_default();
396 v.push(input);
397 self.impacted_aws_regions_to_add = ::std::option::Option::Some(v);
398 self
399 }
400 pub fn set_impacted_aws_regions_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>>) -> Self {
402 self.impacted_aws_regions_to_add = input;
403 self
404 }
405 pub fn get_impacted_aws_regions_to_add(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>> {
407 &self.impacted_aws_regions_to_add
408 }
409 pub fn impacted_aws_regions_to_delete(mut self, input: crate::types::ImpactedAwsRegion) -> Self {
415 let mut v = self.impacted_aws_regions_to_delete.unwrap_or_default();
416 v.push(input);
417 self.impacted_aws_regions_to_delete = ::std::option::Option::Some(v);
418 self
419 }
420 pub fn set_impacted_aws_regions_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>>) -> Self {
422 self.impacted_aws_regions_to_delete = input;
423 self
424 }
425 pub fn get_impacted_aws_regions_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>> {
427 &self.impacted_aws_regions_to_delete
428 }
429 pub fn impacted_accounts_to_add(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
437 let mut v = self.impacted_accounts_to_add.unwrap_or_default();
438 v.push(input.into());
439 self.impacted_accounts_to_add = ::std::option::Option::Some(v);
440 self
441 }
442 pub fn set_impacted_accounts_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
446 self.impacted_accounts_to_add = input;
447 self
448 }
449 pub fn get_impacted_accounts_to_add(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
453 &self.impacted_accounts_to_add
454 }
455 pub fn impacted_accounts_to_delete(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
463 let mut v = self.impacted_accounts_to_delete.unwrap_or_default();
464 v.push(input.into());
465 self.impacted_accounts_to_delete = ::std::option::Option::Some(v);
466 self
467 }
468 pub fn set_impacted_accounts_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
472 self.impacted_accounts_to_delete = input;
473 self
474 }
475 pub fn get_impacted_accounts_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
479 &self.impacted_accounts_to_delete
480 }
481 pub fn build(self) -> ::std::result::Result<crate::operation::update_case::UpdateCaseInput, ::aws_smithy_types::error::operation::BuildError> {
483 ::std::result::Result::Ok(crate::operation::update_case::UpdateCaseInput {
484 case_id: self.case_id,
485 title: self.title,
486 description: self.description,
487 reported_incident_start_date: self.reported_incident_start_date,
488 actual_incident_start_date: self.actual_incident_start_date,
489 engagement_type: self.engagement_type,
490 watchers_to_add: self.watchers_to_add,
491 watchers_to_delete: self.watchers_to_delete,
492 threat_actor_ip_addresses_to_add: self.threat_actor_ip_addresses_to_add,
493 threat_actor_ip_addresses_to_delete: self.threat_actor_ip_addresses_to_delete,
494 impacted_services_to_add: self.impacted_services_to_add,
495 impacted_services_to_delete: self.impacted_services_to_delete,
496 impacted_aws_regions_to_add: self.impacted_aws_regions_to_add,
497 impacted_aws_regions_to_delete: self.impacted_aws_regions_to_delete,
498 impacted_accounts_to_add: self.impacted_accounts_to_add,
499 impacted_accounts_to_delete: self.impacted_accounts_to_delete,
500 })
501 }
502}
503impl ::std::fmt::Debug for UpdateCaseInputBuilder {
504 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
505 let mut formatter = f.debug_struct("UpdateCaseInputBuilder");
506 formatter.field("case_id", &self.case_id);
507 formatter.field("title", &"*** Sensitive Data Redacted ***");
508 formatter.field("description", &"*** Sensitive Data Redacted ***");
509 formatter.field("reported_incident_start_date", &self.reported_incident_start_date);
510 formatter.field("actual_incident_start_date", &self.actual_incident_start_date);
511 formatter.field("engagement_type", &self.engagement_type);
512 formatter.field("watchers_to_add", &self.watchers_to_add);
513 formatter.field("watchers_to_delete", &self.watchers_to_delete);
514 formatter.field("threat_actor_ip_addresses_to_add", &self.threat_actor_ip_addresses_to_add);
515 formatter.field("threat_actor_ip_addresses_to_delete", &self.threat_actor_ip_addresses_to_delete);
516 formatter.field("impacted_services_to_add", &self.impacted_services_to_add);
517 formatter.field("impacted_services_to_delete", &self.impacted_services_to_delete);
518 formatter.field("impacted_aws_regions_to_add", &self.impacted_aws_regions_to_add);
519 formatter.field("impacted_aws_regions_to_delete", &self.impacted_aws_regions_to_delete);
520 formatter.field("impacted_accounts_to_add", &self.impacted_accounts_to_add);
521 formatter.field("impacted_accounts_to_delete", &self.impacted_accounts_to_delete);
522 formatter.finish()
523 }
524}