aws_sdk_geomaps/operation/get_tile/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_tile::_get_tile_output::GetTileOutputBuilder;
3
4pub use crate::operation::get_tile::_get_tile_input::GetTileInputBuilder;
5
6impl crate::operation::get_tile::builders::GetTileInputBuilder {
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_tile::GetTileOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::get_tile::GetTileError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.get_tile();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `GetTile`.
24///
25/// <p>Returns a tile. Map tiles are used by clients to render a map. they're addressed using a grid arrangement with an X coordinate, Y coordinate, and Z (zoom) level.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct GetTileFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::get_tile::builders::GetTileInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl crate::client::customize::internal::CustomizableSend<crate::operation::get_tile::GetTileOutput, crate::operation::get_tile::GetTileError>
33    for GetTileFluentBuilder
34{
35    fn send(
36        self,
37        config_override: crate::config::Builder,
38    ) -> crate::client::customize::internal::BoxFuture<
39        crate::client::customize::internal::SendResult<crate::operation::get_tile::GetTileOutput, crate::operation::get_tile::GetTileError>,
40    > {
41        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
42    }
43}
44impl GetTileFluentBuilder {
45    /// Creates a new `GetTileFluentBuilder`.
46    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
47        Self {
48            handle,
49            inner: ::std::default::Default::default(),
50            config_override: ::std::option::Option::None,
51        }
52    }
53    /// Access the GetTile as a reference.
54    pub fn as_input(&self) -> &crate::operation::get_tile::builders::GetTileInputBuilder {
55        &self.inner
56    }
57    /// Sends the request and returns the response.
58    ///
59    /// If an error occurs, an `SdkError` will be returned with additional details that
60    /// can be matched against.
61    ///
62    /// By default, any retryable failures will be retried twice. Retry behavior
63    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
64    /// set when configuring the client.
65    pub async fn send(
66        self,
67    ) -> ::std::result::Result<
68        crate::operation::get_tile::GetTileOutput,
69        ::aws_smithy_runtime_api::client::result::SdkError<
70            crate::operation::get_tile::GetTileError,
71            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
72        >,
73    > {
74        let input = self
75            .inner
76            .build()
77            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
78        let runtime_plugins = crate::operation::get_tile::GetTile::operation_runtime_plugins(
79            self.handle.runtime_plugins.clone(),
80            &self.handle.conf,
81            self.config_override,
82        );
83        crate::operation::get_tile::GetTile::orchestrate(&runtime_plugins, input).await
84    }
85
86    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
87    pub fn customize(
88        self,
89    ) -> crate::client::customize::CustomizableOperation<crate::operation::get_tile::GetTileOutput, crate::operation::get_tile::GetTileError, Self>
90    {
91        crate::client::customize::CustomizableOperation::new(self)
92    }
93    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
94        self.set_config_override(::std::option::Option::Some(config_override.into()));
95        self
96    }
97
98    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
99        self.config_override = config_override;
100        self
101    }
102    /// <p>Specifies the desired tile set.</p>
103    /// <p>Valid Values: <code>raster.satellite | vector.basemap</code></p>
104    pub fn tileset(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
105        self.inner = self.inner.tileset(input.into());
106        self
107    }
108    /// <p>Specifies the desired tile set.</p>
109    /// <p>Valid Values: <code>raster.satellite | vector.basemap</code></p>
110    pub fn set_tileset(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
111        self.inner = self.inner.set_tileset(input);
112        self
113    }
114    /// <p>Specifies the desired tile set.</p>
115    /// <p>Valid Values: <code>raster.satellite | vector.basemap</code></p>
116    pub fn get_tileset(&self) -> &::std::option::Option<::std::string::String> {
117        self.inner.get_tileset()
118    }
119    /// <p>The zoom value for the map tile.</p>
120    pub fn z(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
121        self.inner = self.inner.z(input.into());
122        self
123    }
124    /// <p>The zoom value for the map tile.</p>
125    pub fn set_z(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
126        self.inner = self.inner.set_z(input);
127        self
128    }
129    /// <p>The zoom value for the map tile.</p>
130    pub fn get_z(&self) -> &::std::option::Option<::std::string::String> {
131        self.inner.get_z()
132    }
133    /// <p>The X axis value for the map tile. Must be between 0 and 19.</p>
134    pub fn x(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
135        self.inner = self.inner.x(input.into());
136        self
137    }
138    /// <p>The X axis value for the map tile. Must be between 0 and 19.</p>
139    pub fn set_x(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140        self.inner = self.inner.set_x(input);
141        self
142    }
143    /// <p>The X axis value for the map tile. Must be between 0 and 19.</p>
144    pub fn get_x(&self) -> &::std::option::Option<::std::string::String> {
145        self.inner.get_x()
146    }
147    /// <p>The Y axis value for the map tile.</p>
148    pub fn y(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
149        self.inner = self.inner.y(input.into());
150        self
151    }
152    /// <p>The Y axis value for the map tile.</p>
153    pub fn set_y(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
154        self.inner = self.inner.set_y(input);
155        self
156    }
157    /// <p>The Y axis value for the map tile.</p>
158    pub fn get_y(&self) -> &::std::option::Option<::std::string::String> {
159        self.inner.get_y()
160    }
161    /// <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>
162    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
163        self.inner = self.inner.key(input.into());
164        self
165    }
166    /// <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>
167    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
168        self.inner = self.inner.set_key(input);
169        self
170    }
171    /// <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>
172    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
173        self.inner.get_key()
174    }
175}