aws-sdk-geomaps 1.56.0

AWS SDK for Amazon Location Service Maps V2
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct GetTileInput {
    /// <p>A list of optional additional parameters such as map styles that can be requested for each result. Not supported in <code>ap-southeast-1</code> and <code>ap-southeast-5</code> regions for <a href="https://docs.aws.amazon.com/location/latest/developerguide/GrabMaps.html">GrabMaps</a> customers.</p>
    pub additional_features: ::std::option::Option<::std::vec::Vec<crate::types::TileAdditionalFeature>>,
    /// <p>Specifies the desired tile set. For <a href="https://docs.aws.amazon.com/location/latest/developerguide/GrabMaps.html">GrabMaps</a> customers, <code>ap-southeast-1</code> and <code>ap-southeast-5</code> regions support only the <code>vector.basemap</code> value.</p>
    /// <p>Valid Values: <code>raster.satellite | vector.basemap | vector.traffic | raster.dem</code></p>
    pub tileset: ::std::option::Option<::std::string::String>,
    /// <p>The zoom value for the map tile.</p>
    pub z: ::std::option::Option<::std::string::String>,
    /// <p>The X axis value for the map tile.</p>
    pub x: ::std::option::Option<::std::string::String>,
    /// <p>The Y axis value for the map tile.</p>
    pub y: ::std::option::Option<::std::string::String>,
    /// <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>
    pub key: ::std::option::Option<::std::string::String>,
}
impl GetTileInput {
    /// <p>A list of optional additional parameters such as map styles that can be requested for each result. Not supported in <code>ap-southeast-1</code> and <code>ap-southeast-5</code> regions for <a href="https://docs.aws.amazon.com/location/latest/developerguide/GrabMaps.html">GrabMaps</a> customers.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.additional_features.is_none()`.
    pub fn additional_features(&self) -> &[crate::types::TileAdditionalFeature] {
        self.additional_features.as_deref().unwrap_or_default()
    }
    /// <p>Specifies the desired tile set. For <a href="https://docs.aws.amazon.com/location/latest/developerguide/GrabMaps.html">GrabMaps</a> customers, <code>ap-southeast-1</code> and <code>ap-southeast-5</code> regions support only the <code>vector.basemap</code> value.</p>
    /// <p>Valid Values: <code>raster.satellite | vector.basemap | vector.traffic | raster.dem</code></p>
    pub fn tileset(&self) -> ::std::option::Option<&str> {
        self.tileset.as_deref()
    }
    /// <p>The zoom value for the map tile.</p>
    pub fn z(&self) -> ::std::option::Option<&str> {
        self.z.as_deref()
    }
    /// <p>The X axis value for the map tile.</p>
    pub fn x(&self) -> ::std::option::Option<&str> {
        self.x.as_deref()
    }
    /// <p>The Y axis value for the map tile.</p>
    pub fn y(&self) -> ::std::option::Option<&str> {
        self.y.as_deref()
    }
    /// <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>
    pub fn key(&self) -> ::std::option::Option<&str> {
        self.key.as_deref()
    }
}
impl ::std::fmt::Debug for GetTileInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("GetTileInput");
        formatter.field("additional_features", &self.additional_features);
        formatter.field("tileset", &self.tileset);
        formatter.field("z", &"*** Sensitive Data Redacted ***");
        formatter.field("x", &"*** Sensitive Data Redacted ***");
        formatter.field("y", &"*** Sensitive Data Redacted ***");
        formatter.field("key", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl GetTileInput {
    /// Creates a new builder-style object to manufacture [`GetTileInput`](crate::operation::get_tile::GetTileInput).
    pub fn builder() -> crate::operation::get_tile::builders::GetTileInputBuilder {
        crate::operation::get_tile::builders::GetTileInputBuilder::default()
    }
}

/// A builder for [`GetTileInput`](crate::operation::get_tile::GetTileInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct GetTileInputBuilder {
    pub(crate) additional_features: ::std::option::Option<::std::vec::Vec<crate::types::TileAdditionalFeature>>,
    pub(crate) tileset: ::std::option::Option<::std::string::String>,
    pub(crate) z: ::std::option::Option<::std::string::String>,
    pub(crate) x: ::std::option::Option<::std::string::String>,
    pub(crate) y: ::std::option::Option<::std::string::String>,
    pub(crate) key: ::std::option::Option<::std::string::String>,
}
impl GetTileInputBuilder {
    /// Appends an item to `additional_features`.
    ///
    /// To override the contents of this collection use [`set_additional_features`](Self::set_additional_features).
    ///
    /// <p>A list of optional additional parameters such as map styles that can be requested for each result. Not supported in <code>ap-southeast-1</code> and <code>ap-southeast-5</code> regions for <a href="https://docs.aws.amazon.com/location/latest/developerguide/GrabMaps.html">GrabMaps</a> customers.</p>
    pub fn additional_features(mut self, input: crate::types::TileAdditionalFeature) -> Self {
        let mut v = self.additional_features.unwrap_or_default();
        v.push(input);
        self.additional_features = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of optional additional parameters such as map styles that can be requested for each result. Not supported in <code>ap-southeast-1</code> and <code>ap-southeast-5</code> regions for <a href="https://docs.aws.amazon.com/location/latest/developerguide/GrabMaps.html">GrabMaps</a> customers.</p>
    pub fn set_additional_features(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TileAdditionalFeature>>) -> Self {
        self.additional_features = input;
        self
    }
    /// <p>A list of optional additional parameters such as map styles that can be requested for each result. Not supported in <code>ap-southeast-1</code> and <code>ap-southeast-5</code> regions for <a href="https://docs.aws.amazon.com/location/latest/developerguide/GrabMaps.html">GrabMaps</a> customers.</p>
    pub fn get_additional_features(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TileAdditionalFeature>> {
        &self.additional_features
    }
    /// <p>Specifies the desired tile set. For <a href="https://docs.aws.amazon.com/location/latest/developerguide/GrabMaps.html">GrabMaps</a> customers, <code>ap-southeast-1</code> and <code>ap-southeast-5</code> regions support only the <code>vector.basemap</code> value.</p>
    /// <p>Valid Values: <code>raster.satellite | vector.basemap | vector.traffic | raster.dem</code></p>
    /// This field is required.
    pub fn tileset(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.tileset = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specifies the desired tile set. For <a href="https://docs.aws.amazon.com/location/latest/developerguide/GrabMaps.html">GrabMaps</a> customers, <code>ap-southeast-1</code> and <code>ap-southeast-5</code> regions support only the <code>vector.basemap</code> value.</p>
    /// <p>Valid Values: <code>raster.satellite | vector.basemap | vector.traffic | raster.dem</code></p>
    pub fn set_tileset(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.tileset = input;
        self
    }
    /// <p>Specifies the desired tile set. For <a href="https://docs.aws.amazon.com/location/latest/developerguide/GrabMaps.html">GrabMaps</a> customers, <code>ap-southeast-1</code> and <code>ap-southeast-5</code> regions support only the <code>vector.basemap</code> value.</p>
    /// <p>Valid Values: <code>raster.satellite | vector.basemap | vector.traffic | raster.dem</code></p>
    pub fn get_tileset(&self) -> &::std::option::Option<::std::string::String> {
        &self.tileset
    }
    /// <p>The zoom value for the map tile.</p>
    /// This field is required.
    pub fn z(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.z = ::std::option::Option::Some(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.z = input;
        self
    }
    /// <p>The zoom value for the map tile.</p>
    pub fn get_z(&self) -> &::std::option::Option<::std::string::String> {
        &self.z
    }
    /// <p>The X axis value for the map tile.</p>
    /// This field is required.
    pub fn x(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.x = ::std::option::Option::Some(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.x = input;
        self
    }
    /// <p>The X axis value for the map tile.</p>
    pub fn get_x(&self) -> &::std::option::Option<::std::string::String> {
        &self.x
    }
    /// <p>The Y axis value for the map tile.</p>
    /// This field is required.
    pub fn y(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.y = ::std::option::Option::Some(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.y = input;
        self
    }
    /// <p>The Y axis value for the map tile.</p>
    pub fn get_y(&self) -> &::std::option::Option<::std::string::String> {
        &self.y
    }
    /// <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>
    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.key = ::std::option::Option::Some(input.into());
        self
    }
    /// <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>
    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.key = input;
        self
    }
    /// <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>
    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
        &self.key
    }
    /// Consumes the builder and constructs a [`GetTileInput`](crate::operation::get_tile::GetTileInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::get_tile::GetTileInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_tile::GetTileInput {
            additional_features: self.additional_features,
            tileset: self.tileset,
            z: self.z,
            x: self.x,
            y: self.y,
            key: self.key,
        })
    }
}
impl ::std::fmt::Debug for GetTileInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("GetTileInputBuilder");
        formatter.field("additional_features", &self.additional_features);
        formatter.field("tileset", &self.tileset);
        formatter.field("z", &"*** Sensitive Data Redacted ***");
        formatter.field("x", &"*** Sensitive Data Redacted ***");
        formatter.field("y", &"*** Sensitive Data Redacted ***");
        formatter.field("key", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}