aws_sdk_support/operation/describe_services/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_services::_describe_services_output::DescribeServicesOutputBuilder;
3
4pub use crate::operation::describe_services::_describe_services_input::DescribeServicesInputBuilder;
5
6impl crate::operation::describe_services::builders::DescribeServicesInputBuilder {
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_services::DescribeServicesOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_services::DescribeServicesError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_services();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeServices`.
24///
25/// <p>Returns the current list of Amazon Web Services services and a list of service categories for each service. You then use service names and categories in your <code>CreateCase</code> requests. Each Amazon Web Services service has its own set of categories.</p>
26/// <p>The service codes and category codes correspond to the values that appear in the <b>Service</b> and <b>Category</b> lists on the Amazon Web Services Support Center <a href="https://console.aws.amazon.com/support/home#/case/create">Create Case</a> page. The values in those fields don't necessarily match the service codes and categories returned by the <code>DescribeServices</code> operation. Always use the service codes and categories that the <code>DescribeServices</code> operation returns, so that you have the most recent set of service and category codes.</p><note>
27/// <ul>
28/// <li>
29/// <p>You must have a Business, Enterprise On-Ramp, or Enterprise Support plan to use the Amazon Web Services Support API.</p></li>
30/// <li>
31/// <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>
32/// </ul>
33/// </note>
34#[derive(::std::clone::Clone, ::std::fmt::Debug)]
35pub struct DescribeServicesFluentBuilder {
36    handle: ::std::sync::Arc<crate::client::Handle>,
37    inner: crate::operation::describe_services::builders::DescribeServicesInputBuilder,
38    config_override: ::std::option::Option<crate::config::Builder>,
39}
40impl
41    crate::client::customize::internal::CustomizableSend<
42        crate::operation::describe_services::DescribeServicesOutput,
43        crate::operation::describe_services::DescribeServicesError,
44    > for DescribeServicesFluentBuilder
45{
46    fn send(
47        self,
48        config_override: crate::config::Builder,
49    ) -> crate::client::customize::internal::BoxFuture<
50        crate::client::customize::internal::SendResult<
51            crate::operation::describe_services::DescribeServicesOutput,
52            crate::operation::describe_services::DescribeServicesError,
53        >,
54    > {
55        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
56    }
57}
58impl DescribeServicesFluentBuilder {
59    /// Creates a new `DescribeServicesFluentBuilder`.
60    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
61        Self {
62            handle,
63            inner: ::std::default::Default::default(),
64            config_override: ::std::option::Option::None,
65        }
66    }
67    /// Access the DescribeServices as a reference.
68    pub fn as_input(&self) -> &crate::operation::describe_services::builders::DescribeServicesInputBuilder {
69        &self.inner
70    }
71    /// Sends the request and returns the response.
72    ///
73    /// If an error occurs, an `SdkError` will be returned with additional details that
74    /// can be matched against.
75    ///
76    /// By default, any retryable failures will be retried twice. Retry behavior
77    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
78    /// set when configuring the client.
79    pub async fn send(
80        self,
81    ) -> ::std::result::Result<
82        crate::operation::describe_services::DescribeServicesOutput,
83        ::aws_smithy_runtime_api::client::result::SdkError<
84            crate::operation::describe_services::DescribeServicesError,
85            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
86        >,
87    > {
88        let input = self
89            .inner
90            .build()
91            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
92        let runtime_plugins = crate::operation::describe_services::DescribeServices::operation_runtime_plugins(
93            self.handle.runtime_plugins.clone(),
94            &self.handle.conf,
95            self.config_override,
96        );
97        crate::operation::describe_services::DescribeServices::orchestrate(&runtime_plugins, input).await
98    }
99
100    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
101    pub fn customize(
102        self,
103    ) -> crate::client::customize::CustomizableOperation<
104        crate::operation::describe_services::DescribeServicesOutput,
105        crate::operation::describe_services::DescribeServicesError,
106        Self,
107    > {
108        crate::client::customize::CustomizableOperation::new(self)
109    }
110    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
111        self.set_config_override(::std::option::Option::Some(config_override.into()));
112        self
113    }
114
115    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
116        self.config_override = config_override;
117        self
118    }
119    ///
120    /// Appends an item to `serviceCodeList`.
121    ///
122    /// To override the contents of this collection use [`set_service_code_list`](Self::set_service_code_list).
123    ///
124    /// <p>A JSON-formatted list of service codes available for Amazon Web Services services.</p>
125    pub fn service_code_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
126        self.inner = self.inner.service_code_list(input.into());
127        self
128    }
129    /// <p>A JSON-formatted list of service codes available for Amazon Web Services services.</p>
130    pub fn set_service_code_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
131        self.inner = self.inner.set_service_code_list(input);
132        self
133    }
134    /// <p>A JSON-formatted list of service codes available for Amazon Web Services services.</p>
135    pub fn get_service_code_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
136        self.inner.get_service_code_list()
137    }
138    /// <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>
139    pub fn language(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
140        self.inner = self.inner.language(input.into());
141        self
142    }
143    /// <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>
144    pub fn set_language(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
145        self.inner = self.inner.set_language(input);
146        self
147    }
148    /// <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>
149    pub fn get_language(&self) -> &::std::option::Option<::std::string::String> {
150        self.inner.get_language()
151    }
152}