aws_sdk_geomaps/operation/get_tile/
_get_tile_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct GetTileInput {
6    /// <p>Specifies the desired tile set.</p>
7    /// <p>Valid Values: <code>raster.satellite | vector.basemap</code></p>
8    pub tileset: ::std::option::Option<::std::string::String>,
9    /// <p>The zoom value for the map tile.</p>
10    pub z: ::std::option::Option<::std::string::String>,
11    /// <p>The X axis value for the map tile. Must be between 0 and 19.</p>
12    pub x: ::std::option::Option<::std::string::String>,
13    /// <p>The Y axis value for the map tile.</p>
14    pub y: ::std::option::Option<::std::string::String>,
15    /// <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>
16    pub key: ::std::option::Option<::std::string::String>,
17}
18impl GetTileInput {
19    /// <p>Specifies the desired tile set.</p>
20    /// <p>Valid Values: <code>raster.satellite | vector.basemap</code></p>
21    pub fn tileset(&self) -> ::std::option::Option<&str> {
22        self.tileset.as_deref()
23    }
24    /// <p>The zoom value for the map tile.</p>
25    pub fn z(&self) -> ::std::option::Option<&str> {
26        self.z.as_deref()
27    }
28    /// <p>The X axis value for the map tile. Must be between 0 and 19.</p>
29    pub fn x(&self) -> ::std::option::Option<&str> {
30        self.x.as_deref()
31    }
32    /// <p>The Y axis value for the map tile.</p>
33    pub fn y(&self) -> ::std::option::Option<&str> {
34        self.y.as_deref()
35    }
36    /// <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>
37    pub fn key(&self) -> ::std::option::Option<&str> {
38        self.key.as_deref()
39    }
40}
41impl ::std::fmt::Debug for GetTileInput {
42    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
43        let mut formatter = f.debug_struct("GetTileInput");
44        formatter.field("tileset", &self.tileset);
45        formatter.field("z", &self.z);
46        formatter.field("x", &self.x);
47        formatter.field("y", &self.y);
48        formatter.field("key", &"*** Sensitive Data Redacted ***");
49        formatter.finish()
50    }
51}
52impl GetTileInput {
53    /// Creates a new builder-style object to manufacture [`GetTileInput`](crate::operation::get_tile::GetTileInput).
54    pub fn builder() -> crate::operation::get_tile::builders::GetTileInputBuilder {
55        crate::operation::get_tile::builders::GetTileInputBuilder::default()
56    }
57}
58
59/// A builder for [`GetTileInput`](crate::operation::get_tile::GetTileInput).
60#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
61#[non_exhaustive]
62pub struct GetTileInputBuilder {
63    pub(crate) tileset: ::std::option::Option<::std::string::String>,
64    pub(crate) z: ::std::option::Option<::std::string::String>,
65    pub(crate) x: ::std::option::Option<::std::string::String>,
66    pub(crate) y: ::std::option::Option<::std::string::String>,
67    pub(crate) key: ::std::option::Option<::std::string::String>,
68}
69impl GetTileInputBuilder {
70    /// <p>Specifies the desired tile set.</p>
71    /// <p>Valid Values: <code>raster.satellite | vector.basemap</code></p>
72    /// This field is required.
73    pub fn tileset(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.tileset = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>Specifies the desired tile set.</p>
78    /// <p>Valid Values: <code>raster.satellite | vector.basemap</code></p>
79    pub fn set_tileset(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.tileset = input;
81        self
82    }
83    /// <p>Specifies the desired tile set.</p>
84    /// <p>Valid Values: <code>raster.satellite | vector.basemap</code></p>
85    pub fn get_tileset(&self) -> &::std::option::Option<::std::string::String> {
86        &self.tileset
87    }
88    /// <p>The zoom value for the map tile.</p>
89    /// This field is required.
90    pub fn z(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
91        self.z = ::std::option::Option::Some(input.into());
92        self
93    }
94    /// <p>The zoom value for the map tile.</p>
95    pub fn set_z(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
96        self.z = input;
97        self
98    }
99    /// <p>The zoom value for the map tile.</p>
100    pub fn get_z(&self) -> &::std::option::Option<::std::string::String> {
101        &self.z
102    }
103    /// <p>The X axis value for the map tile. Must be between 0 and 19.</p>
104    /// This field is required.
105    pub fn x(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
106        self.x = ::std::option::Option::Some(input.into());
107        self
108    }
109    /// <p>The X axis value for the map tile. Must be between 0 and 19.</p>
110    pub fn set_x(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
111        self.x = input;
112        self
113    }
114    /// <p>The X axis value for the map tile. Must be between 0 and 19.</p>
115    pub fn get_x(&self) -> &::std::option::Option<::std::string::String> {
116        &self.x
117    }
118    /// <p>The Y axis value for the map tile.</p>
119    /// This field is required.
120    pub fn y(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
121        self.y = ::std::option::Option::Some(input.into());
122        self
123    }
124    /// <p>The Y axis value for the map tile.</p>
125    pub fn set_y(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
126        self.y = input;
127        self
128    }
129    /// <p>The Y axis value for the map tile.</p>
130    pub fn get_y(&self) -> &::std::option::Option<::std::string::String> {
131        &self.y
132    }
133    /// <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>
134    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
135        self.key = ::std::option::Option::Some(input.into());
136        self
137    }
138    /// <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>
139    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140        self.key = input;
141        self
142    }
143    /// <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>
144    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
145        &self.key
146    }
147    /// Consumes the builder and constructs a [`GetTileInput`](crate::operation::get_tile::GetTileInput).
148    pub fn build(self) -> ::std::result::Result<crate::operation::get_tile::GetTileInput, ::aws_smithy_types::error::operation::BuildError> {
149        ::std::result::Result::Ok(crate::operation::get_tile::GetTileInput {
150            tileset: self.tileset,
151            z: self.z,
152            x: self.x,
153            y: self.y,
154            key: self.key,
155        })
156    }
157}
158impl ::std::fmt::Debug for GetTileInputBuilder {
159    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
160        let mut formatter = f.debug_struct("GetTileInputBuilder");
161        formatter.field("tileset", &self.tileset);
162        formatter.field("z", &self.z);
163        formatter.field("x", &self.x);
164        formatter.field("y", &self.y);
165        formatter.field("key", &"*** Sensitive Data Redacted ***");
166        formatter.finish()
167    }
168}