aws_sdk_geomaps/operation/get_style_descriptor/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_style_descriptor::_get_style_descriptor_output::GetStyleDescriptorOutputBuilder;
3
4pub use crate::operation::get_style_descriptor::_get_style_descriptor_input::GetStyleDescriptorInputBuilder;
5
6impl crate::operation::get_style_descriptor::builders::GetStyleDescriptorInputBuilder {
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::get_style_descriptor::GetStyleDescriptorOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::get_style_descriptor::GetStyleDescriptorError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.get_style_descriptor();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `GetStyleDescriptor`.
24///
25/// <p><code>GetStyleDescriptor</code> returns information about the style.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct GetStyleDescriptorFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::get_style_descriptor::builders::GetStyleDescriptorInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::get_style_descriptor::GetStyleDescriptorOutput,
35        crate::operation::get_style_descriptor::GetStyleDescriptorError,
36    > for GetStyleDescriptorFluentBuilder
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::get_style_descriptor::GetStyleDescriptorOutput,
44            crate::operation::get_style_descriptor::GetStyleDescriptorError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl GetStyleDescriptorFluentBuilder {
51    /// Creates a new `GetStyleDescriptorFluentBuilder`.
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 GetStyleDescriptor as a reference.
60    pub fn as_input(&self) -> &crate::operation::get_style_descriptor::builders::GetStyleDescriptorInputBuilder {
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::get_style_descriptor::GetStyleDescriptorOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::get_style_descriptor::GetStyleDescriptorError,
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::get_style_descriptor::GetStyleDescriptor::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::get_style_descriptor::GetStyleDescriptor::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::get_style_descriptor::GetStyleDescriptorOutput,
97        crate::operation::get_style_descriptor::GetStyleDescriptorError,
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>Style specifies the desired map style.</p>
112    pub fn style(mut self, input: crate::types::MapStyle) -> Self {
113        self.inner = self.inner.style(input);
114        self
115    }
116    /// <p>Style specifies the desired map style.</p>
117    pub fn set_style(mut self, input: ::std::option::Option<crate::types::MapStyle>) -> Self {
118        self.inner = self.inner.set_style(input);
119        self
120    }
121    /// <p>Style specifies the desired map style.</p>
122    pub fn get_style(&self) -> &::std::option::Option<crate::types::MapStyle> {
123        self.inner.get_style()
124    }
125    /// <p>Sets color tone for map such as dark and light for specific map styles. It applies to only vector map styles such as Standard and Monochrome.</p>
126    /// <p>Example: <code>Light</code></p>
127    /// <p>Default value: <code>Light</code></p><note>
128    /// <p>Valid values for ColorScheme are case sensitive.</p>
129    /// </note>
130    pub fn color_scheme(mut self, input: crate::types::ColorScheme) -> Self {
131        self.inner = self.inner.color_scheme(input);
132        self
133    }
134    /// <p>Sets color tone for map such as dark and light for specific map styles. It applies to only vector map styles such as Standard and Monochrome.</p>
135    /// <p>Example: <code>Light</code></p>
136    /// <p>Default value: <code>Light</code></p><note>
137    /// <p>Valid values for ColorScheme are case sensitive.</p>
138    /// </note>
139    pub fn set_color_scheme(mut self, input: ::std::option::Option<crate::types::ColorScheme>) -> Self {
140        self.inner = self.inner.set_color_scheme(input);
141        self
142    }
143    /// <p>Sets color tone for map such as dark and light for specific map styles. It applies to only vector map styles such as Standard and Monochrome.</p>
144    /// <p>Example: <code>Light</code></p>
145    /// <p>Default value: <code>Light</code></p><note>
146    /// <p>Valid values for ColorScheme are case sensitive.</p>
147    /// </note>
148    pub fn get_color_scheme(&self) -> &::std::option::Option<crate::types::ColorScheme> {
149        self.inner.get_color_scheme()
150    }
151    /// <p>Specifies the political view using ISO 3166-2 or ISO 3166-3 country code format.</p>
152    /// <p>The following political views are currently supported:</p>
153    /// <ul>
154    /// <li>
155    /// <p><code>ARG</code>: Argentina's view on the Southern Patagonian Ice Field and Tierra Del Fuego, including the Falkland Islands, South Georgia, and South Sandwich Islands</p></li>
156    /// <li>
157    /// <p><code>EGY</code>: Egypt's view on Bir Tawil</p></li>
158    /// <li>
159    /// <p><code>IND</code>: India's view on Gilgit-Baltistan</p></li>
160    /// <li>
161    /// <p><code>KEN</code>: Kenya's view on the Ilemi Triangle</p></li>
162    /// <li>
163    /// <p><code>MAR</code>: Morocco's view on Western Sahara</p></li>
164    /// <li>
165    /// <p><code>RUS</code>: Russia's view on Crimea</p></li>
166    /// <li>
167    /// <p><code>SDN</code>: Sudan's view on the Halaib Triangle</p></li>
168    /// <li>
169    /// <p><code>SRB</code>: Serbia's view on Kosovo, Vukovar, and Sarengrad Islands</p></li>
170    /// <li>
171    /// <p><code>SUR</code>: Suriname's view on the Courantyne Headwaters and Lawa Headwaters</p></li>
172    /// <li>
173    /// <p><code>SYR</code>: Syria's view on the Golan Heights</p></li>
174    /// <li>
175    /// <p><code>TUR</code>: Turkey's view on Cyprus and Northern Cyprus</p></li>
176    /// <li>
177    /// <p><code>TZA</code>: Tanzania's view on Lake Malawi</p></li>
178    /// <li>
179    /// <p><code>URY</code>: Uruguay's view on Rincon de Artigas</p></li>
180    /// <li>
181    /// <p><code>VNM</code>: Vietnam's view on the Paracel Islands and Spratly Islands</p></li>
182    /// </ul>
183    pub fn political_view(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
184        self.inner = self.inner.political_view(input.into());
185        self
186    }
187    /// <p>Specifies the political view using ISO 3166-2 or ISO 3166-3 country code format.</p>
188    /// <p>The following political views are currently supported:</p>
189    /// <ul>
190    /// <li>
191    /// <p><code>ARG</code>: Argentina's view on the Southern Patagonian Ice Field and Tierra Del Fuego, including the Falkland Islands, South Georgia, and South Sandwich Islands</p></li>
192    /// <li>
193    /// <p><code>EGY</code>: Egypt's view on Bir Tawil</p></li>
194    /// <li>
195    /// <p><code>IND</code>: India's view on Gilgit-Baltistan</p></li>
196    /// <li>
197    /// <p><code>KEN</code>: Kenya's view on the Ilemi Triangle</p></li>
198    /// <li>
199    /// <p><code>MAR</code>: Morocco's view on Western Sahara</p></li>
200    /// <li>
201    /// <p><code>RUS</code>: Russia's view on Crimea</p></li>
202    /// <li>
203    /// <p><code>SDN</code>: Sudan's view on the Halaib Triangle</p></li>
204    /// <li>
205    /// <p><code>SRB</code>: Serbia's view on Kosovo, Vukovar, and Sarengrad Islands</p></li>
206    /// <li>
207    /// <p><code>SUR</code>: Suriname's view on the Courantyne Headwaters and Lawa Headwaters</p></li>
208    /// <li>
209    /// <p><code>SYR</code>: Syria's view on the Golan Heights</p></li>
210    /// <li>
211    /// <p><code>TUR</code>: Turkey's view on Cyprus and Northern Cyprus</p></li>
212    /// <li>
213    /// <p><code>TZA</code>: Tanzania's view on Lake Malawi</p></li>
214    /// <li>
215    /// <p><code>URY</code>: Uruguay's view on Rincon de Artigas</p></li>
216    /// <li>
217    /// <p><code>VNM</code>: Vietnam's view on the Paracel Islands and Spratly Islands</p></li>
218    /// </ul>
219    pub fn set_political_view(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
220        self.inner = self.inner.set_political_view(input);
221        self
222    }
223    /// <p>Specifies the political view using ISO 3166-2 or ISO 3166-3 country code format.</p>
224    /// <p>The following political views are currently supported:</p>
225    /// <ul>
226    /// <li>
227    /// <p><code>ARG</code>: Argentina's view on the Southern Patagonian Ice Field and Tierra Del Fuego, including the Falkland Islands, South Georgia, and South Sandwich Islands</p></li>
228    /// <li>
229    /// <p><code>EGY</code>: Egypt's view on Bir Tawil</p></li>
230    /// <li>
231    /// <p><code>IND</code>: India's view on Gilgit-Baltistan</p></li>
232    /// <li>
233    /// <p><code>KEN</code>: Kenya's view on the Ilemi Triangle</p></li>
234    /// <li>
235    /// <p><code>MAR</code>: Morocco's view on Western Sahara</p></li>
236    /// <li>
237    /// <p><code>RUS</code>: Russia's view on Crimea</p></li>
238    /// <li>
239    /// <p><code>SDN</code>: Sudan's view on the Halaib Triangle</p></li>
240    /// <li>
241    /// <p><code>SRB</code>: Serbia's view on Kosovo, Vukovar, and Sarengrad Islands</p></li>
242    /// <li>
243    /// <p><code>SUR</code>: Suriname's view on the Courantyne Headwaters and Lawa Headwaters</p></li>
244    /// <li>
245    /// <p><code>SYR</code>: Syria's view on the Golan Heights</p></li>
246    /// <li>
247    /// <p><code>TUR</code>: Turkey's view on Cyprus and Northern Cyprus</p></li>
248    /// <li>
249    /// <p><code>TZA</code>: Tanzania's view on Lake Malawi</p></li>
250    /// <li>
251    /// <p><code>URY</code>: Uruguay's view on Rincon de Artigas</p></li>
252    /// <li>
253    /// <p><code>VNM</code>: Vietnam's view on the Paracel Islands and Spratly Islands</p></li>
254    /// </ul>
255    pub fn get_political_view(&self) -> &::std::option::Option<::std::string::String> {
256        self.inner.get_political_view()
257    }
258    /// <p>Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.</p>
259    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
260        self.inner = self.inner.key(input.into());
261        self
262    }
263    /// <p>Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.</p>
264    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
265        self.inner = self.inner.set_key(input);
266        self
267    }
268    /// <p>Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.</p>
269    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
270        self.inner.get_key()
271    }
272}