aws_sdk_geomaps/operation/get_static_map/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_static_map::_get_static_map_output::GetStaticMapOutputBuilder;
3
4pub use crate::operation::get_static_map::_get_static_map_input::GetStaticMapInputBuilder;
5
6impl crate::operation::get_static_map::builders::GetStaticMapInputBuilder {
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_static_map::GetStaticMapOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::get_static_map::GetStaticMapError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.get_static_map();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `GetStaticMap`.
24///
25/// <p>Provides high-quality static map images with customizable options. You can modify the map's appearance and overlay additional information. It's an ideal solution for applications requiring tailored static map snapshots.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct GetStaticMapFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::get_static_map::builders::GetStaticMapInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::get_static_map::GetStaticMapOutput,
35 crate::operation::get_static_map::GetStaticMapError,
36 > for GetStaticMapFluentBuilder
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_static_map::GetStaticMapOutput,
44 crate::operation::get_static_map::GetStaticMapError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl GetStaticMapFluentBuilder {
51 /// Creates a new `GetStaticMapFluentBuilder`.
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 GetStaticMap as a reference.
60 pub fn as_input(&self) -> &crate::operation::get_static_map::builders::GetStaticMapInputBuilder {
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_static_map::GetStaticMapOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::get_static_map::GetStaticMapError,
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_static_map::GetStaticMap::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::get_static_map::GetStaticMap::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_static_map::GetStaticMapOutput,
97 crate::operation::get_static_map::GetStaticMapError,
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>Takes in two pairs of coordinates, \[Lon, Lat\], denoting south-westerly and north-easterly edges of the image. The underlying area becomes the view of the image.</p>
112 /// <p>Example: -123.17075,49.26959,-123.08125,49.31429</p>
113 pub fn bounding_box(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114 self.inner = self.inner.bounding_box(input.into());
115 self
116 }
117 /// <p>Takes in two pairs of coordinates, \[Lon, Lat\], denoting south-westerly and north-easterly edges of the image. The underlying area becomes the view of the image.</p>
118 /// <p>Example: -123.17075,49.26959,-123.08125,49.31429</p>
119 pub fn set_bounding_box(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120 self.inner = self.inner.set_bounding_box(input);
121 self
122 }
123 /// <p>Takes in two pairs of coordinates, \[Lon, Lat\], denoting south-westerly and north-easterly edges of the image. The underlying area becomes the view of the image.</p>
124 /// <p>Example: -123.17075,49.26959,-123.08125,49.31429</p>
125 pub fn get_bounding_box(&self) -> &::std::option::Option<::std::string::String> {
126 self.inner.get_bounding_box()
127 }
128 /// <p>Takes in two or more pair of coordinates, \[Lon, Lat\], with each coordinate separated by a comma. The API will generate an image to encompass all of the provided coordinates.</p><note>
129 /// <p>Cannot be used with <code>Zoom</code> and or <code>Radius</code></p>
130 /// </note>
131 /// <p>Example: 97.170451,78.039098,99.045536,27.176178</p>
132 pub fn bounded_positions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
133 self.inner = self.inner.bounded_positions(input.into());
134 self
135 }
136 /// <p>Takes in two or more pair of coordinates, \[Lon, Lat\], with each coordinate separated by a comma. The API will generate an image to encompass all of the provided coordinates.</p><note>
137 /// <p>Cannot be used with <code>Zoom</code> and or <code>Radius</code></p>
138 /// </note>
139 /// <p>Example: 97.170451,78.039098,99.045536,27.176178</p>
140 pub fn set_bounded_positions(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141 self.inner = self.inner.set_bounded_positions(input);
142 self
143 }
144 /// <p>Takes in two or more pair of coordinates, \[Lon, Lat\], with each coordinate separated by a comma. The API will generate an image to encompass all of the provided coordinates.</p><note>
145 /// <p>Cannot be used with <code>Zoom</code> and or <code>Radius</code></p>
146 /// </note>
147 /// <p>Example: 97.170451,78.039098,99.045536,27.176178</p>
148 pub fn get_bounded_positions(&self) -> &::std::option::Option<::std::string::String> {
149 self.inner.get_bounded_positions()
150 }
151 /// <p>Takes in a pair of coordinates, \[Lon, Lat\], which becomes the center point of the image. This parameter requires that either zoom or radius is set.</p><note>
152 /// <p>Cannot be used with <code>Zoom</code> and or <code>Radius</code></p>
153 /// </note>
154 /// <p>Example: 49.295,-123.108</p>
155 pub fn center(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
156 self.inner = self.inner.center(input.into());
157 self
158 }
159 /// <p>Takes in a pair of coordinates, \[Lon, Lat\], which becomes the center point of the image. This parameter requires that either zoom or radius is set.</p><note>
160 /// <p>Cannot be used with <code>Zoom</code> and or <code>Radius</code></p>
161 /// </note>
162 /// <p>Example: 49.295,-123.108</p>
163 pub fn set_center(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
164 self.inner = self.inner.set_center(input);
165 self
166 }
167 /// <p>Takes in a pair of coordinates, \[Lon, Lat\], which becomes the center point of the image. This parameter requires that either zoom or radius is set.</p><note>
168 /// <p>Cannot be used with <code>Zoom</code> and or <code>Radius</code></p>
169 /// </note>
170 /// <p>Example: 49.295,-123.108</p>
171 pub fn get_center(&self) -> &::std::option::Option<::std::string::String> {
172 self.inner.get_center()
173 }
174 /// <p>Takes in a string to draw geometries on the image. The input is a comma separated format as follows format: <code>\[Lon, Lat\]</code></p>
175 /// <p>Example: <code>line:-122.407653,37.798557,-122.413291,37.802443;color=%23DD0000;width=7;outline-color=#00DD00;outline-width=5yd|point:-122.40572,37.80004;label=Fog Hill Market;size=large;text-color=%23DD0000;color=#EE4B2B</code></p><note>
176 /// <p>Currently it supports the following geometry types: point, line and polygon. It does not support multiPoint , multiLine and multiPolgyon.</p>
177 /// </note>
178 pub fn compact_overlay(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
179 self.inner = self.inner.compact_overlay(input.into());
180 self
181 }
182 /// <p>Takes in a string to draw geometries on the image. The input is a comma separated format as follows format: <code>\[Lon, Lat\]</code></p>
183 /// <p>Example: <code>line:-122.407653,37.798557,-122.413291,37.802443;color=%23DD0000;width=7;outline-color=#00DD00;outline-width=5yd|point:-122.40572,37.80004;label=Fog Hill Market;size=large;text-color=%23DD0000;color=#EE4B2B</code></p><note>
184 /// <p>Currently it supports the following geometry types: point, line and polygon. It does not support multiPoint , multiLine and multiPolgyon.</p>
185 /// </note>
186 pub fn set_compact_overlay(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
187 self.inner = self.inner.set_compact_overlay(input);
188 self
189 }
190 /// <p>Takes in a string to draw geometries on the image. The input is a comma separated format as follows format: <code>\[Lon, Lat\]</code></p>
191 /// <p>Example: <code>line:-122.407653,37.798557,-122.413291,37.802443;color=%23DD0000;width=7;outline-color=#00DD00;outline-width=5yd|point:-122.40572,37.80004;label=Fog Hill Market;size=large;text-color=%23DD0000;color=#EE4B2B</code></p><note>
192 /// <p>Currently it supports the following geometry types: point, line and polygon. It does not support multiPoint , multiLine and multiPolgyon.</p>
193 /// </note>
194 pub fn get_compact_overlay(&self) -> &::std::option::Option<::std::string::String> {
195 self.inner.get_compact_overlay()
196 }
197 /// <p>Takes in a string to draw geometries on the image. The input is a valid GeoJSON collection object.</p>
198 /// <p>Example: <code>{"type":"FeatureCollection","features": \[{"type":"Feature","geometry":{"type":"MultiPoint","coordinates": \[\[-90.076345,51.504107\],\[-0.074451,51.506892\]\]},"properties": {"color":"#00DD00"}}\]}</code></p>
199 pub fn geo_json_overlay(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
200 self.inner = self.inner.geo_json_overlay(input.into());
201 self
202 }
203 /// <p>Takes in a string to draw geometries on the image. The input is a valid GeoJSON collection object.</p>
204 /// <p>Example: <code>{"type":"FeatureCollection","features": \[{"type":"Feature","geometry":{"type":"MultiPoint","coordinates": \[\[-90.076345,51.504107\],\[-0.074451,51.506892\]\]},"properties": {"color":"#00DD00"}}\]}</code></p>
205 pub fn set_geo_json_overlay(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
206 self.inner = self.inner.set_geo_json_overlay(input);
207 self
208 }
209 /// <p>Takes in a string to draw geometries on the image. The input is a valid GeoJSON collection object.</p>
210 /// <p>Example: <code>{"type":"FeatureCollection","features": \[{"type":"Feature","geometry":{"type":"MultiPoint","coordinates": \[\[-90.076345,51.504107\],\[-0.074451,51.506892\]\]},"properties": {"color":"#00DD00"}}\]}</code></p>
211 pub fn get_geo_json_overlay(&self) -> &::std::option::Option<::std::string::String> {
212 self.inner.get_geo_json_overlay()
213 }
214 /// <p>Specifies the height of the map image.</p>
215 pub fn height(mut self, input: i32) -> Self {
216 self.inner = self.inner.height(input);
217 self
218 }
219 /// <p>Specifies the height of the map image.</p>
220 pub fn set_height(mut self, input: ::std::option::Option<i32>) -> Self {
221 self.inner = self.inner.set_height(input);
222 self
223 }
224 /// <p>Specifies the height of the map image.</p>
225 pub fn get_height(&self) -> &::std::option::Option<i32> {
226 self.inner.get_height()
227 }
228 /// <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>
229 pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
230 self.inner = self.inner.key(input.into());
231 self
232 }
233 /// <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>
234 pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
235 self.inner = self.inner.set_key(input);
236 self
237 }
238 /// <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>
239 pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
240 self.inner.get_key()
241 }
242 /// <p>Applies additional space (in pixels) around overlay feature to prevent them from being cut or obscured.</p><note>
243 /// <p>Value for max and min is determined by:</p>
244 /// <p>Min: <code>1</code></p>
245 /// <p>Max: <code>min(height, width)/4</code></p>
246 /// </note>
247 /// <p>Example: <code>100</code></p>
248 pub fn padding(mut self, input: i32) -> Self {
249 self.inner = self.inner.padding(input);
250 self
251 }
252 /// <p>Applies additional space (in pixels) around overlay feature to prevent them from being cut or obscured.</p><note>
253 /// <p>Value for max and min is determined by:</p>
254 /// <p>Min: <code>1</code></p>
255 /// <p>Max: <code>min(height, width)/4</code></p>
256 /// </note>
257 /// <p>Example: <code>100</code></p>
258 pub fn set_padding(mut self, input: ::std::option::Option<i32>) -> Self {
259 self.inner = self.inner.set_padding(input);
260 self
261 }
262 /// <p>Applies additional space (in pixels) around overlay feature to prevent them from being cut or obscured.</p><note>
263 /// <p>Value for max and min is determined by:</p>
264 /// <p>Min: <code>1</code></p>
265 /// <p>Max: <code>min(height, width)/4</code></p>
266 /// </note>
267 /// <p>Example: <code>100</code></p>
268 pub fn get_padding(&self) -> &::std::option::Option<i32> {
269 self.inner.get_padding()
270 }
271 /// <p>Used with center parameter, it specifies the zoom of the image where you can control it on a granular level. Takes in any value <code>>= 1</code>.</p>
272 /// <p>Example: <code>1500</code></p><note>
273 /// <p>Cannot be used with <code>Zoom</code>.</p>
274 /// </note>
275 /// <p><b>Unit</b>: <code>Meters</code></p>
276 /// <p></p>
277 pub fn radius(mut self, input: i64) -> Self {
278 self.inner = self.inner.radius(input);
279 self
280 }
281 /// <p>Used with center parameter, it specifies the zoom of the image where you can control it on a granular level. Takes in any value <code>>= 1</code>.</p>
282 /// <p>Example: <code>1500</code></p><note>
283 /// <p>Cannot be used with <code>Zoom</code>.</p>
284 /// </note>
285 /// <p><b>Unit</b>: <code>Meters</code></p>
286 /// <p></p>
287 pub fn set_radius(mut self, input: ::std::option::Option<i64>) -> Self {
288 self.inner = self.inner.set_radius(input);
289 self
290 }
291 /// <p>Used with center parameter, it specifies the zoom of the image where you can control it on a granular level. Takes in any value <code>>= 1</code>.</p>
292 /// <p>Example: <code>1500</code></p><note>
293 /// <p>Cannot be used with <code>Zoom</code>.</p>
294 /// </note>
295 /// <p><b>Unit</b>: <code>Meters</code></p>
296 /// <p></p>
297 pub fn get_radius(&self) -> &::std::option::Option<i64> {
298 self.inner.get_radius()
299 }
300 /// <p>The map scaling parameter to size the image, icons, and labels. It follows the pattern of <code>^map(@2x)?$</code>.</p>
301 /// <p>Example: <code>map, map@2x</code></p>
302 pub fn file_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
303 self.inner = self.inner.file_name(input.into());
304 self
305 }
306 /// <p>The map scaling parameter to size the image, icons, and labels. It follows the pattern of <code>^map(@2x)?$</code>.</p>
307 /// <p>Example: <code>map, map@2x</code></p>
308 pub fn set_file_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
309 self.inner = self.inner.set_file_name(input);
310 self
311 }
312 /// <p>The map scaling parameter to size the image, icons, and labels. It follows the pattern of <code>^map(@2x)?$</code>.</p>
313 /// <p>Example: <code>map, map@2x</code></p>
314 pub fn get_file_name(&self) -> &::std::option::Option<::std::string::String> {
315 self.inner.get_file_name()
316 }
317 /// <p>Displays a scale on the bottom right of the map image with the unit specified in the input.</p>
318 /// <p>Example: <code>KilometersMiles, Miles, Kilometers, MilesKilometers</code></p>
319 pub fn scale_bar_unit(mut self, input: crate::types::ScaleBarUnit) -> Self {
320 self.inner = self.inner.scale_bar_unit(input);
321 self
322 }
323 /// <p>Displays a scale on the bottom right of the map image with the unit specified in the input.</p>
324 /// <p>Example: <code>KilometersMiles, Miles, Kilometers, MilesKilometers</code></p>
325 pub fn set_scale_bar_unit(mut self, input: ::std::option::Option<crate::types::ScaleBarUnit>) -> Self {
326 self.inner = self.inner.set_scale_bar_unit(input);
327 self
328 }
329 /// <p>Displays a scale on the bottom right of the map image with the unit specified in the input.</p>
330 /// <p>Example: <code>KilometersMiles, Miles, Kilometers, MilesKilometers</code></p>
331 pub fn get_scale_bar_unit(&self) -> &::std::option::Option<crate::types::ScaleBarUnit> {
332 self.inner.get_scale_bar_unit()
333 }
334 /// <p>Style specifies the desired map style for the <code>Style</code> APIs.</p>
335 pub fn style(mut self, input: crate::types::StaticMapStyle) -> Self {
336 self.inner = self.inner.style(input);
337 self
338 }
339 /// <p>Style specifies the desired map style for the <code>Style</code> APIs.</p>
340 pub fn set_style(mut self, input: ::std::option::Option<crate::types::StaticMapStyle>) -> Self {
341 self.inner = self.inner.set_style(input);
342 self
343 }
344 /// <p>Style specifies the desired map style for the <code>Style</code> APIs.</p>
345 pub fn get_style(&self) -> &::std::option::Option<crate::types::StaticMapStyle> {
346 self.inner.get_style()
347 }
348 /// <p>Specifies the width of the map image.</p>
349 pub fn width(mut self, input: i32) -> Self {
350 self.inner = self.inner.width(input);
351 self
352 }
353 /// <p>Specifies the width of the map image.</p>
354 pub fn set_width(mut self, input: ::std::option::Option<i32>) -> Self {
355 self.inner = self.inner.set_width(input);
356 self
357 }
358 /// <p>Specifies the width of the map image.</p>
359 pub fn get_width(&self) -> &::std::option::Option<i32> {
360 self.inner.get_width()
361 }
362 /// <p>Specifies the zoom level of the map image.</p><note>
363 /// <p>Cannot be used with <code>Radius</code>.</p>
364 /// </note>
365 pub fn zoom(mut self, input: f32) -> Self {
366 self.inner = self.inner.zoom(input);
367 self
368 }
369 /// <p>Specifies the zoom level of the map image.</p><note>
370 /// <p>Cannot be used with <code>Radius</code>.</p>
371 /// </note>
372 pub fn set_zoom(mut self, input: ::std::option::Option<f32>) -> Self {
373 self.inner = self.inner.set_zoom(input);
374 self
375 }
376 /// <p>Specifies the zoom level of the map image.</p><note>
377 /// <p>Cannot be used with <code>Radius</code>.</p>
378 /// </note>
379 pub fn get_zoom(&self) -> &::std::option::Option<f32> {
380 self.inner.get_zoom()
381 }
382}