aws_sdk_support/operation/describe_create_case_options/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_create_case_options::_describe_create_case_options_output::DescribeCreateCaseOptionsOutputBuilder;
3
4pub use crate::operation::describe_create_case_options::_describe_create_case_options_input::DescribeCreateCaseOptionsInputBuilder;
5
6impl crate::operation::describe_create_case_options::builders::DescribeCreateCaseOptionsInputBuilder {
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::describe_create_case_options::DescribeCreateCaseOptionsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_create_case_options::DescribeCreateCaseOptionsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_create_case_options();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeCreateCaseOptions`.
24///
25/// <p>Returns a list of CreateCaseOption types along with the corresponding supported hours and language availability. You can specify the <code>language</code> <code>categoryCode</code>, <code>issueType</code> and <code>serviceCode</code> used to retrieve the CreateCaseOptions.</p><note>
26/// <ul>
27/// <li>
28/// <p>You must have a Business, Enterprise On-Ramp, or Enterprise Support plan to use the Amazon Web Services Support API.</p></li>
29/// <li>
30/// <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>
31/// </ul>
32/// </note>
33#[derive(::std::clone::Clone, ::std::fmt::Debug)]
34pub struct DescribeCreateCaseOptionsFluentBuilder {
35    handle: ::std::sync::Arc<crate::client::Handle>,
36    inner: crate::operation::describe_create_case_options::builders::DescribeCreateCaseOptionsInputBuilder,
37    config_override: ::std::option::Option<crate::config::Builder>,
38}
39impl
40    crate::client::customize::internal::CustomizableSend<
41        crate::operation::describe_create_case_options::DescribeCreateCaseOptionsOutput,
42        crate::operation::describe_create_case_options::DescribeCreateCaseOptionsError,
43    > for DescribeCreateCaseOptionsFluentBuilder
44{
45    fn send(
46        self,
47        config_override: crate::config::Builder,
48    ) -> crate::client::customize::internal::BoxFuture<
49        crate::client::customize::internal::SendResult<
50            crate::operation::describe_create_case_options::DescribeCreateCaseOptionsOutput,
51            crate::operation::describe_create_case_options::DescribeCreateCaseOptionsError,
52        >,
53    > {
54        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
55    }
56}
57impl DescribeCreateCaseOptionsFluentBuilder {
58    /// Creates a new `DescribeCreateCaseOptionsFluentBuilder`.
59    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
60        Self {
61            handle,
62            inner: ::std::default::Default::default(),
63            config_override: ::std::option::Option::None,
64        }
65    }
66    /// Access the DescribeCreateCaseOptions as a reference.
67    pub fn as_input(&self) -> &crate::operation::describe_create_case_options::builders::DescribeCreateCaseOptionsInputBuilder {
68        &self.inner
69    }
70    /// Sends the request and returns the response.
71    ///
72    /// If an error occurs, an `SdkError` will be returned with additional details that
73    /// can be matched against.
74    ///
75    /// By default, any retryable failures will be retried twice. Retry behavior
76    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
77    /// set when configuring the client.
78    pub async fn send(
79        self,
80    ) -> ::std::result::Result<
81        crate::operation::describe_create_case_options::DescribeCreateCaseOptionsOutput,
82        ::aws_smithy_runtime_api::client::result::SdkError<
83            crate::operation::describe_create_case_options::DescribeCreateCaseOptionsError,
84            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
85        >,
86    > {
87        let input = self
88            .inner
89            .build()
90            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
91        let runtime_plugins = crate::operation::describe_create_case_options::DescribeCreateCaseOptions::operation_runtime_plugins(
92            self.handle.runtime_plugins.clone(),
93            &self.handle.conf,
94            self.config_override,
95        );
96        crate::operation::describe_create_case_options::DescribeCreateCaseOptions::orchestrate(&runtime_plugins, input).await
97    }
98
99    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
100    pub fn customize(
101        self,
102    ) -> crate::client::customize::CustomizableOperation<
103        crate::operation::describe_create_case_options::DescribeCreateCaseOptionsOutput,
104        crate::operation::describe_create_case_options::DescribeCreateCaseOptionsError,
105        Self,
106    > {
107        crate::client::customize::CustomizableOperation::new(self)
108    }
109    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
110        self.set_config_override(::std::option::Option::Some(config_override.into()));
111        self
112    }
113
114    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
115        self.config_override = config_override;
116        self
117    }
118    /// <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>
119    pub fn issue_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
120        self.inner = self.inner.issue_type(input.into());
121        self
122    }
123    /// <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>
124    pub fn set_issue_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
125        self.inner = self.inner.set_issue_type(input);
126        self
127    }
128    /// <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>
129    pub fn get_issue_type(&self) -> &::std::option::Option<::std::string::String> {
130        self.inner.get_issue_type()
131    }
132    /// <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>
133    pub fn service_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134        self.inner = self.inner.service_code(input.into());
135        self
136    }
137    /// <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>
138    pub fn set_service_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
139        self.inner = self.inner.set_service_code(input);
140        self
141    }
142    /// <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>
143    pub fn get_service_code(&self) -> &::std::option::Option<::std::string::String> {
144        self.inner.get_service_code()
145    }
146    /// <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>
147    pub fn language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
148        self.inner = self.inner.language(input.into());
149        self
150    }
151    /// <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>
152    pub fn set_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
153        self.inner = self.inner.set_language(input);
154        self
155    }
156    /// <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>
157    pub fn get_language(&self) -> &::std::option::Option<::std::string::String> {
158        self.inner.get_language()
159    }
160    /// <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>
161    pub fn category_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
162        self.inner = self.inner.category_code(input.into());
163        self
164    }
165    /// <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>
166    pub fn set_category_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
167        self.inner = self.inner.set_category_code(input);
168        self
169    }
170    /// <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>
171    pub fn get_category_code(&self) -> &::std::option::Option<::std::string::String> {
172        self.inner.get_category_code()
173    }
174}