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_sprites::_get_map_sprites_output::GetMapSpritesOutputBuilder;

pub use crate::operation::get_map_sprites::_get_map_sprites_input::GetMapSpritesInputBuilder;

/// Fluent builder constructing a request to `GetMapSprites`.
///
/// <p>Retrieves the sprite sheet corresponding to a map resource. The sprite sheet is a PNG image paired with a JSON document describing the offsets of individual icons that will be displayed on a rendered map.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct GetMapSpritesFluentBuilder {
    handle: std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::get_map_sprites::builders::GetMapSpritesInputBuilder,
}
impl GetMapSpritesFluentBuilder {
    /// Creates a new `GetMapSprites`.
    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_sprites::GetMapSprites,
            aws_http::retry::AwsResponseRetryClassifier,
        >,
        aws_smithy_http::result::SdkError<crate::operation::get_map_sprites::GetMapSpritesError>,
    > {
        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_sprites::GetMapSpritesOutput,
        aws_smithy_http::result::SdkError<crate::operation::get_map_sprites::GetMapSpritesError>,
    > {
        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 associated with the sprite file.</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 associated with the sprite file.</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 name of the sprite file. Use the following file names for the sprite sheet:</p>
    /// <ul>
    /// <li> <p> <code>sprites.png</code> </p> </li>
    /// <li> <p> <code>sprites@2x.png</code> for high pixel density displays</p> </li>
    /// </ul>
    /// <p>For the JSON document containing image offsets. Use the following file names:</p>
    /// <ul>
    /// <li> <p> <code>sprites.json</code> </p> </li>
    /// <li> <p> <code>sprites@2x.json</code> for high pixel density displays</p> </li>
    /// </ul>
    pub fn file_name(mut self, input: impl Into<std::string::String>) -> Self {
        self.inner = self.inner.file_name(input.into());
        self
    }
    /// <p>The name of the sprite file. Use the following file names for the sprite sheet:</p>
    /// <ul>
    /// <li> <p> <code>sprites.png</code> </p> </li>
    /// <li> <p> <code>sprites@2x.png</code> for high pixel density displays</p> </li>
    /// </ul>
    /// <p>For the JSON document containing image offsets. Use the following file names:</p>
    /// <ul>
    /// <li> <p> <code>sprites.json</code> </p> </li>
    /// <li> <p> <code>sprites@2x.json</code> for high pixel density displays</p> </li>
    /// </ul>
    pub fn set_file_name(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.inner = self.inner.set_file_name(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
    }
}