Skip to main content

aws_sdk_location/operation/get_map_sprites/
_get_map_sprites_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 GetMapSpritesInput {
6    /// <p>The map resource associated with the sprite file.</p>
7    pub map_name: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the sprite file. Use the following file names for the sprite sheet:</p>
9    /// <ul>
10    /// <li>
11    /// <p><code>sprites.png</code></p></li>
12    /// <li>
13    /// <p><code>sprites@2x.png</code> for high pixel density displays</p></li>
14    /// </ul>
15    /// <p>For the JSON document containing image offsets. Use the following file names:</p>
16    /// <ul>
17    /// <li>
18    /// <p><code>sprites.json</code></p></li>
19    /// <li>
20    /// <p><code>sprites@2x.json</code> for high pixel density displays</p></li>
21    /// </ul>
22    pub file_name: ::std::option::Option<::std::string::String>,
23    /// <p>The optional <a href="https://docs.aws.amazon.com/location/previous/developerguide/using-apikeys.html">API key</a> to authorize the request.</p>
24    pub key: ::std::option::Option<::std::string::String>,
25}
26impl GetMapSpritesInput {
27    /// <p>The map resource associated with the sprite file.</p>
28    pub fn map_name(&self) -> ::std::option::Option<&str> {
29        self.map_name.as_deref()
30    }
31    /// <p>The name of the sprite file. Use the following file names for the sprite sheet:</p>
32    /// <ul>
33    /// <li>
34    /// <p><code>sprites.png</code></p></li>
35    /// <li>
36    /// <p><code>sprites@2x.png</code> for high pixel density displays</p></li>
37    /// </ul>
38    /// <p>For the JSON document containing image offsets. Use the following file names:</p>
39    /// <ul>
40    /// <li>
41    /// <p><code>sprites.json</code></p></li>
42    /// <li>
43    /// <p><code>sprites@2x.json</code> for high pixel density displays</p></li>
44    /// </ul>
45    pub fn file_name(&self) -> ::std::option::Option<&str> {
46        self.file_name.as_deref()
47    }
48    /// <p>The optional <a href="https://docs.aws.amazon.com/location/previous/developerguide/using-apikeys.html">API key</a> to authorize the request.</p>
49    pub fn key(&self) -> ::std::option::Option<&str> {
50        self.key.as_deref()
51    }
52}
53impl ::std::fmt::Debug for GetMapSpritesInput {
54    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
55        let mut formatter = f.debug_struct("GetMapSpritesInput");
56        formatter.field("map_name", &self.map_name);
57        formatter.field("file_name", &self.file_name);
58        formatter.field("key", &"*** Sensitive Data Redacted ***");
59        formatter.finish()
60    }
61}
62impl GetMapSpritesInput {
63    /// Creates a new builder-style object to manufacture [`GetMapSpritesInput`](crate::operation::get_map_sprites::GetMapSpritesInput).
64    pub fn builder() -> crate::operation::get_map_sprites::builders::GetMapSpritesInputBuilder {
65        crate::operation::get_map_sprites::builders::GetMapSpritesInputBuilder::default()
66    }
67}
68
69/// A builder for [`GetMapSpritesInput`](crate::operation::get_map_sprites::GetMapSpritesInput).
70#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
71#[non_exhaustive]
72pub struct GetMapSpritesInputBuilder {
73    pub(crate) map_name: ::std::option::Option<::std::string::String>,
74    pub(crate) file_name: ::std::option::Option<::std::string::String>,
75    pub(crate) key: ::std::option::Option<::std::string::String>,
76}
77impl GetMapSpritesInputBuilder {
78    /// <p>The map resource associated with the sprite file.</p>
79    /// This field is required.
80    pub fn map_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.map_name = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>The map resource associated with the sprite file.</p>
85    pub fn set_map_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.map_name = input;
87        self
88    }
89    /// <p>The map resource associated with the sprite file.</p>
90    pub fn get_map_name(&self) -> &::std::option::Option<::std::string::String> {
91        &self.map_name
92    }
93    /// <p>The name of the sprite file. Use the following file names for the sprite sheet:</p>
94    /// <ul>
95    /// <li>
96    /// <p><code>sprites.png</code></p></li>
97    /// <li>
98    /// <p><code>sprites@2x.png</code> for high pixel density displays</p></li>
99    /// </ul>
100    /// <p>For the JSON document containing image offsets. Use the following file names:</p>
101    /// <ul>
102    /// <li>
103    /// <p><code>sprites.json</code></p></li>
104    /// <li>
105    /// <p><code>sprites@2x.json</code> for high pixel density displays</p></li>
106    /// </ul>
107    /// This field is required.
108    pub fn file_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
109        self.file_name = ::std::option::Option::Some(input.into());
110        self
111    }
112    /// <p>The name of the sprite file. Use the following file names for the sprite sheet:</p>
113    /// <ul>
114    /// <li>
115    /// <p><code>sprites.png</code></p></li>
116    /// <li>
117    /// <p><code>sprites@2x.png</code> for high pixel density displays</p></li>
118    /// </ul>
119    /// <p>For the JSON document containing image offsets. Use the following file names:</p>
120    /// <ul>
121    /// <li>
122    /// <p><code>sprites.json</code></p></li>
123    /// <li>
124    /// <p><code>sprites@2x.json</code> for high pixel density displays</p></li>
125    /// </ul>
126    pub fn set_file_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127        self.file_name = input;
128        self
129    }
130    /// <p>The name of the sprite file. Use the following file names for the sprite sheet:</p>
131    /// <ul>
132    /// <li>
133    /// <p><code>sprites.png</code></p></li>
134    /// <li>
135    /// <p><code>sprites@2x.png</code> for high pixel density displays</p></li>
136    /// </ul>
137    /// <p>For the JSON document containing image offsets. Use the following file names:</p>
138    /// <ul>
139    /// <li>
140    /// <p><code>sprites.json</code></p></li>
141    /// <li>
142    /// <p><code>sprites@2x.json</code> for high pixel density displays</p></li>
143    /// </ul>
144    pub fn get_file_name(&self) -> &::std::option::Option<::std::string::String> {
145        &self.file_name
146    }
147    /// <p>The optional <a href="https://docs.aws.amazon.com/location/previous/developerguide/using-apikeys.html">API key</a> to authorize the request.</p>
148    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
149        self.key = ::std::option::Option::Some(input.into());
150        self
151    }
152    /// <p>The optional <a href="https://docs.aws.amazon.com/location/previous/developerguide/using-apikeys.html">API key</a> to authorize the request.</p>
153    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
154        self.key = input;
155        self
156    }
157    /// <p>The optional <a href="https://docs.aws.amazon.com/location/previous/developerguide/using-apikeys.html">API key</a> to authorize the request.</p>
158    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
159        &self.key
160    }
161    /// Consumes the builder and constructs a [`GetMapSpritesInput`](crate::operation::get_map_sprites::GetMapSpritesInput).
162    pub fn build(
163        self,
164    ) -> ::std::result::Result<crate::operation::get_map_sprites::GetMapSpritesInput, ::aws_smithy_types::error::operation::BuildError> {
165        ::std::result::Result::Ok(crate::operation::get_map_sprites::GetMapSpritesInput {
166            map_name: self.map_name,
167            file_name: self.file_name,
168            key: self.key,
169        })
170    }
171}
172impl ::std::fmt::Debug for GetMapSpritesInputBuilder {
173    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
174        let mut formatter = f.debug_struct("GetMapSpritesInputBuilder");
175        formatter.field("map_name", &self.map_name);
176        formatter.field("file_name", &self.file_name);
177        formatter.field("key", &"*** Sensitive Data Redacted ***");
178        formatter.finish()
179    }
180}