aws-sdk-location 0.26.0

AWS SDK for Amazon Location Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::get_map_tile::_get_map_tile_output::GetMapTileOutputBuilder;

pub use crate::operation::get_map_tile::_get_map_tile_input::GetMapTileInputBuilder;

/// Fluent builder constructing a request to `GetMapTile`.
///
/// <p>Retrieves a vector data tile from the map resource. 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>
/// <p>The origin (0, 0) is the top left of the map. Increasing the zoom level by 1 doubles both the X and Y dimensions, so a tile containing data for the entire world at (0/0/0) will be split into 4 tiles at zoom 1 (1/0/0, 1/0/1, 1/1/0, 1/1/1).</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct GetMapTileFluentBuilder {
    handle: std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::get_map_tile::builders::GetMapTileInputBuilder,
}
impl GetMapTileFluentBuilder {
    /// Creates a new `GetMapTile`.
    pub(crate) fn new(handle: std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: Default::default(),
        }
    }

    /// Consume this builder, creating a customizable operation that can be modified before being
    /// sent. The operation's inner [http::Request] can be modified as well.
    pub async fn customize(
        self,
    ) -> std::result::Result<
        crate::client::customize::CustomizableOperation<
            crate::operation::get_map_tile::GetMapTile,
            aws_http::retry::AwsResponseRetryClassifier,
        >,
        aws_smithy_http::result::SdkError<crate::operation::get_map_tile::GetMapTileError>,
    > {
        let handle = self.handle.clone();
        let operation = self
            .inner
            .build()
            .map_err(aws_smithy_http::result::SdkError::construction_failure)?
            .make_operation(&handle.conf)
            .await
            .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
        Ok(crate::client::customize::CustomizableOperation { handle, operation })
    }

    /// Sends the request and returns the response.
    ///
    /// If an error occurs, an `SdkError` will be returned with additional details that
    /// can be matched against.
    ///
    /// By default, any retryable failures will be retried twice. Retry behavior
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> std::result::Result<
        crate::operation::get_map_tile::GetMapTileOutput,
        aws_smithy_http::result::SdkError<crate::operation::get_map_tile::GetMapTileError>,
    > {
        let op = self
            .inner
            .build()
            .map_err(aws_smithy_http::result::SdkError::construction_failure)?
            .make_operation(&self.handle.conf)
            .await
            .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
        self.handle.client.call(op).await
    }
    /// <p>The map resource to retrieve the map tiles from.</p>
    pub fn map_name(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.map_name(input.into());
        self
    }
    /// <p>The map resource to retrieve the map tiles from.</p>
    pub fn set_map_name(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_map_name(input);
        self
    }
    /// <p>The zoom value for the map tile.</p>
    pub fn z(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.z(input.into());
        self
    }
    /// <p>The zoom value for the map tile.</p>
    pub fn set_z(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_z(input);
        self
    }
    /// <p>The X axis value for the map tile.</p>
    pub fn x(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.x(input.into());
        self
    }
    /// <p>The X axis value for the map tile.</p>
    pub fn set_x(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_x(input);
        self
    }
    /// <p>The Y axis value for the map tile. </p>
    pub fn y(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.y(input.into());
        self
    }
    /// <p>The Y axis value for the map tile. </p>
    pub fn set_y(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_y(input);
        self
    }
    /// <p>The optional <a href="https://docs.aws.amazon.com/location/latest/developerguide/using-apikeys.html">API key</a> to authorize the request.</p>
    pub fn key(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.key(input.into());
        self
    }
    /// <p>The optional <a href="https://docs.aws.amazon.com/location/latest/developerguide/using-apikeys.html">API key</a> to authorize the request.</p>
    pub fn set_key(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_key(input);
        self
    }
}