aws_sdk_support/operation/create_case/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_case::_create_case_output::CreateCaseOutputBuilder;
3
4pub use crate::operation::create_case::_create_case_input::CreateCaseInputBuilder;
5
6impl crate::operation::create_case::builders::CreateCaseInputBuilder {
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::create_case::CreateCaseOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_case::CreateCaseError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_case();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateCase`.
24///
25/// <p>Creates a case in the Amazon Web Services Support Center. This operation is similar to how you create a case in the Amazon Web Services Support Center <a href="https://console.aws.amazon.com/support/home#/case/create">Create Case</a> page.</p>
26/// <p>The Amazon Web Services Support API doesn't support requesting service limit increases. You can submit a service limit increase in the following ways:</p>
27/// <ul>
28/// <li>
29/// <p>Submit a request from the Amazon Web Services Support Center <a href="https://console.aws.amazon.com/support/home#/case/create">Create Case</a> page.</p></li>
30/// <li>
31/// <p>Use the Service Quotas <a href="https://docs.aws.amazon.com/servicequotas/2019-06-24/apireference/API_RequestServiceQuotaIncrease.html">RequestServiceQuotaIncrease</a> operation.</p></li>
32/// </ul>
33/// <p>A successful <code>CreateCase</code> request returns an Amazon Web Services Support case number. You can use the <code>DescribeCases</code> operation and specify the case number to get existing Amazon Web Services Support cases. After you create a case, use the <code>AddCommunicationToCase</code> operation to add additional communication or attachments to an existing case.</p>
34/// <p>The <code>caseId</code> is separate from the <code>displayId</code> that appears in the <a href="https://console.aws.amazon.com/support">Amazon Web Services Support Center</a>. Use the <code>DescribeCases</code> operation to get the <code>displayId</code>.</p><note>
35/// <ul>
36/// <li>
37/// <p>You must have a Business, Enterprise On-Ramp, or Enterprise Support plan to use the Amazon Web Services Support API.</p></li>
38/// <li>
39/// <p>If you call the Amazon Web Services Support API from an account that doesn't have a Business, Enterprise On-Ramp, or Enterprise Support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">Amazon Web Services Support</a>.</p></li>
40/// </ul>
41/// </note>
42#[derive(::std::clone::Clone, ::std::fmt::Debug)]
43pub struct CreateCaseFluentBuilder {
44    handle: ::std::sync::Arc<crate::client::Handle>,
45    inner: crate::operation::create_case::builders::CreateCaseInputBuilder,
46    config_override: ::std::option::Option<crate::config::Builder>,
47}
48impl
49    crate::client::customize::internal::CustomizableSend<
50        crate::operation::create_case::CreateCaseOutput,
51        crate::operation::create_case::CreateCaseError,
52    > for CreateCaseFluentBuilder
53{
54    fn send(
55        self,
56        config_override: crate::config::Builder,
57    ) -> crate::client::customize::internal::BoxFuture<
58        crate::client::customize::internal::SendResult<
59            crate::operation::create_case::CreateCaseOutput,
60            crate::operation::create_case::CreateCaseError,
61        >,
62    > {
63        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
64    }
65}
66impl CreateCaseFluentBuilder {
67    /// Creates a new `CreateCaseFluentBuilder`.
68    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
69        Self {
70            handle,
71            inner: ::std::default::Default::default(),
72            config_override: ::std::option::Option::None,
73        }
74    }
75    /// Access the CreateCase as a reference.
76    pub fn as_input(&self) -> &crate::operation::create_case::builders::CreateCaseInputBuilder {
77        &self.inner
78    }
79    /// Sends the request and returns the response.
80    ///
81    /// If an error occurs, an `SdkError` will be returned with additional details that
82    /// can be matched against.
83    ///
84    /// By default, any retryable failures will be retried twice. Retry behavior
85    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
86    /// set when configuring the client.
87    pub async fn send(
88        self,
89    ) -> ::std::result::Result<
90        crate::operation::create_case::CreateCaseOutput,
91        ::aws_smithy_runtime_api::client::result::SdkError<
92            crate::operation::create_case::CreateCaseError,
93            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
94        >,
95    > {
96        let input = self
97            .inner
98            .build()
99            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
100        let runtime_plugins = crate::operation::create_case::CreateCase::operation_runtime_plugins(
101            self.handle.runtime_plugins.clone(),
102            &self.handle.conf,
103            self.config_override,
104        );
105        crate::operation::create_case::CreateCase::orchestrate(&runtime_plugins, input).await
106    }
107
108    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
109    pub fn customize(
110        self,
111    ) -> crate::client::customize::CustomizableOperation<
112        crate::operation::create_case::CreateCaseOutput,
113        crate::operation::create_case::CreateCaseError,
114        Self,
115    > {
116        crate::client::customize::CustomizableOperation::new(self)
117    }
118    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
119        self.set_config_override(::std::option::Option::Some(config_override.into()));
120        self
121    }
122
123    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
124        self.config_override = config_override;
125        self
126    }
127    /// <p>The title of the support case. The title appears in the <b>Subject</b> field on the Amazon Web Services Support Center <a href="https://console.aws.amazon.com/support/home#/case/create">Create Case</a> page.</p>
128    pub fn subject(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129        self.inner = self.inner.subject(input.into());
130        self
131    }
132    /// <p>The title of the support case. The title appears in the <b>Subject</b> field on the Amazon Web Services Support Center <a href="https://console.aws.amazon.com/support/home#/case/create">Create Case</a> page.</p>
133    pub fn set_subject(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.inner = self.inner.set_subject(input);
135        self
136    }
137    /// <p>The title of the support case. The title appears in the <b>Subject</b> field on the Amazon Web Services Support Center <a href="https://console.aws.amazon.com/support/home#/case/create">Create Case</a> page.</p>
138    pub fn get_subject(&self) -> &::std::option::Option<::std::string::String> {
139        self.inner.get_subject()
140    }
141    /// <p>The code for the Amazon Web Services service. You can use the <code>DescribeServices</code> operation to get the possible <code>serviceCode</code> values.</p>
142    pub fn service_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143        self.inner = self.inner.service_code(input.into());
144        self
145    }
146    /// <p>The code for the Amazon Web Services service. You can use the <code>DescribeServices</code> operation to get the possible <code>serviceCode</code> values.</p>
147    pub fn set_service_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148        self.inner = self.inner.set_service_code(input);
149        self
150    }
151    /// <p>The code for the Amazon Web Services service. You can use the <code>DescribeServices</code> operation to get the possible <code>serviceCode</code> values.</p>
152    pub fn get_service_code(&self) -> &::std::option::Option<::std::string::String> {
153        self.inner.get_service_code()
154    }
155    /// <p>A value that indicates the urgency of the case. This value determines the response time according to your service level agreement with Amazon Web Services Support. You can use the <code>DescribeSeverityLevels</code> operation to get the possible values for <code>severityCode</code>.</p>
156    /// <p>For more information, see <code>SeverityLevel</code> and <a href="https://docs.aws.amazon.com/awssupport/latest/user/getting-started.html#choosing-severity">Choosing a Severity</a> in the <i>Amazon Web Services Support User Guide</i>.</p><note>
157    /// <p>The availability of severity levels depends on the support plan for the Amazon Web Services account.</p>
158    /// </note>
159    pub fn severity_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
160        self.inner = self.inner.severity_code(input.into());
161        self
162    }
163    /// <p>A value that indicates the urgency of the case. This value determines the response time according to your service level agreement with Amazon Web Services Support. You can use the <code>DescribeSeverityLevels</code> operation to get the possible values for <code>severityCode</code>.</p>
164    /// <p>For more information, see <code>SeverityLevel</code> and <a href="https://docs.aws.amazon.com/awssupport/latest/user/getting-started.html#choosing-severity">Choosing a Severity</a> in the <i>Amazon Web Services Support User Guide</i>.</p><note>
165    /// <p>The availability of severity levels depends on the support plan for the Amazon Web Services account.</p>
166    /// </note>
167    pub fn set_severity_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
168        self.inner = self.inner.set_severity_code(input);
169        self
170    }
171    /// <p>A value that indicates the urgency of the case. This value determines the response time according to your service level agreement with Amazon Web Services Support. You can use the <code>DescribeSeverityLevels</code> operation to get the possible values for <code>severityCode</code>.</p>
172    /// <p>For more information, see <code>SeverityLevel</code> and <a href="https://docs.aws.amazon.com/awssupport/latest/user/getting-started.html#choosing-severity">Choosing a Severity</a> in the <i>Amazon Web Services Support User Guide</i>.</p><note>
173    /// <p>The availability of severity levels depends on the support plan for the Amazon Web Services account.</p>
174    /// </note>
175    pub fn get_severity_code(&self) -> &::std::option::Option<::std::string::String> {
176        self.inner.get_severity_code()
177    }
178    /// <p>The category of problem for the support case. You also use the <code>DescribeServices</code> operation to get the category code for a service. Each Amazon Web Services service defines its own set of category codes.</p>
179    pub fn category_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
180        self.inner = self.inner.category_code(input.into());
181        self
182    }
183    /// <p>The category of problem for the support case. You also use the <code>DescribeServices</code> operation to get the category code for a service. Each Amazon Web Services service defines its own set of category codes.</p>
184    pub fn set_category_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
185        self.inner = self.inner.set_category_code(input);
186        self
187    }
188    /// <p>The category of problem for the support case. You also use the <code>DescribeServices</code> operation to get the category code for a service. Each Amazon Web Services service defines its own set of category codes.</p>
189    pub fn get_category_code(&self) -> &::std::option::Option<::std::string::String> {
190        self.inner.get_category_code()
191    }
192    /// <p>The communication body text that describes the issue. This text appears in the <b>Description</b> field on the Amazon Web Services Support Center <a href="https://console.aws.amazon.com/support/home#/case/create">Create Case</a> page.</p>
193    pub fn communication_body(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
194        self.inner = self.inner.communication_body(input.into());
195        self
196    }
197    /// <p>The communication body text that describes the issue. This text appears in the <b>Description</b> field on the Amazon Web Services Support Center <a href="https://console.aws.amazon.com/support/home#/case/create">Create Case</a> page.</p>
198    pub fn set_communication_body(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
199        self.inner = self.inner.set_communication_body(input);
200        self
201    }
202    /// <p>The communication body text that describes the issue. This text appears in the <b>Description</b> field on the Amazon Web Services Support Center <a href="https://console.aws.amazon.com/support/home#/case/create">Create Case</a> page.</p>
203    pub fn get_communication_body(&self) -> &::std::option::Option<::std::string::String> {
204        self.inner.get_communication_body()
205    }
206    ///
207    /// Appends an item to `ccEmailAddresses`.
208    ///
209    /// To override the contents of this collection use [`set_cc_email_addresses`](Self::set_cc_email_addresses).
210    ///
211    /// <p>A list of email addresses that Amazon Web Services Support copies on case correspondence. Amazon Web Services Support identifies the account that creates the case when you specify your Amazon Web Services credentials in an HTTP POST method or use the <a href="http://aws.amazon.com/tools/">Amazon Web Services SDKs</a>.</p>
212    pub fn cc_email_addresses(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
213        self.inner = self.inner.cc_email_addresses(input.into());
214        self
215    }
216    /// <p>A list of email addresses that Amazon Web Services Support copies on case correspondence. Amazon Web Services Support identifies the account that creates the case when you specify your Amazon Web Services credentials in an HTTP POST method or use the <a href="http://aws.amazon.com/tools/">Amazon Web Services SDKs</a>.</p>
217    pub fn set_cc_email_addresses(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
218        self.inner = self.inner.set_cc_email_addresses(input);
219        self
220    }
221    /// <p>A list of email addresses that Amazon Web Services Support copies on case correspondence. Amazon Web Services Support identifies the account that creates the case when you specify your Amazon Web Services credentials in an HTTP POST method or use the <a href="http://aws.amazon.com/tools/">Amazon Web Services SDKs</a>.</p>
222    pub fn get_cc_email_addresses(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
223        self.inner.get_cc_email_addresses()
224    }
225    /// <p>The language in which Amazon Web Services Support handles the case. Amazon Web Services Support currently supports Chinese (“zh”), English ("en"), Japanese ("ja") and Korean (“ko”). You must specify the ISO 639-1 code for the <code>language</code> parameter if you want support in that language.</p>
226    pub fn language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
227        self.inner = self.inner.language(input.into());
228        self
229    }
230    /// <p>The language in which Amazon Web Services Support handles the case. Amazon Web Services Support currently supports Chinese (“zh”), English ("en"), Japanese ("ja") and Korean (“ko”). You must specify the ISO 639-1 code for the <code>language</code> parameter if you want support in that language.</p>
231    pub fn set_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
232        self.inner = self.inner.set_language(input);
233        self
234    }
235    /// <p>The language in which Amazon Web Services Support handles the case. Amazon Web Services Support currently supports Chinese (“zh”), English ("en"), Japanese ("ja") and Korean (“ko”). You must specify the ISO 639-1 code for the <code>language</code> parameter if you want support in that language.</p>
236    pub fn get_language(&self) -> &::std::option::Option<::std::string::String> {
237        self.inner.get_language()
238    }
239    /// <p>The type of issue for the case. You can specify <code>customer-service</code> or <code>technical</code>. If you don't specify a value, the default is <code>technical</code>.</p>
240    pub fn issue_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
241        self.inner = self.inner.issue_type(input.into());
242        self
243    }
244    /// <p>The type of issue for the case. You can specify <code>customer-service</code> or <code>technical</code>. If you don't specify a value, the default is <code>technical</code>.</p>
245    pub fn set_issue_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
246        self.inner = self.inner.set_issue_type(input);
247        self
248    }
249    /// <p>The type of issue for the case. You can specify <code>customer-service</code> or <code>technical</code>. If you don't specify a value, the default is <code>technical</code>.</p>
250    pub fn get_issue_type(&self) -> &::std::option::Option<::std::string::String> {
251        self.inner.get_issue_type()
252    }
253    /// <p>The ID of a set of one or more attachments for the case. Create the set by using the <code>AddAttachmentsToSet</code> operation.</p>
254    pub fn attachment_set_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
255        self.inner = self.inner.attachment_set_id(input.into());
256        self
257    }
258    /// <p>The ID of a set of one or more attachments for the case. Create the set by using the <code>AddAttachmentsToSet</code> operation.</p>
259    pub fn set_attachment_set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
260        self.inner = self.inner.set_attachment_set_id(input);
261        self
262    }
263    /// <p>The ID of a set of one or more attachments for the case. Create the set by using the <code>AddAttachmentsToSet</code> operation.</p>
264    pub fn get_attachment_set_id(&self) -> &::std::option::Option<::std::string::String> {
265        self.inner.get_attachment_set_id()
266    }
267}