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>A list of optional additional parameters such as map styles that can be requested for each result.</p>
7    pub additional_features: ::std::option::Option<::std::vec::Vec<crate::types::TileAdditionalFeature>>,
8    /// <p>Specifies the desired tile set.</p>
9    /// <p>Valid Values: <code>raster.satellite | vector.basemap</code></p>
10    pub tileset: ::std::option::Option<::std::string::String>,
11    /// <p>The zoom value for the map tile.</p>
12    pub z: ::std::option::Option<::std::string::String>,
13    /// <p>The X axis value for the map tile. Must be between 0 and 19.</p>
14    pub x: ::std::option::Option<::std::string::String>,
15    /// <p>The Y axis value for the map tile.</p>
16    pub y: ::std::option::Option<::std::string::String>,
17    /// <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>
18    pub key: ::std::option::Option<::std::string::String>,
19}
20impl GetTileInput {
21    /// <p>A list of optional additional parameters such as map styles that can be requested for each result.</p>
22    ///
23    /// 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()`.
24    pub fn additional_features(&self) -> &[crate::types::TileAdditionalFeature] {
25        self.additional_features.as_deref().unwrap_or_default()
26    }
27    /// <p>Specifies the desired tile set.</p>
28    /// <p>Valid Values: <code>raster.satellite | vector.basemap</code></p>
29    pub fn tileset(&self) -> ::std::option::Option<&str> {
30        self.tileset.as_deref()
31    }
32    /// <p>The zoom value for the map tile.</p>
33    pub fn z(&self) -> ::std::option::Option<&str> {
34        self.z.as_deref()
35    }
36    /// <p>The X axis value for the map tile. Must be between 0 and 19.</p>
37    pub fn x(&self) -> ::std::option::Option<&str> {
38        self.x.as_deref()
39    }
40    /// <p>The Y axis value for the map tile.</p>
41    pub fn y(&self) -> ::std::option::Option<&str> {
42        self.y.as_deref()
43    }
44    /// <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>
45    pub fn key(&self) -> ::std::option::Option<&str> {
46        self.key.as_deref()
47    }
48}
49impl ::std::fmt::Debug for GetTileInput {
50    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
51        let mut formatter = f.debug_struct("GetTileInput");
52        formatter.field("additional_features", &self.additional_features);
53        formatter.field("tileset", &self.tileset);
54        formatter.field("z", &"*** Sensitive Data Redacted ***");
55        formatter.field("x", &"*** Sensitive Data Redacted ***");
56        formatter.field("y", &"*** Sensitive Data Redacted ***");
57        formatter.field("key", &"*** Sensitive Data Redacted ***");
58        formatter.finish()
59    }
60}
61impl GetTileInput {
62    /// Creates a new builder-style object to manufacture [`GetTileInput`](crate::operation::get_tile::GetTileInput).
63    pub fn builder() -> crate::operation::get_tile::builders::GetTileInputBuilder {
64        crate::operation::get_tile::builders::GetTileInputBuilder::default()
65    }
66}
67
68/// A builder for [`GetTileInput`](crate::operation::get_tile::GetTileInput).
69#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
70#[non_exhaustive]
71pub struct GetTileInputBuilder {
72    pub(crate) additional_features: ::std::option::Option<::std::vec::Vec<crate::types::TileAdditionalFeature>>,
73    pub(crate) tileset: ::std::option::Option<::std::string::String>,
74    pub(crate) z: ::std::option::Option<::std::string::String>,
75    pub(crate) x: ::std::option::Option<::std::string::String>,
76    pub(crate) y: ::std::option::Option<::std::string::String>,
77    pub(crate) key: ::std::option::Option<::std::string::String>,
78}
79impl GetTileInputBuilder {
80    /// Appends an item to `additional_features`.
81    ///
82    /// To override the contents of this collection use [`set_additional_features`](Self::set_additional_features).
83    ///
84    /// <p>A list of optional additional parameters such as map styles that can be requested for each result.</p>
85    pub fn additional_features(mut self, input: crate::types::TileAdditionalFeature) -> Self {
86        let mut v = self.additional_features.unwrap_or_default();
87        v.push(input);
88        self.additional_features = ::std::option::Option::Some(v);
89        self
90    }
91    /// <p>A list of optional additional parameters such as map styles that can be requested for each result.</p>
92    pub fn set_additional_features(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TileAdditionalFeature>>) -> Self {
93        self.additional_features = input;
94        self
95    }
96    /// <p>A list of optional additional parameters such as map styles that can be requested for each result.</p>
97    pub fn get_additional_features(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TileAdditionalFeature>> {
98        &self.additional_features
99    }
100    /// <p>Specifies the desired tile set.</p>
101    /// <p>Valid Values: <code>raster.satellite | vector.basemap</code></p>
102    /// This field is required.
103    pub fn tileset(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
104        self.tileset = ::std::option::Option::Some(input.into());
105        self
106    }
107    /// <p>Specifies the desired tile set.</p>
108    /// <p>Valid Values: <code>raster.satellite | vector.basemap</code></p>
109    pub fn set_tileset(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
110        self.tileset = input;
111        self
112    }
113    /// <p>Specifies the desired tile set.</p>
114    /// <p>Valid Values: <code>raster.satellite | vector.basemap</code></p>
115    pub fn get_tileset(&self) -> &::std::option::Option<::std::string::String> {
116        &self.tileset
117    }
118    /// <p>The zoom value for the map tile.</p>
119    /// This field is required.
120    pub fn z(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
121        self.z = ::std::option::Option::Some(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.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.z
132    }
133    /// <p>The X axis value for the map tile. Must be between 0 and 19.</p>
134    /// This field is required.
135    pub fn x(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
136        self.x = ::std::option::Option::Some(input.into());
137        self
138    }
139    /// <p>The X axis value for the map tile. Must be between 0 and 19.</p>
140    pub fn set_x(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141        self.x = input;
142        self
143    }
144    /// <p>The X axis value for the map tile. Must be between 0 and 19.</p>
145    pub fn get_x(&self) -> &::std::option::Option<::std::string::String> {
146        &self.x
147    }
148    /// <p>The Y axis value for the map tile.</p>
149    /// This field is required.
150    pub fn y(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
151        self.y = ::std::option::Option::Some(input.into());
152        self
153    }
154    /// <p>The Y axis value for the map tile.</p>
155    pub fn set_y(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
156        self.y = input;
157        self
158    }
159    /// <p>The Y axis value for the map tile.</p>
160    pub fn get_y(&self) -> &::std::option::Option<::std::string::String> {
161        &self.y
162    }
163    /// <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>
164    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
165        self.key = ::std::option::Option::Some(input.into());
166        self
167    }
168    /// <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>
169    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
170        self.key = input;
171        self
172    }
173    /// <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>
174    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
175        &self.key
176    }
177    /// Consumes the builder and constructs a [`GetTileInput`](crate::operation::get_tile::GetTileInput).
178    pub fn build(self) -> ::std::result::Result<crate::operation::get_tile::GetTileInput, ::aws_smithy_types::error::operation::BuildError> {
179        ::std::result::Result::Ok(crate::operation::get_tile::GetTileInput {
180            additional_features: self.additional_features,
181            tileset: self.tileset,
182            z: self.z,
183            x: self.x,
184            y: self.y,
185            key: self.key,
186        })
187    }
188}
189impl ::std::fmt::Debug for GetTileInputBuilder {
190    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
191        let mut formatter = f.debug_struct("GetTileInputBuilder");
192        formatter.field("additional_features", &self.additional_features);
193        formatter.field("tileset", &self.tileset);
194        formatter.field("z", &"*** Sensitive Data Redacted ***");
195        formatter.field("x", &"*** Sensitive Data Redacted ***");
196        formatter.field("y", &"*** Sensitive Data Redacted ***");
197        formatter.field("key", &"*** Sensitive Data Redacted ***");
198        formatter.finish()
199    }
200}