aws_sdk_securityir/operation/update_case/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_case::_update_case_output::UpdateCaseOutputBuilder;
3
4pub use crate::operation::update_case::_update_case_input::UpdateCaseInputBuilder;
5
6impl crate::operation::update_case::builders::UpdateCaseInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::update_case::UpdateCaseOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_case::UpdateCaseError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_case();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateCase`.
24///
25/// <p>Updates an existing case.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct UpdateCaseFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::update_case::builders::UpdateCaseInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::update_case::UpdateCaseOutput,
35        crate::operation::update_case::UpdateCaseError,
36    > for UpdateCaseFluentBuilder
37{
38    fn send(
39        self,
40        config_override: crate::config::Builder,
41    ) -> crate::client::customize::internal::BoxFuture<
42        crate::client::customize::internal::SendResult<
43            crate::operation::update_case::UpdateCaseOutput,
44            crate::operation::update_case::UpdateCaseError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl UpdateCaseFluentBuilder {
51    /// Creates a new `UpdateCaseFluentBuilder`.
52    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53        Self {
54            handle,
55            inner: ::std::default::Default::default(),
56            config_override: ::std::option::Option::None,
57        }
58    }
59    /// Access the UpdateCase as a reference.
60    pub fn as_input(&self) -> &crate::operation::update_case::builders::UpdateCaseInputBuilder {
61        &self.inner
62    }
63    /// Sends the request and returns the response.
64    ///
65    /// If an error occurs, an `SdkError` will be returned with additional details that
66    /// can be matched against.
67    ///
68    /// By default, any retryable failures will be retried twice. Retry behavior
69    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70    /// set when configuring the client.
71    pub async fn send(
72        self,
73    ) -> ::std::result::Result<
74        crate::operation::update_case::UpdateCaseOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::update_case::UpdateCaseError,
77            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78        >,
79    > {
80        let input = self
81            .inner
82            .build()
83            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84        let runtime_plugins = crate::operation::update_case::UpdateCase::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::update_case::UpdateCase::orchestrate(&runtime_plugins, input).await
90    }
91
92    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93    pub fn customize(
94        self,
95    ) -> crate::client::customize::CustomizableOperation<
96        crate::operation::update_case::UpdateCaseOutput,
97        crate::operation::update_case::UpdateCaseError,
98        Self,
99    > {
100        crate::client::customize::CustomizableOperation::new(self)
101    }
102    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103        self.set_config_override(::std::option::Option::Some(config_override.into()));
104        self
105    }
106
107    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108        self.config_override = config_override;
109        self
110    }
111    /// <p>Required element for UpdateCase to identify the case ID for updates.</p>
112    pub fn case_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.case_id(input.into());
114        self
115    }
116    /// <p>Required element for UpdateCase to identify the case ID for updates.</p>
117    pub fn set_case_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_case_id(input);
119        self
120    }
121    /// <p>Required element for UpdateCase to identify the case ID for updates.</p>
122    pub fn get_case_id(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_case_id()
124    }
125    /// <p>Optional element for UpdateCase to provide content for the title field.</p>
126    pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.inner = self.inner.title(input.into());
128        self
129    }
130    /// <p>Optional element for UpdateCase to provide content for the title field.</p>
131    pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.inner = self.inner.set_title(input);
133        self
134    }
135    /// <p>Optional element for UpdateCase to provide content for the title field.</p>
136    pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
137        self.inner.get_title()
138    }
139    /// <p>Optional element for UpdateCase to provide content for the description field.</p>
140    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141        self.inner = self.inner.description(input.into());
142        self
143    }
144    /// <p>Optional element for UpdateCase to provide content for the description field.</p>
145    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146        self.inner = self.inner.set_description(input);
147        self
148    }
149    /// <p>Optional element for UpdateCase to provide content for the description field.</p>
150    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
151        self.inner.get_description()
152    }
153    /// <p>Optional element for UpdateCase to provide content for the customer reported incident start date field.</p>
154    pub fn reported_incident_start_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
155        self.inner = self.inner.reported_incident_start_date(input);
156        self
157    }
158    /// <p>Optional element for UpdateCase to provide content for the customer reported incident start date field.</p>
159    pub fn set_reported_incident_start_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
160        self.inner = self.inner.set_reported_incident_start_date(input);
161        self
162    }
163    /// <p>Optional element for UpdateCase to provide content for the customer reported incident start date field.</p>
164    pub fn get_reported_incident_start_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
165        self.inner.get_reported_incident_start_date()
166    }
167    /// <p>Optional element for UpdateCase to provide content for the incident start date field.</p>
168    pub fn actual_incident_start_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
169        self.inner = self.inner.actual_incident_start_date(input);
170        self
171    }
172    /// <p>Optional element for UpdateCase to provide content for the incident start date field.</p>
173    pub fn set_actual_incident_start_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
174        self.inner = self.inner.set_actual_incident_start_date(input);
175        self
176    }
177    /// <p>Optional element for UpdateCase to provide content for the incident start date field.</p>
178    pub fn get_actual_incident_start_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
179        self.inner.get_actual_incident_start_date()
180    }
181    /// <p>Optional element for UpdateCase to provide content for the engagement type field. <code>Available engagement types include Security Incident | Investigation</code>.</p>
182    pub fn engagement_type(mut self, input: crate::types::EngagementType) -> Self {
183        self.inner = self.inner.engagement_type(input);
184        self
185    }
186    /// <p>Optional element for UpdateCase to provide content for the engagement type field. <code>Available engagement types include Security Incident | Investigation</code>.</p>
187    pub fn set_engagement_type(mut self, input: ::std::option::Option<crate::types::EngagementType>) -> Self {
188        self.inner = self.inner.set_engagement_type(input);
189        self
190    }
191    /// <p>Optional element for UpdateCase to provide content for the engagement type field. <code>Available engagement types include Security Incident | Investigation</code>.</p>
192    pub fn get_engagement_type(&self) -> &::std::option::Option<crate::types::EngagementType> {
193        self.inner.get_engagement_type()
194    }
195    ///
196    /// Appends an item to `watchersToAdd`.
197    ///
198    /// To override the contents of this collection use [`set_watchers_to_add`](Self::set_watchers_to_add).
199    ///
200    /// <p>Optional element for UpdateCase to provide content to add additional watchers to a case.</p>
201    pub fn watchers_to_add(mut self, input: crate::types::Watcher) -> Self {
202        self.inner = self.inner.watchers_to_add(input);
203        self
204    }
205    /// <p>Optional element for UpdateCase to provide content to add additional watchers to a case.</p>
206    pub fn set_watchers_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Watcher>>) -> Self {
207        self.inner = self.inner.set_watchers_to_add(input);
208        self
209    }
210    /// <p>Optional element for UpdateCase to provide content to add additional watchers to a case.</p>
211    pub fn get_watchers_to_add(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Watcher>> {
212        self.inner.get_watchers_to_add()
213    }
214    ///
215    /// Appends an item to `watchersToDelete`.
216    ///
217    /// To override the contents of this collection use [`set_watchers_to_delete`](Self::set_watchers_to_delete).
218    ///
219    /// <p>Optional element for UpdateCase to provide content to remove existing watchers from a case.</p>
220    pub fn watchers_to_delete(mut self, input: crate::types::Watcher) -> Self {
221        self.inner = self.inner.watchers_to_delete(input);
222        self
223    }
224    /// <p>Optional element for UpdateCase to provide content to remove existing watchers from a case.</p>
225    pub fn set_watchers_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Watcher>>) -> Self {
226        self.inner = self.inner.set_watchers_to_delete(input);
227        self
228    }
229    /// <p>Optional element for UpdateCase to provide content to remove existing watchers from a case.</p>
230    pub fn get_watchers_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Watcher>> {
231        self.inner.get_watchers_to_delete()
232    }
233    ///
234    /// Appends an item to `threatActorIpAddressesToAdd`.
235    ///
236    /// To override the contents of this collection use [`set_threat_actor_ip_addresses_to_add`](Self::set_threat_actor_ip_addresses_to_add).
237    ///
238    /// <p>Optional element for UpdateCase to provide content to add additional suspicious IP addresses related to a case.</p>
239    pub fn threat_actor_ip_addresses_to_add(mut self, input: crate::types::ThreatActorIp) -> Self {
240        self.inner = self.inner.threat_actor_ip_addresses_to_add(input);
241        self
242    }
243    /// <p>Optional element for UpdateCase to provide content to add additional suspicious IP addresses related to a case.</p>
244    pub fn set_threat_actor_ip_addresses_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>>) -> Self {
245        self.inner = self.inner.set_threat_actor_ip_addresses_to_add(input);
246        self
247    }
248    /// <p>Optional element for UpdateCase to provide content to add additional suspicious IP addresses related to a case.</p>
249    pub fn get_threat_actor_ip_addresses_to_add(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>> {
250        self.inner.get_threat_actor_ip_addresses_to_add()
251    }
252    ///
253    /// Appends an item to `threatActorIpAddressesToDelete`.
254    ///
255    /// To override the contents of this collection use [`set_threat_actor_ip_addresses_to_delete`](Self::set_threat_actor_ip_addresses_to_delete).
256    ///
257    /// <p>Optional element for UpdateCase to provide content to remove suspicious IP addresses from a case.</p>
258    pub fn threat_actor_ip_addresses_to_delete(mut self, input: crate::types::ThreatActorIp) -> Self {
259        self.inner = self.inner.threat_actor_ip_addresses_to_delete(input);
260        self
261    }
262    /// <p>Optional element for UpdateCase to provide content to remove suspicious IP addresses from a case.</p>
263    pub fn set_threat_actor_ip_addresses_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>>) -> Self {
264        self.inner = self.inner.set_threat_actor_ip_addresses_to_delete(input);
265        self
266    }
267    /// <p>Optional element for UpdateCase to provide content to remove suspicious IP addresses from a case.</p>
268    pub fn get_threat_actor_ip_addresses_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ThreatActorIp>> {
269        self.inner.get_threat_actor_ip_addresses_to_delete()
270    }
271    ///
272    /// Appends an item to `impactedServicesToAdd`.
273    ///
274    /// To override the contents of this collection use [`set_impacted_services_to_add`](Self::set_impacted_services_to_add).
275    ///
276    /// <p>Optional element for UpdateCase to provide content to add services impacted.</p>
277    pub fn impacted_services_to_add(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
278        self.inner = self.inner.impacted_services_to_add(input.into());
279        self
280    }
281    /// <p>Optional element for UpdateCase to provide content to add services impacted.</p>
282    pub fn set_impacted_services_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
283        self.inner = self.inner.set_impacted_services_to_add(input);
284        self
285    }
286    /// <p>Optional element for UpdateCase to provide content to add services impacted.</p>
287    pub fn get_impacted_services_to_add(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
288        self.inner.get_impacted_services_to_add()
289    }
290    ///
291    /// Appends an item to `impactedServicesToDelete`.
292    ///
293    /// To override the contents of this collection use [`set_impacted_services_to_delete`](Self::set_impacted_services_to_delete).
294    ///
295    /// <p>Optional element for UpdateCase to provide content to remove services impacted.</p>
296    pub fn impacted_services_to_delete(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
297        self.inner = self.inner.impacted_services_to_delete(input.into());
298        self
299    }
300    /// <p>Optional element for UpdateCase to provide content to remove services impacted.</p>
301    pub fn set_impacted_services_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
302        self.inner = self.inner.set_impacted_services_to_delete(input);
303        self
304    }
305    /// <p>Optional element for UpdateCase to provide content to remove services impacted.</p>
306    pub fn get_impacted_services_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
307        self.inner.get_impacted_services_to_delete()
308    }
309    ///
310    /// Appends an item to `impactedAwsRegionsToAdd`.
311    ///
312    /// To override the contents of this collection use [`set_impacted_aws_regions_to_add`](Self::set_impacted_aws_regions_to_add).
313    ///
314    /// <p>Optional element for UpdateCase to provide content to add regions impacted.</p>
315    pub fn impacted_aws_regions_to_add(mut self, input: crate::types::ImpactedAwsRegion) -> Self {
316        self.inner = self.inner.impacted_aws_regions_to_add(input);
317        self
318    }
319    /// <p>Optional element for UpdateCase to provide content to add regions impacted.</p>
320    pub fn set_impacted_aws_regions_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>>) -> Self {
321        self.inner = self.inner.set_impacted_aws_regions_to_add(input);
322        self
323    }
324    /// <p>Optional element for UpdateCase to provide content to add regions impacted.</p>
325    pub fn get_impacted_aws_regions_to_add(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>> {
326        self.inner.get_impacted_aws_regions_to_add()
327    }
328    ///
329    /// Appends an item to `impactedAwsRegionsToDelete`.
330    ///
331    /// To override the contents of this collection use [`set_impacted_aws_regions_to_delete`](Self::set_impacted_aws_regions_to_delete).
332    ///
333    /// <p>Optional element for UpdateCase to provide content to remove regions impacted.</p>
334    pub fn impacted_aws_regions_to_delete(mut self, input: crate::types::ImpactedAwsRegion) -> Self {
335        self.inner = self.inner.impacted_aws_regions_to_delete(input);
336        self
337    }
338    /// <p>Optional element for UpdateCase to provide content to remove regions impacted.</p>
339    pub fn set_impacted_aws_regions_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>>) -> Self {
340        self.inner = self.inner.set_impacted_aws_regions_to_delete(input);
341        self
342    }
343    /// <p>Optional element for UpdateCase to provide content to remove regions impacted.</p>
344    pub fn get_impacted_aws_regions_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ImpactedAwsRegion>> {
345        self.inner.get_impacted_aws_regions_to_delete()
346    }
347    ///
348    /// Appends an item to `impactedAccountsToAdd`.
349    ///
350    /// To override the contents of this collection use [`set_impacted_accounts_to_add`](Self::set_impacted_accounts_to_add).
351    ///
352    /// <p>Optional element for UpdateCase to provide content to add accounts impacted.</p><note>
353    /// <p>AWS account ID's may appear less than 12 characters and need to be zero-prepended. An example would be <code>123123123</code> which is nine digits, and with zero-prepend would be <code>000123123123</code>. Not zero-prepending to 12 digits could result in errors.</p>
354    /// </note>
355    pub fn impacted_accounts_to_add(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
356        self.inner = self.inner.impacted_accounts_to_add(input.into());
357        self
358    }
359    /// <p>Optional element for UpdateCase to provide content to add accounts impacted.</p><note>
360    /// <p>AWS account ID's may appear less than 12 characters and need to be zero-prepended. An example would be <code>123123123</code> which is nine digits, and with zero-prepend would be <code>000123123123</code>. Not zero-prepending to 12 digits could result in errors.</p>
361    /// </note>
362    pub fn set_impacted_accounts_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
363        self.inner = self.inner.set_impacted_accounts_to_add(input);
364        self
365    }
366    /// <p>Optional element for UpdateCase to provide content to add accounts impacted.</p><note>
367    /// <p>AWS account ID's may appear less than 12 characters and need to be zero-prepended. An example would be <code>123123123</code> which is nine digits, and with zero-prepend would be <code>000123123123</code>. Not zero-prepending to 12 digits could result in errors.</p>
368    /// </note>
369    pub fn get_impacted_accounts_to_add(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
370        self.inner.get_impacted_accounts_to_add()
371    }
372    ///
373    /// Appends an item to `impactedAccountsToDelete`.
374    ///
375    /// To override the contents of this collection use [`set_impacted_accounts_to_delete`](Self::set_impacted_accounts_to_delete).
376    ///
377    /// <p>Optional element for UpdateCase to provide content to add accounts impacted.</p><note>
378    /// <p>AWS account ID's may appear less than 12 characters and need to be zero-prepended. An example would be <code>123123123</code> which is nine digits, and with zero-prepend would be <code>000123123123</code>. Not zero-prepending to 12 digits could result in errors.</p>
379    /// </note>
380    pub fn impacted_accounts_to_delete(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
381        self.inner = self.inner.impacted_accounts_to_delete(input.into());
382        self
383    }
384    /// <p>Optional element for UpdateCase to provide content to add accounts impacted.</p><note>
385    /// <p>AWS account ID's may appear less than 12 characters and need to be zero-prepended. An example would be <code>123123123</code> which is nine digits, and with zero-prepend would be <code>000123123123</code>. Not zero-prepending to 12 digits could result in errors.</p>
386    /// </note>
387    pub fn set_impacted_accounts_to_delete(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
388        self.inner = self.inner.set_impacted_accounts_to_delete(input);
389        self
390    }
391    /// <p>Optional element for UpdateCase to provide content to add accounts impacted.</p><note>
392    /// <p>AWS account ID's may appear less than 12 characters and need to be zero-prepended. An example would be <code>123123123</code> which is nine digits, and with zero-prepend would be <code>000123123123</code>. Not zero-prepending to 12 digits could result in errors.</p>
393    /// </note>
394    pub fn get_impacted_accounts_to_delete(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
395        self.inner.get_impacted_accounts_to_delete()
396    }
397    ///
398    /// Appends an item to `caseMetadata`.
399    ///
400    /// To override the contents of this collection use [`set_case_metadata`](Self::set_case_metadata).
401    ///
402    /// <p>Update the case request with case metadata</p>
403    pub fn case_metadata(mut self, input: crate::types::CaseMetadataEntry) -> Self {
404        self.inner = self.inner.case_metadata(input);
405        self
406    }
407    /// <p>Update the case request with case metadata</p>
408    pub fn set_case_metadata(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CaseMetadataEntry>>) -> Self {
409        self.inner = self.inner.set_case_metadata(input);
410        self
411    }
412    /// <p>Update the case request with case metadata</p>
413    pub fn get_case_metadata(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CaseMetadataEntry>> {
414        self.inner.get_case_metadata()
415    }
416}