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>>,
36 pub impacted_accounts_to_delete: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
38}
39impl UpdateCaseInput {
40 pub fn case_id(&self) -> ::std::option::Option<&str> {
42 self.case_id.as_deref()
43 }
44 pub fn title(&self) -> ::std::option::Option<&str> {
46 self.title.as_deref()
47 }
48 pub fn description(&self) -> ::std::option::Option<&str> {
50 self.description.as_deref()
51 }
52 pub fn reported_incident_start_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
54 self.reported_incident_start_date.as_ref()
55 }
56 pub fn actual_incident_start_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
58 self.actual_incident_start_date.as_ref()
59 }
60 pub fn engagement_type(&self) -> ::std::option::Option<&crate::types::EngagementType> {
62 self.engagement_type.as_ref()
63 }
64 pub fn watchers_to_add(&self) -> &[crate::types::Watcher] {
68 self.watchers_to_add.as_deref().unwrap_or_default()
69 }
70 pub fn watchers_to_delete(&self) -> &[crate::types::Watcher] {
74 self.watchers_to_delete.as_deref().unwrap_or_default()
75 }
76 pub fn threat_actor_ip_addresses_to_add(&self) -> &[crate::types::ThreatActorIp] {
80 self.threat_actor_ip_addresses_to_add.as_deref().unwrap_or_default()
81 }
82 pub fn threat_actor_ip_addresses_to_delete(&self) -> &[crate::types::ThreatActorIp] {
86 self.threat_actor_ip_addresses_to_delete.as_deref().unwrap_or_default()
87 }
88 pub fn impacted_services_to_add(&self) -> &[::std::string::String] {
92 self.impacted_services_to_add.as_deref().unwrap_or_default()
93 }
94 pub fn impacted_services_to_delete(&self) -> &[::std::string::String] {
98 self.impacted_services_to_delete.as_deref().unwrap_or_default()
99 }
100 pub fn impacted_aws_regions_to_add(&self) -> &[crate::types::ImpactedAwsRegion] {
104 self.impacted_aws_regions_to_add.as_deref().unwrap_or_default()
105 }
106 pub fn impacted_aws_regions_to_delete(&self) -> &[crate::types::ImpactedAwsRegion] {
110 self.impacted_aws_regions_to_delete.as_deref().unwrap_or_default()
111 }
112 pub fn impacted_accounts_to_add(&self) -> &[::std::string::String] {
116 self.impacted_accounts_to_add.as_deref().unwrap_or_default()
117 }
118 pub fn impacted_accounts_to_delete(&self) -> &[::std::string::String] {
122 self.impacted_accounts_to_delete.as_deref().unwrap_or_default()
123 }
124}
125impl ::std::fmt::Debug for UpdateCaseInput {
126 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
127 let mut formatter = f.debug_struct("UpdateCaseInput");
128 formatter.field("case_id", &self.case_id);
129 formatter.field("title", &"*** Sensitive Data Redacted ***");
130 formatter.field("description", &"*** Sensitive Data Redacted ***");
131 formatter.field("reported_incident_start_date", &self.reported_incident_start_date);
132 formatter.field("actual_incident_start_date", &self.actual_incident_start_date);
133 formatter.field("engagement_type", &self.engagement_type);
134 formatter.field("watchers_to_add", &self.watchers_to_add);
135 formatter.field("watchers_to_delete", &self.watchers_to_delete);
136 formatter.field("threat_actor_ip_addresses_to_add", &self.threat_actor_ip_addresses_to_add);
137 formatter.field("threat_actor_ip_addresses_to_delete", &self.threat_actor_ip_addresses_to_delete);
138 formatter.field("impacted_services_to_add", &self.impacted_services_to_add);
139 formatter.field("impacted_services_to_delete", &self.impacted_services_to_delete);
140 formatter.field("impacted_aws_regions_to_add", &self.impacted_aws_regions_to_add);
141 formatter.field("impacted_aws_regions_to_delete", &self.impacted_aws_regions_to_delete);
142 formatter.field("impacted_accounts_to_add", &self.impacted_accounts_to_add);
143 formatter.field("impacted_accounts_to_delete", &self.impacted_accounts_to_delete);
144 formatter.finish()
145 }
146}
147impl UpdateCaseInput {
148 pub fn builder() -> crate::operation::update_case::builders::UpdateCaseInputBuilder {
150 crate::operation::update_case::builders::UpdateCaseInputBuilder::default()
151 }
152}
153
154#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
156#[non_exhaustive]
157pub struct UpdateCaseInputBuilder {
158 pub(crate) case_id: ::std::option::Option<::std::string::String>,
159 pub(crate) title: ::std::option::Option<::std::string::String>,
160 pub(crate) description: ::std::option::Option<::std::string::String>,
161 pub(crate) reported_incident_start_date: ::std::option::Option<::aws_smithy_types::DateTime>,
162 pub(crate) actual_incident_start_date: ::std::option::Option<::aws_smithy_types::DateTime>,
163 pub(crate) engagement_type: ::std::option::Option<crate::types::EngagementType>,
164 pub(crate) watchers_to_add: ::std::option::Option<::std::vec::Vec<crate::types::Watcher>>,
165 pub(crate) watchers_to_delete: ::std::option::Option<::std::vec::Vec<crate::types::Watcher>>,
166 pub(crate) threat_actor_ip_addresses_to_add: ::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>>,
167 pub(crate) threat_actor_ip_addresses_to_delete: ::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>>,
168 pub(crate) impacted_services_to_add: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
169 pub(crate) impacted_services_to_delete: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
170 pub(crate) impacted_aws_regions_to_add: ::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>>,
171 pub(crate) impacted_aws_regions_to_delete: ::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>>,
172 pub(crate) impacted_accounts_to_add: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
173 pub(crate) impacted_accounts_to_delete: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
174}
175impl UpdateCaseInputBuilder {
176 pub fn case_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
179 self.case_id = ::std::option::Option::Some(input.into());
180 self
181 }
182 pub fn set_case_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
184 self.case_id = input;
185 self
186 }
187 pub fn get_case_id(&self) -> &::std::option::Option<::std::string::String> {
189 &self.case_id
190 }
191 pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
193 self.title = ::std::option::Option::Some(input.into());
194 self
195 }
196 pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
198 self.title = input;
199 self
200 }
201 pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
203 &self.title
204 }
205 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
207 self.description = ::std::option::Option::Some(input.into());
208 self
209 }
210 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
212 self.description = input;
213 self
214 }
215 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
217 &self.description
218 }
219 pub fn reported_incident_start_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
221 self.reported_incident_start_date = ::std::option::Option::Some(input);
222 self
223 }
224 pub fn set_reported_incident_start_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
226 self.reported_incident_start_date = input;
227 self
228 }
229 pub fn get_reported_incident_start_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
231 &self.reported_incident_start_date
232 }
233 pub fn actual_incident_start_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
235 self.actual_incident_start_date = ::std::option::Option::Some(input);
236 self
237 }
238 pub fn set_actual_incident_start_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
240 self.actual_incident_start_date = input;
241 self
242 }
243 pub fn get_actual_incident_start_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
245 &self.actual_incident_start_date
246 }
247 pub fn engagement_type(mut self, input: crate::types::EngagementType) -> Self {
249 self.engagement_type = ::std::option::Option::Some(input);
250 self
251 }
252 pub fn set_engagement_type(mut self, input: ::std::option::Option<crate::types::EngagementType>) -> Self {
254 self.engagement_type = input;
255 self
256 }
257 pub fn get_engagement_type(&self) -> &::std::option::Option<crate::types::EngagementType> {
259 &self.engagement_type
260 }
261 pub fn watchers_to_add(mut self, input: crate::types::Watcher) -> Self {
267 let mut v = self.watchers_to_add.unwrap_or_default();
268 v.push(input);
269 self.watchers_to_add = ::std::option::Option::Some(v);
270 self
271 }
272 pub fn set_watchers_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Watcher>>) -> Self {
274 self.watchers_to_add = input;
275 self
276 }
277 pub fn get_watchers_to_add(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Watcher>> {
279 &self.watchers_to_add
280 }
281 pub fn watchers_to_delete(mut self, input: crate::types::Watcher) -> Self {
287 let mut v = self.watchers_to_delete.unwrap_or_default();
288 v.push(input);
289 self.watchers_to_delete = ::std::option::Option::Some(v);
290 self
291 }
292 pub fn set_watchers_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Watcher>>) -> Self {
294 self.watchers_to_delete = input;
295 self
296 }
297 pub fn get_watchers_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Watcher>> {
299 &self.watchers_to_delete
300 }
301 pub fn threat_actor_ip_addresses_to_add(mut self, input: crate::types::ThreatActorIp) -> Self {
307 let mut v = self.threat_actor_ip_addresses_to_add.unwrap_or_default();
308 v.push(input);
309 self.threat_actor_ip_addresses_to_add = ::std::option::Option::Some(v);
310 self
311 }
312 pub fn set_threat_actor_ip_addresses_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>>) -> Self {
314 self.threat_actor_ip_addresses_to_add = input;
315 self
316 }
317 pub fn get_threat_actor_ip_addresses_to_add(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>> {
319 &self.threat_actor_ip_addresses_to_add
320 }
321 pub fn threat_actor_ip_addresses_to_delete(mut self, input: crate::types::ThreatActorIp) -> Self {
327 let mut v = self.threat_actor_ip_addresses_to_delete.unwrap_or_default();
328 v.push(input);
329 self.threat_actor_ip_addresses_to_delete = ::std::option::Option::Some(v);
330 self
331 }
332 pub fn set_threat_actor_ip_addresses_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>>) -> Self {
334 self.threat_actor_ip_addresses_to_delete = input;
335 self
336 }
337 pub fn get_threat_actor_ip_addresses_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>> {
339 &self.threat_actor_ip_addresses_to_delete
340 }
341 pub fn impacted_services_to_add(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
347 let mut v = self.impacted_services_to_add.unwrap_or_default();
348 v.push(input.into());
349 self.impacted_services_to_add = ::std::option::Option::Some(v);
350 self
351 }
352 pub fn set_impacted_services_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
354 self.impacted_services_to_add = input;
355 self
356 }
357 pub fn get_impacted_services_to_add(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
359 &self.impacted_services_to_add
360 }
361 pub fn impacted_services_to_delete(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
367 let mut v = self.impacted_services_to_delete.unwrap_or_default();
368 v.push(input.into());
369 self.impacted_services_to_delete = ::std::option::Option::Some(v);
370 self
371 }
372 pub fn set_impacted_services_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
374 self.impacted_services_to_delete = input;
375 self
376 }
377 pub fn get_impacted_services_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
379 &self.impacted_services_to_delete
380 }
381 pub fn impacted_aws_regions_to_add(mut self, input: crate::types::ImpactedAwsRegion) -> Self {
387 let mut v = self.impacted_aws_regions_to_add.unwrap_or_default();
388 v.push(input);
389 self.impacted_aws_regions_to_add = ::std::option::Option::Some(v);
390 self
391 }
392 pub fn set_impacted_aws_regions_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>>) -> Self {
394 self.impacted_aws_regions_to_add = input;
395 self
396 }
397 pub fn get_impacted_aws_regions_to_add(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>> {
399 &self.impacted_aws_regions_to_add
400 }
401 pub fn impacted_aws_regions_to_delete(mut self, input: crate::types::ImpactedAwsRegion) -> Self {
407 let mut v = self.impacted_aws_regions_to_delete.unwrap_or_default();
408 v.push(input);
409 self.impacted_aws_regions_to_delete = ::std::option::Option::Some(v);
410 self
411 }
412 pub fn set_impacted_aws_regions_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>>) -> Self {
414 self.impacted_aws_regions_to_delete = input;
415 self
416 }
417 pub fn get_impacted_aws_regions_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>> {
419 &self.impacted_aws_regions_to_delete
420 }
421 pub fn impacted_accounts_to_add(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
427 let mut v = self.impacted_accounts_to_add.unwrap_or_default();
428 v.push(input.into());
429 self.impacted_accounts_to_add = ::std::option::Option::Some(v);
430 self
431 }
432 pub fn set_impacted_accounts_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
434 self.impacted_accounts_to_add = input;
435 self
436 }
437 pub fn get_impacted_accounts_to_add(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
439 &self.impacted_accounts_to_add
440 }
441 pub fn impacted_accounts_to_delete(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
447 let mut v = self.impacted_accounts_to_delete.unwrap_or_default();
448 v.push(input.into());
449 self.impacted_accounts_to_delete = ::std::option::Option::Some(v);
450 self
451 }
452 pub fn set_impacted_accounts_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
454 self.impacted_accounts_to_delete = input;
455 self
456 }
457 pub fn get_impacted_accounts_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
459 &self.impacted_accounts_to_delete
460 }
461 pub fn build(self) -> ::std::result::Result<crate::operation::update_case::UpdateCaseInput, ::aws_smithy_types::error::operation::BuildError> {
463 ::std::result::Result::Ok(crate::operation::update_case::UpdateCaseInput {
464 case_id: self.case_id,
465 title: self.title,
466 description: self.description,
467 reported_incident_start_date: self.reported_incident_start_date,
468 actual_incident_start_date: self.actual_incident_start_date,
469 engagement_type: self.engagement_type,
470 watchers_to_add: self.watchers_to_add,
471 watchers_to_delete: self.watchers_to_delete,
472 threat_actor_ip_addresses_to_add: self.threat_actor_ip_addresses_to_add,
473 threat_actor_ip_addresses_to_delete: self.threat_actor_ip_addresses_to_delete,
474 impacted_services_to_add: self.impacted_services_to_add,
475 impacted_services_to_delete: self.impacted_services_to_delete,
476 impacted_aws_regions_to_add: self.impacted_aws_regions_to_add,
477 impacted_aws_regions_to_delete: self.impacted_aws_regions_to_delete,
478 impacted_accounts_to_add: self.impacted_accounts_to_add,
479 impacted_accounts_to_delete: self.impacted_accounts_to_delete,
480 })
481 }
482}
483impl ::std::fmt::Debug for UpdateCaseInputBuilder {
484 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
485 let mut formatter = f.debug_struct("UpdateCaseInputBuilder");
486 formatter.field("case_id", &self.case_id);
487 formatter.field("title", &"*** Sensitive Data Redacted ***");
488 formatter.field("description", &"*** Sensitive Data Redacted ***");
489 formatter.field("reported_incident_start_date", &self.reported_incident_start_date);
490 formatter.field("actual_incident_start_date", &self.actual_incident_start_date);
491 formatter.field("engagement_type", &self.engagement_type);
492 formatter.field("watchers_to_add", &self.watchers_to_add);
493 formatter.field("watchers_to_delete", &self.watchers_to_delete);
494 formatter.field("threat_actor_ip_addresses_to_add", &self.threat_actor_ip_addresses_to_add);
495 formatter.field("threat_actor_ip_addresses_to_delete", &self.threat_actor_ip_addresses_to_delete);
496 formatter.field("impacted_services_to_add", &self.impacted_services_to_add);
497 formatter.field("impacted_services_to_delete", &self.impacted_services_to_delete);
498 formatter.field("impacted_aws_regions_to_add", &self.impacted_aws_regions_to_add);
499 formatter.field("impacted_aws_regions_to_delete", &self.impacted_aws_regions_to_delete);
500 formatter.field("impacted_accounts_to_add", &self.impacted_accounts_to_add);
501 formatter.field("impacted_accounts_to_delete", &self.impacted_accounts_to_delete);
502 formatter.finish()
503 }
504}