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/// <p>For more information, see <a href="https://docs.aws.amazon.com/location/latest/developerguide/styling-dynamic-maps.html">Style dynamic maps</a> in the <i>Amazon Location Service Developer Guide</i>.</p>
27#[derive(::std::clone::Clone, ::std::fmt::Debug)]
28pub struct GetStyleDescriptorFluentBuilder {
29 handle: ::std::sync::Arc<crate::client::Handle>,
30 inner: crate::operation::get_style_descriptor::builders::GetStyleDescriptorInputBuilder,
31 config_override: ::std::option::Option<crate::config::Builder>,
32}
33impl
34 crate::client::customize::internal::CustomizableSend<
35 crate::operation::get_style_descriptor::GetStyleDescriptorOutput,
36 crate::operation::get_style_descriptor::GetStyleDescriptorError,
37 > for GetStyleDescriptorFluentBuilder
38{
39 fn send(
40 self,
41 config_override: crate::config::Builder,
42 ) -> crate::client::customize::internal::BoxFuture<
43 crate::client::customize::internal::SendResult<
44 crate::operation::get_style_descriptor::GetStyleDescriptorOutput,
45 crate::operation::get_style_descriptor::GetStyleDescriptorError,
46 >,
47 > {
48 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
49 }
50}
51impl GetStyleDescriptorFluentBuilder {
52 /// Creates a new `GetStyleDescriptorFluentBuilder`.
53 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
54 Self {
55 handle,
56 inner: ::std::default::Default::default(),
57 config_override: ::std::option::Option::None,
58 }
59 }
60 /// Access the GetStyleDescriptor as a reference.
61 pub fn as_input(&self) -> &crate::operation::get_style_descriptor::builders::GetStyleDescriptorInputBuilder {
62 &self.inner
63 }
64 /// Sends the request and returns the response.
65 ///
66 /// If an error occurs, an `SdkError` will be returned with additional details that
67 /// can be matched against.
68 ///
69 /// By default, any retryable failures will be retried twice. Retry behavior
70 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
71 /// set when configuring the client.
72 pub async fn send(
73 self,
74 ) -> ::std::result::Result<
75 crate::operation::get_style_descriptor::GetStyleDescriptorOutput,
76 ::aws_smithy_runtime_api::client::result::SdkError<
77 crate::operation::get_style_descriptor::GetStyleDescriptorError,
78 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
79 >,
80 > {
81 let input = self
82 .inner
83 .build()
84 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
85 let runtime_plugins = crate::operation::get_style_descriptor::GetStyleDescriptor::operation_runtime_plugins(
86 self.handle.runtime_plugins.clone(),
87 &self.handle.conf,
88 self.config_override,
89 );
90 crate::operation::get_style_descriptor::GetStyleDescriptor::orchestrate(&runtime_plugins, input).await
91 }
92
93 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
94 pub fn customize(
95 self,
96 ) -> crate::client::customize::CustomizableOperation<
97 crate::operation::get_style_descriptor::GetStyleDescriptorOutput,
98 crate::operation::get_style_descriptor::GetStyleDescriptorError,
99 Self,
100 > {
101 crate::client::customize::CustomizableOperation::new(self)
102 }
103 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
104 self.set_config_override(::std::option::Option::Some(config_override.into()));
105 self
106 }
107
108 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
109 self.config_override = config_override;
110 self
111 }
112 /// <p>Style specifies the desired map style.</p>
113 pub fn style(mut self, input: crate::types::MapStyle) -> Self {
114 self.inner = self.inner.style(input);
115 self
116 }
117 /// <p>Style specifies the desired map style.</p>
118 pub fn set_style(mut self, input: ::std::option::Option<crate::types::MapStyle>) -> Self {
119 self.inner = self.inner.set_style(input);
120 self
121 }
122 /// <p>Style specifies the desired map style.</p>
123 pub fn get_style(&self) -> &::std::option::Option<crate::types::MapStyle> {
124 self.inner.get_style()
125 }
126 /// <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>
127 /// <p>Example: <code>Light</code></p>
128 /// <p>Default value: <code>Light</code></p><note>
129 /// <p>Valid values for ColorScheme are case sensitive.</p>
130 /// </note>
131 pub fn color_scheme(mut self, input: crate::types::ColorScheme) -> Self {
132 self.inner = self.inner.color_scheme(input);
133 self
134 }
135 /// <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>
136 /// <p>Example: <code>Light</code></p>
137 /// <p>Default value: <code>Light</code></p><note>
138 /// <p>Valid values for ColorScheme are case sensitive.</p>
139 /// </note>
140 pub fn set_color_scheme(mut self, input: ::std::option::Option<crate::types::ColorScheme>) -> Self {
141 self.inner = self.inner.set_color_scheme(input);
142 self
143 }
144 /// <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>
145 /// <p>Example: <code>Light</code></p>
146 /// <p>Default value: <code>Light</code></p><note>
147 /// <p>Valid values for ColorScheme are case sensitive.</p>
148 /// </note>
149 pub fn get_color_scheme(&self) -> &::std::option::Option<crate::types::ColorScheme> {
150 self.inner.get_color_scheme()
151 }
152 /// <p>Specifies the political view using ISO 3166-2 or ISO 3166-3 country code format.</p>
153 /// <p>The following political views are currently supported:</p>
154 /// <ul>
155 /// <li>
156 /// <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>
157 /// <li>
158 /// <p><code>EGY</code>: Egypt's view on Bir Tawil</p></li>
159 /// <li>
160 /// <p><code>IND</code>: India's view on Gilgit-Baltistan</p></li>
161 /// <li>
162 /// <p><code>KEN</code>: Kenya's view on the Ilemi Triangle</p></li>
163 /// <li>
164 /// <p><code>MAR</code>: Morocco's view on Western Sahara</p></li>
165 /// <li>
166 /// <p><code>RUS</code>: Russia's view on Crimea</p></li>
167 /// <li>
168 /// <p><code>SDN</code>: Sudan's view on the Halaib Triangle</p></li>
169 /// <li>
170 /// <p><code>SRB</code>: Serbia's view on Kosovo, Vukovar, and Sarengrad Islands</p></li>
171 /// <li>
172 /// <p><code>SUR</code>: Suriname's view on the Courantyne Headwaters and Lawa Headwaters</p></li>
173 /// <li>
174 /// <p><code>SYR</code>: Syria's view on the Golan Heights</p></li>
175 /// <li>
176 /// <p><code>TUR</code>: Turkey's view on Cyprus and Northern Cyprus</p></li>
177 /// <li>
178 /// <p><code>TZA</code>: Tanzania's view on Lake Malawi</p></li>
179 /// <li>
180 /// <p><code>URY</code>: Uruguay's view on Rincon de Artigas</p></li>
181 /// <li>
182 /// <p><code>VNM</code>: Vietnam's view on the Paracel Islands and Spratly Islands</p></li>
183 /// </ul>
184 pub fn political_view(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
185 self.inner = self.inner.political_view(input.into());
186 self
187 }
188 /// <p>Specifies the political view using ISO 3166-2 or ISO 3166-3 country code format.</p>
189 /// <p>The following political views are currently supported:</p>
190 /// <ul>
191 /// <li>
192 /// <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>
193 /// <li>
194 /// <p><code>EGY</code>: Egypt's view on Bir Tawil</p></li>
195 /// <li>
196 /// <p><code>IND</code>: India's view on Gilgit-Baltistan</p></li>
197 /// <li>
198 /// <p><code>KEN</code>: Kenya's view on the Ilemi Triangle</p></li>
199 /// <li>
200 /// <p><code>MAR</code>: Morocco's view on Western Sahara</p></li>
201 /// <li>
202 /// <p><code>RUS</code>: Russia's view on Crimea</p></li>
203 /// <li>
204 /// <p><code>SDN</code>: Sudan's view on the Halaib Triangle</p></li>
205 /// <li>
206 /// <p><code>SRB</code>: Serbia's view on Kosovo, Vukovar, and Sarengrad Islands</p></li>
207 /// <li>
208 /// <p><code>SUR</code>: Suriname's view on the Courantyne Headwaters and Lawa Headwaters</p></li>
209 /// <li>
210 /// <p><code>SYR</code>: Syria's view on the Golan Heights</p></li>
211 /// <li>
212 /// <p><code>TUR</code>: Turkey's view on Cyprus and Northern Cyprus</p></li>
213 /// <li>
214 /// <p><code>TZA</code>: Tanzania's view on Lake Malawi</p></li>
215 /// <li>
216 /// <p><code>URY</code>: Uruguay's view on Rincon de Artigas</p></li>
217 /// <li>
218 /// <p><code>VNM</code>: Vietnam's view on the Paracel Islands and Spratly Islands</p></li>
219 /// </ul>
220 pub fn set_political_view(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
221 self.inner = self.inner.set_political_view(input);
222 self
223 }
224 /// <p>Specifies the political view using ISO 3166-2 or ISO 3166-3 country code format.</p>
225 /// <p>The following political views are currently supported:</p>
226 /// <ul>
227 /// <li>
228 /// <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>
229 /// <li>
230 /// <p><code>EGY</code>: Egypt's view on Bir Tawil</p></li>
231 /// <li>
232 /// <p><code>IND</code>: India's view on Gilgit-Baltistan</p></li>
233 /// <li>
234 /// <p><code>KEN</code>: Kenya's view on the Ilemi Triangle</p></li>
235 /// <li>
236 /// <p><code>MAR</code>: Morocco's view on Western Sahara</p></li>
237 /// <li>
238 /// <p><code>RUS</code>: Russia's view on Crimea</p></li>
239 /// <li>
240 /// <p><code>SDN</code>: Sudan's view on the Halaib Triangle</p></li>
241 /// <li>
242 /// <p><code>SRB</code>: Serbia's view on Kosovo, Vukovar, and Sarengrad Islands</p></li>
243 /// <li>
244 /// <p><code>SUR</code>: Suriname's view on the Courantyne Headwaters and Lawa Headwaters</p></li>
245 /// <li>
246 /// <p><code>SYR</code>: Syria's view on the Golan Heights</p></li>
247 /// <li>
248 /// <p><code>TUR</code>: Turkey's view on Cyprus and Northern Cyprus</p></li>
249 /// <li>
250 /// <p><code>TZA</code>: Tanzania's view on Lake Malawi</p></li>
251 /// <li>
252 /// <p><code>URY</code>: Uruguay's view on Rincon de Artigas</p></li>
253 /// <li>
254 /// <p><code>VNM</code>: Vietnam's view on the Paracel Islands and Spratly Islands</p></li>
255 /// </ul>
256 pub fn get_political_view(&self) -> &::std::option::Option<::std::string::String> {
257 self.inner.get_political_view()
258 }
259 /// <p>Adjusts how physical terrain details are rendered on the map.</p>
260 /// <p>The following terrain styles are currently supported:</p>
261 /// <ul>
262 /// <li>
263 /// <p><code>Hillshade</code>: Displays the physical terrain details through shading and highlighting of elevation change and geographic features.</p></li>
264 /// </ul>
265 /// <p>This parameter is valid only for the <code>Standard</code> map style.</p>
266 pub fn terrain(mut self, input: crate::types::Terrain) -> Self {
267 self.inner = self.inner.terrain(input);
268 self
269 }
270 /// <p>Adjusts how physical terrain details are rendered on the map.</p>
271 /// <p>The following terrain styles are currently supported:</p>
272 /// <ul>
273 /// <li>
274 /// <p><code>Hillshade</code>: Displays the physical terrain details through shading and highlighting of elevation change and geographic features.</p></li>
275 /// </ul>
276 /// <p>This parameter is valid only for the <code>Standard</code> map style.</p>
277 pub fn set_terrain(mut self, input: ::std::option::Option<crate::types::Terrain>) -> Self {
278 self.inner = self.inner.set_terrain(input);
279 self
280 }
281 /// <p>Adjusts how physical terrain details are rendered on the map.</p>
282 /// <p>The following terrain styles are currently supported:</p>
283 /// <ul>
284 /// <li>
285 /// <p><code>Hillshade</code>: Displays the physical terrain details through shading and highlighting of elevation change and geographic features.</p></li>
286 /// </ul>
287 /// <p>This parameter is valid only for the <code>Standard</code> map style.</p>
288 pub fn get_terrain(&self) -> &::std::option::Option<crate::types::Terrain> {
289 self.inner.get_terrain()
290 }
291 /// <p>Displays the shape and steepness of terrain features using elevation lines. The density value controls how densely the available contour line information is rendered on the map.</p>
292 /// <p>This parameter is valid only for the <code>Standard</code> map style.</p>
293 pub fn contour_density(mut self, input: crate::types::ContourDensity) -> Self {
294 self.inner = self.inner.contour_density(input);
295 self
296 }
297 /// <p>Displays the shape and steepness of terrain features using elevation lines. The density value controls how densely the available contour line information is rendered on the map.</p>
298 /// <p>This parameter is valid only for the <code>Standard</code> map style.</p>
299 pub fn set_contour_density(mut self, input: ::std::option::Option<crate::types::ContourDensity>) -> Self {
300 self.inner = self.inner.set_contour_density(input);
301 self
302 }
303 /// <p>Displays the shape and steepness of terrain features using elevation lines. The density value controls how densely the available contour line information is rendered on the map.</p>
304 /// <p>This parameter is valid only for the <code>Standard</code> map style.</p>
305 pub fn get_contour_density(&self) -> &::std::option::Option<crate::types::ContourDensity> {
306 self.inner.get_contour_density()
307 }
308 /// <p>Displays real-time traffic information overlay on map, such as incident events and flow events.</p>
309 /// <p>This parameter is valid only for the <code>Standard</code> map style.</p>
310 pub fn traffic(mut self, input: crate::types::Traffic) -> Self {
311 self.inner = self.inner.traffic(input);
312 self
313 }
314 /// <p>Displays real-time traffic information overlay on map, such as incident events and flow events.</p>
315 /// <p>This parameter is valid only for the <code>Standard</code> map style.</p>
316 pub fn set_traffic(mut self, input: ::std::option::Option<crate::types::Traffic>) -> Self {
317 self.inner = self.inner.set_traffic(input);
318 self
319 }
320 /// <p>Displays real-time traffic information overlay on map, such as incident events and flow events.</p>
321 /// <p>This parameter is valid only for the <code>Standard</code> map style.</p>
322 pub fn get_traffic(&self) -> &::std::option::Option<crate::types::Traffic> {
323 self.inner.get_traffic()
324 }
325 ///
326 /// Appends an item to `TravelModes`.
327 ///
328 /// To override the contents of this collection use [`set_travel_modes`](Self::set_travel_modes).
329 ///
330 /// <p>Renders additional map information relevant to selected travel modes. Information for multiple travel modes can be displayed simultaneously, although this increases the overall information density rendered on the map.</p>
331 /// <p>This parameter is valid only for the <code>Standard</code> map style.</p>
332 pub fn travel_modes(mut self, input: crate::types::TravelMode) -> Self {
333 self.inner = self.inner.travel_modes(input);
334 self
335 }
336 /// <p>Renders additional map information relevant to selected travel modes. Information for multiple travel modes can be displayed simultaneously, although this increases the overall information density rendered on the map.</p>
337 /// <p>This parameter is valid only for the <code>Standard</code> map style.</p>
338 pub fn set_travel_modes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TravelMode>>) -> Self {
339 self.inner = self.inner.set_travel_modes(input);
340 self
341 }
342 /// <p>Renders additional map information relevant to selected travel modes. Information for multiple travel modes can be displayed simultaneously, although this increases the overall information density rendered on the map.</p>
343 /// <p>This parameter is valid only for the <code>Standard</code> map style.</p>
344 pub fn get_travel_modes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TravelMode>> {
345 self.inner.get_travel_modes()
346 }
347 /// <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>
348 pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
349 self.inner = self.inner.key(input.into());
350 self
351 }
352 /// <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>
353 pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
354 self.inner = self.inner.set_key(input);
355 self
356 }
357 /// <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>
358 pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
359 self.inner.get_key()
360 }
361}