aws_sdk_geomaps/operation/get_sprites/
_get_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, ::std::fmt::Debug)]
5pub struct GetSpritesInput {
6    /// <p><code>Sprites</code> API: The name of the sprite file to retrieve, following pattern <code>sprites(@2x)?\.(png|json)</code>.</p>
7    /// <p>Example: <code>sprites.png</code></p>
8    pub file_name: ::std::option::Option<::std::string::String>,
9    /// <p>Style specifies the desired map style for the <code>Sprites</code> APIs.</p>
10    pub style: ::std::option::Option<crate::types::MapStyle>,
11    /// <p>Sets color tone for map such as dark and light for specific map styles. It applies to only vector map styles such as Standard and Monochrome.</p>
12    /// <p>Example: <code>Light</code></p>
13    /// <p>Default value: <code>Light</code></p><note>
14    /// <p>Valid values for ColorScheme are case sensitive.</p>
15    /// </note>
16    pub color_scheme: ::std::option::Option<crate::types::ColorScheme>,
17    /// <p>Optimizes map styles for specific use case or industry. You can choose allowed variant only with Standard map style.</p>
18    /// <p>Example: <code>Default</code></p><note>
19    /// <p>Valid values for Variant are case sensitive.</p>
20    /// </note>
21    pub variant: ::std::option::Option<crate::types::Variant>,
22}
23impl GetSpritesInput {
24    /// <p><code>Sprites</code> API: The name of the sprite file to retrieve, following pattern <code>sprites(@2x)?\.(png|json)</code>.</p>
25    /// <p>Example: <code>sprites.png</code></p>
26    pub fn file_name(&self) -> ::std::option::Option<&str> {
27        self.file_name.as_deref()
28    }
29    /// <p>Style specifies the desired map style for the <code>Sprites</code> APIs.</p>
30    pub fn style(&self) -> ::std::option::Option<&crate::types::MapStyle> {
31        self.style.as_ref()
32    }
33    /// <p>Sets color tone for map such as dark and light for specific map styles. It applies to only vector map styles such as Standard and Monochrome.</p>
34    /// <p>Example: <code>Light</code></p>
35    /// <p>Default value: <code>Light</code></p><note>
36    /// <p>Valid values for ColorScheme are case sensitive.</p>
37    /// </note>
38    pub fn color_scheme(&self) -> ::std::option::Option<&crate::types::ColorScheme> {
39        self.color_scheme.as_ref()
40    }
41    /// <p>Optimizes map styles for specific use case or industry. You can choose allowed variant only with Standard map style.</p>
42    /// <p>Example: <code>Default</code></p><note>
43    /// <p>Valid values for Variant are case sensitive.</p>
44    /// </note>
45    pub fn variant(&self) -> ::std::option::Option<&crate::types::Variant> {
46        self.variant.as_ref()
47    }
48}
49impl GetSpritesInput {
50    /// Creates a new builder-style object to manufacture [`GetSpritesInput`](crate::operation::get_sprites::GetSpritesInput).
51    pub fn builder() -> crate::operation::get_sprites::builders::GetSpritesInputBuilder {
52        crate::operation::get_sprites::builders::GetSpritesInputBuilder::default()
53    }
54}
55
56/// A builder for [`GetSpritesInput`](crate::operation::get_sprites::GetSpritesInput).
57#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
58#[non_exhaustive]
59pub struct GetSpritesInputBuilder {
60    pub(crate) file_name: ::std::option::Option<::std::string::String>,
61    pub(crate) style: ::std::option::Option<crate::types::MapStyle>,
62    pub(crate) color_scheme: ::std::option::Option<crate::types::ColorScheme>,
63    pub(crate) variant: ::std::option::Option<crate::types::Variant>,
64}
65impl GetSpritesInputBuilder {
66    /// <p><code>Sprites</code> API: The name of the sprite file to retrieve, following pattern <code>sprites(@2x)?\.(png|json)</code>.</p>
67    /// <p>Example: <code>sprites.png</code></p>
68    /// This field is required.
69    pub fn file_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
70        self.file_name = ::std::option::Option::Some(input.into());
71        self
72    }
73    /// <p><code>Sprites</code> API: The name of the sprite file to retrieve, following pattern <code>sprites(@2x)?\.(png|json)</code>.</p>
74    /// <p>Example: <code>sprites.png</code></p>
75    pub fn set_file_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
76        self.file_name = input;
77        self
78    }
79    /// <p><code>Sprites</code> API: The name of the sprite file to retrieve, following pattern <code>sprites(@2x)?\.(png|json)</code>.</p>
80    /// <p>Example: <code>sprites.png</code></p>
81    pub fn get_file_name(&self) -> &::std::option::Option<::std::string::String> {
82        &self.file_name
83    }
84    /// <p>Style specifies the desired map style for the <code>Sprites</code> APIs.</p>
85    /// This field is required.
86    pub fn style(mut self, input: crate::types::MapStyle) -> Self {
87        self.style = ::std::option::Option::Some(input);
88        self
89    }
90    /// <p>Style specifies the desired map style for the <code>Sprites</code> APIs.</p>
91    pub fn set_style(mut self, input: ::std::option::Option<crate::types::MapStyle>) -> Self {
92        self.style = input;
93        self
94    }
95    /// <p>Style specifies the desired map style for the <code>Sprites</code> APIs.</p>
96    pub fn get_style(&self) -> &::std::option::Option<crate::types::MapStyle> {
97        &self.style
98    }
99    /// <p>Sets color tone for map such as dark and light for specific map styles. It applies to only vector map styles such as Standard and Monochrome.</p>
100    /// <p>Example: <code>Light</code></p>
101    /// <p>Default value: <code>Light</code></p><note>
102    /// <p>Valid values for ColorScheme are case sensitive.</p>
103    /// </note>
104    /// This field is required.
105    pub fn color_scheme(mut self, input: crate::types::ColorScheme) -> Self {
106        self.color_scheme = ::std::option::Option::Some(input);
107        self
108    }
109    /// <p>Sets color tone for map such as dark and light for specific map styles. It applies to only vector map styles such as Standard and Monochrome.</p>
110    /// <p>Example: <code>Light</code></p>
111    /// <p>Default value: <code>Light</code></p><note>
112    /// <p>Valid values for ColorScheme are case sensitive.</p>
113    /// </note>
114    pub fn set_color_scheme(mut self, input: ::std::option::Option<crate::types::ColorScheme>) -> Self {
115        self.color_scheme = input;
116        self
117    }
118    /// <p>Sets color tone for map such as dark and light for specific map styles. It applies to only vector map styles such as Standard and Monochrome.</p>
119    /// <p>Example: <code>Light</code></p>
120    /// <p>Default value: <code>Light</code></p><note>
121    /// <p>Valid values for ColorScheme are case sensitive.</p>
122    /// </note>
123    pub fn get_color_scheme(&self) -> &::std::option::Option<crate::types::ColorScheme> {
124        &self.color_scheme
125    }
126    /// <p>Optimizes map styles for specific use case or industry. You can choose allowed variant only with Standard map style.</p>
127    /// <p>Example: <code>Default</code></p><note>
128    /// <p>Valid values for Variant are case sensitive.</p>
129    /// </note>
130    /// This field is required.
131    pub fn variant(mut self, input: crate::types::Variant) -> Self {
132        self.variant = ::std::option::Option::Some(input);
133        self
134    }
135    /// <p>Optimizes map styles for specific use case or industry. You can choose allowed variant only with Standard map style.</p>
136    /// <p>Example: <code>Default</code></p><note>
137    /// <p>Valid values for Variant are case sensitive.</p>
138    /// </note>
139    pub fn set_variant(mut self, input: ::std::option::Option<crate::types::Variant>) -> Self {
140        self.variant = input;
141        self
142    }
143    /// <p>Optimizes map styles for specific use case or industry. You can choose allowed variant only with Standard map style.</p>
144    /// <p>Example: <code>Default</code></p><note>
145    /// <p>Valid values for Variant are case sensitive.</p>
146    /// </note>
147    pub fn get_variant(&self) -> &::std::option::Option<crate::types::Variant> {
148        &self.variant
149    }
150    /// Consumes the builder and constructs a [`GetSpritesInput`](crate::operation::get_sprites::GetSpritesInput).
151    pub fn build(self) -> ::std::result::Result<crate::operation::get_sprites::GetSpritesInput, ::aws_smithy_types::error::operation::BuildError> {
152        ::std::result::Result::Ok(crate::operation::get_sprites::GetSpritesInput {
153            file_name: self.file_name,
154            style: self.style,
155            color_scheme: self.color_scheme,
156            variant: self.variant,
157        })
158    }
159}