aws_sdk_location/operation/describe_map/
_describe_map_output.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 DescribeMapOutput {
6    /// <p>The map style selected from an available provider.</p>
7    pub map_name: ::std::string::String,
8    /// <p>The Amazon Resource Name (ARN) for the map resource. Used to specify a resource across all Amazon Web Services.</p>
9    /// <ul>
10    /// <li>
11    /// <p>Format example: <code>arn:aws:geo:region:account-id:map/ExampleMap</code></p></li>
12    /// </ul>
13    pub map_arn: ::std::string::String,
14    /// <p>No longer used. Always returns <code>RequestBasedUsage</code>.</p>
15    #[deprecated(note = "Deprecated. Always returns RequestBasedUsage.", since = "2022-02-01")]
16    pub pricing_plan: ::std::option::Option<crate::types::PricingPlan>,
17    /// <p>Specifies the data provider for the associated map tiles.</p>
18    pub data_source: ::std::string::String,
19    /// <p>Specifies the map tile style selected from a partner data provider.</p>
20    pub configuration: ::std::option::Option<crate::types::MapConfiguration>,
21    /// <p>The optional description for the map resource.</p>
22    pub description: ::std::string::String,
23    /// <p>Tags associated with the map resource.</p>
24    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
25    /// <p>The timestamp for when the map resource was created in <a href="https://www.iso.org/iso-8601-date-and-time-format.html">ISO 8601</a> format: <code>YYYY-MM-DDThh:mm:ss.sssZ</code>.</p>
26    pub create_time: ::aws_smithy_types::DateTime,
27    /// <p>The timestamp for when the map resource was last update in <a href="https://www.iso.org/iso-8601-date-and-time-format.html">ISO 8601</a> format: <code>YYYY-MM-DDThh:mm:ss.sssZ</code>.</p>
28    pub update_time: ::aws_smithy_types::DateTime,
29    _request_id: Option<String>,
30}
31impl DescribeMapOutput {
32    /// <p>The map style selected from an available provider.</p>
33    pub fn map_name(&self) -> &str {
34        use std::ops::Deref;
35        self.map_name.deref()
36    }
37    /// <p>The Amazon Resource Name (ARN) for the map resource. Used to specify a resource across all Amazon Web Services.</p>
38    /// <ul>
39    /// <li>
40    /// <p>Format example: <code>arn:aws:geo:region:account-id:map/ExampleMap</code></p></li>
41    /// </ul>
42    pub fn map_arn(&self) -> &str {
43        use std::ops::Deref;
44        self.map_arn.deref()
45    }
46    /// <p>No longer used. Always returns <code>RequestBasedUsage</code>.</p>
47    #[deprecated(note = "Deprecated. Always returns RequestBasedUsage.", since = "2022-02-01")]
48    pub fn pricing_plan(&self) -> ::std::option::Option<&crate::types::PricingPlan> {
49        self.pricing_plan.as_ref()
50    }
51    /// <p>Specifies the data provider for the associated map tiles.</p>
52    pub fn data_source(&self) -> &str {
53        use std::ops::Deref;
54        self.data_source.deref()
55    }
56    /// <p>Specifies the map tile style selected from a partner data provider.</p>
57    pub fn configuration(&self) -> ::std::option::Option<&crate::types::MapConfiguration> {
58        self.configuration.as_ref()
59    }
60    /// <p>The optional description for the map resource.</p>
61    pub fn description(&self) -> &str {
62        use std::ops::Deref;
63        self.description.deref()
64    }
65    /// <p>Tags associated with the map resource.</p>
66    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
67        self.tags.as_ref()
68    }
69    /// <p>The timestamp for when the map resource was created in <a href="https://www.iso.org/iso-8601-date-and-time-format.html">ISO 8601</a> format: <code>YYYY-MM-DDThh:mm:ss.sssZ</code>.</p>
70    pub fn create_time(&self) -> &::aws_smithy_types::DateTime {
71        &self.create_time
72    }
73    /// <p>The timestamp for when the map resource was last update in <a href="https://www.iso.org/iso-8601-date-and-time-format.html">ISO 8601</a> format: <code>YYYY-MM-DDThh:mm:ss.sssZ</code>.</p>
74    pub fn update_time(&self) -> &::aws_smithy_types::DateTime {
75        &self.update_time
76    }
77}
78impl ::std::fmt::Debug for DescribeMapOutput {
79    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
80        let mut formatter = f.debug_struct("DescribeMapOutput");
81        formatter.field("map_name", &self.map_name);
82        formatter.field("map_arn", &self.map_arn);
83        formatter.field("pricing_plan", &self.pricing_plan);
84        formatter.field("data_source", &self.data_source);
85        formatter.field("configuration", &self.configuration);
86        formatter.field("description", &self.description);
87        formatter.field("tags", &self.tags);
88        formatter.field("create_time", &"*** Sensitive Data Redacted ***");
89        formatter.field("update_time", &"*** Sensitive Data Redacted ***");
90        formatter.field("_request_id", &self._request_id);
91        formatter.finish()
92    }
93}
94impl ::aws_types::request_id::RequestId for DescribeMapOutput {
95    fn request_id(&self) -> Option<&str> {
96        self._request_id.as_deref()
97    }
98}
99impl DescribeMapOutput {
100    /// Creates a new builder-style object to manufacture [`DescribeMapOutput`](crate::operation::describe_map::DescribeMapOutput).
101    pub fn builder() -> crate::operation::describe_map::builders::DescribeMapOutputBuilder {
102        crate::operation::describe_map::builders::DescribeMapOutputBuilder::default()
103    }
104}
105
106/// A builder for [`DescribeMapOutput`](crate::operation::describe_map::DescribeMapOutput).
107#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
108#[non_exhaustive]
109pub struct DescribeMapOutputBuilder {
110    pub(crate) map_name: ::std::option::Option<::std::string::String>,
111    pub(crate) map_arn: ::std::option::Option<::std::string::String>,
112    pub(crate) pricing_plan: ::std::option::Option<crate::types::PricingPlan>,
113    pub(crate) data_source: ::std::option::Option<::std::string::String>,
114    pub(crate) configuration: ::std::option::Option<crate::types::MapConfiguration>,
115    pub(crate) description: ::std::option::Option<::std::string::String>,
116    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
117    pub(crate) create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
118    pub(crate) update_time: ::std::option::Option<::aws_smithy_types::DateTime>,
119    _request_id: Option<String>,
120}
121impl DescribeMapOutputBuilder {
122    /// <p>The map style selected from an available provider.</p>
123    /// This field is required.
124    pub fn map_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
125        self.map_name = ::std::option::Option::Some(input.into());
126        self
127    }
128    /// <p>The map style selected from an available provider.</p>
129    pub fn set_map_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
130        self.map_name = input;
131        self
132    }
133    /// <p>The map style selected from an available provider.</p>
134    pub fn get_map_name(&self) -> &::std::option::Option<::std::string::String> {
135        &self.map_name
136    }
137    /// <p>The Amazon Resource Name (ARN) for the map resource. Used to specify a resource across all Amazon Web Services.</p>
138    /// <ul>
139    /// <li>
140    /// <p>Format example: <code>arn:aws:geo:region:account-id:map/ExampleMap</code></p></li>
141    /// </ul>
142    /// This field is required.
143    pub fn map_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
144        self.map_arn = ::std::option::Option::Some(input.into());
145        self
146    }
147    /// <p>The Amazon Resource Name (ARN) for the map resource. Used to specify a resource across all Amazon Web Services.</p>
148    /// <ul>
149    /// <li>
150    /// <p>Format example: <code>arn:aws:geo:region:account-id:map/ExampleMap</code></p></li>
151    /// </ul>
152    pub fn set_map_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
153        self.map_arn = input;
154        self
155    }
156    /// <p>The Amazon Resource Name (ARN) for the map resource. Used to specify a resource across all Amazon Web Services.</p>
157    /// <ul>
158    /// <li>
159    /// <p>Format example: <code>arn:aws:geo:region:account-id:map/ExampleMap</code></p></li>
160    /// </ul>
161    pub fn get_map_arn(&self) -> &::std::option::Option<::std::string::String> {
162        &self.map_arn
163    }
164    /// <p>No longer used. Always returns <code>RequestBasedUsage</code>.</p>
165    #[deprecated(note = "Deprecated. Always returns RequestBasedUsage.", since = "2022-02-01")]
166    pub fn pricing_plan(mut self, input: crate::types::PricingPlan) -> Self {
167        self.pricing_plan = ::std::option::Option::Some(input);
168        self
169    }
170    /// <p>No longer used. Always returns <code>RequestBasedUsage</code>.</p>
171    #[deprecated(note = "Deprecated. Always returns RequestBasedUsage.", since = "2022-02-01")]
172    pub fn set_pricing_plan(mut self, input: ::std::option::Option<crate::types::PricingPlan>) -> Self {
173        self.pricing_plan = input;
174        self
175    }
176    /// <p>No longer used. Always returns <code>RequestBasedUsage</code>.</p>
177    #[deprecated(note = "Deprecated. Always returns RequestBasedUsage.", since = "2022-02-01")]
178    pub fn get_pricing_plan(&self) -> &::std::option::Option<crate::types::PricingPlan> {
179        &self.pricing_plan
180    }
181    /// <p>Specifies the data provider for the associated map tiles.</p>
182    /// This field is required.
183    pub fn data_source(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
184        self.data_source = ::std::option::Option::Some(input.into());
185        self
186    }
187    /// <p>Specifies the data provider for the associated map tiles.</p>
188    pub fn set_data_source(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
189        self.data_source = input;
190        self
191    }
192    /// <p>Specifies the data provider for the associated map tiles.</p>
193    pub fn get_data_source(&self) -> &::std::option::Option<::std::string::String> {
194        &self.data_source
195    }
196    /// <p>Specifies the map tile style selected from a partner data provider.</p>
197    /// This field is required.
198    pub fn configuration(mut self, input: crate::types::MapConfiguration) -> Self {
199        self.configuration = ::std::option::Option::Some(input);
200        self
201    }
202    /// <p>Specifies the map tile style selected from a partner data provider.</p>
203    pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::MapConfiguration>) -> Self {
204        self.configuration = input;
205        self
206    }
207    /// <p>Specifies the map tile style selected from a partner data provider.</p>
208    pub fn get_configuration(&self) -> &::std::option::Option<crate::types::MapConfiguration> {
209        &self.configuration
210    }
211    /// <p>The optional description for the map resource.</p>
212    /// This field is required.
213    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
214        self.description = ::std::option::Option::Some(input.into());
215        self
216    }
217    /// <p>The optional description for the map resource.</p>
218    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
219        self.description = input;
220        self
221    }
222    /// <p>The optional description for the map resource.</p>
223    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
224        &self.description
225    }
226    /// Adds a key-value pair to `tags`.
227    ///
228    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
229    ///
230    /// <p>Tags associated with the map resource.</p>
231    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
232        let mut hash_map = self.tags.unwrap_or_default();
233        hash_map.insert(k.into(), v.into());
234        self.tags = ::std::option::Option::Some(hash_map);
235        self
236    }
237    /// <p>Tags associated with the map resource.</p>
238    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
239        self.tags = input;
240        self
241    }
242    /// <p>Tags associated with the map resource.</p>
243    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
244        &self.tags
245    }
246    /// <p>The timestamp for when the map resource was created in <a href="https://www.iso.org/iso-8601-date-and-time-format.html">ISO 8601</a> format: <code>YYYY-MM-DDThh:mm:ss.sssZ</code>.</p>
247    /// This field is required.
248    pub fn create_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
249        self.create_time = ::std::option::Option::Some(input);
250        self
251    }
252    /// <p>The timestamp for when the map resource was created in <a href="https://www.iso.org/iso-8601-date-and-time-format.html">ISO 8601</a> format: <code>YYYY-MM-DDThh:mm:ss.sssZ</code>.</p>
253    pub fn set_create_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
254        self.create_time = input;
255        self
256    }
257    /// <p>The timestamp for when the map resource was created in <a href="https://www.iso.org/iso-8601-date-and-time-format.html">ISO 8601</a> format: <code>YYYY-MM-DDThh:mm:ss.sssZ</code>.</p>
258    pub fn get_create_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
259        &self.create_time
260    }
261    /// <p>The timestamp for when the map resource was last update in <a href="https://www.iso.org/iso-8601-date-and-time-format.html">ISO 8601</a> format: <code>YYYY-MM-DDThh:mm:ss.sssZ</code>.</p>
262    /// This field is required.
263    pub fn update_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
264        self.update_time = ::std::option::Option::Some(input);
265        self
266    }
267    /// <p>The timestamp for when the map resource was last update in <a href="https://www.iso.org/iso-8601-date-and-time-format.html">ISO 8601</a> format: <code>YYYY-MM-DDThh:mm:ss.sssZ</code>.</p>
268    pub fn set_update_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
269        self.update_time = input;
270        self
271    }
272    /// <p>The timestamp for when the map resource was last update in <a href="https://www.iso.org/iso-8601-date-and-time-format.html">ISO 8601</a> format: <code>YYYY-MM-DDThh:mm:ss.sssZ</code>.</p>
273    pub fn get_update_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
274        &self.update_time
275    }
276    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
277        self._request_id = Some(request_id.into());
278        self
279    }
280
281    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
282        self._request_id = request_id;
283        self
284    }
285    /// Consumes the builder and constructs a [`DescribeMapOutput`](crate::operation::describe_map::DescribeMapOutput).
286    /// This method will fail if any of the following fields are not set:
287    /// - [`map_name`](crate::operation::describe_map::builders::DescribeMapOutputBuilder::map_name)
288    /// - [`map_arn`](crate::operation::describe_map::builders::DescribeMapOutputBuilder::map_arn)
289    /// - [`data_source`](crate::operation::describe_map::builders::DescribeMapOutputBuilder::data_source)
290    /// - [`description`](crate::operation::describe_map::builders::DescribeMapOutputBuilder::description)
291    /// - [`create_time`](crate::operation::describe_map::builders::DescribeMapOutputBuilder::create_time)
292    /// - [`update_time`](crate::operation::describe_map::builders::DescribeMapOutputBuilder::update_time)
293    pub fn build(self) -> ::std::result::Result<crate::operation::describe_map::DescribeMapOutput, ::aws_smithy_types::error::operation::BuildError> {
294        ::std::result::Result::Ok(crate::operation::describe_map::DescribeMapOutput {
295            map_name: self.map_name.ok_or_else(|| {
296                ::aws_smithy_types::error::operation::BuildError::missing_field(
297                    "map_name",
298                    "map_name was not specified but it is required when building DescribeMapOutput",
299                )
300            })?,
301            map_arn: self.map_arn.ok_or_else(|| {
302                ::aws_smithy_types::error::operation::BuildError::missing_field(
303                    "map_arn",
304                    "map_arn was not specified but it is required when building DescribeMapOutput",
305                )
306            })?,
307            pricing_plan: self.pricing_plan,
308            data_source: self.data_source.ok_or_else(|| {
309                ::aws_smithy_types::error::operation::BuildError::missing_field(
310                    "data_source",
311                    "data_source was not specified but it is required when building DescribeMapOutput",
312                )
313            })?,
314            configuration: self.configuration,
315            description: self.description.ok_or_else(|| {
316                ::aws_smithy_types::error::operation::BuildError::missing_field(
317                    "description",
318                    "description was not specified but it is required when building DescribeMapOutput",
319                )
320            })?,
321            tags: self.tags,
322            create_time: self.create_time.ok_or_else(|| {
323                ::aws_smithy_types::error::operation::BuildError::missing_field(
324                    "create_time",
325                    "create_time was not specified but it is required when building DescribeMapOutput",
326                )
327            })?,
328            update_time: self.update_time.ok_or_else(|| {
329                ::aws_smithy_types::error::operation::BuildError::missing_field(
330                    "update_time",
331                    "update_time was not specified but it is required when building DescribeMapOutput",
332                )
333            })?,
334            _request_id: self._request_id,
335        })
336    }
337}
338impl ::std::fmt::Debug for DescribeMapOutputBuilder {
339    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
340        let mut formatter = f.debug_struct("DescribeMapOutputBuilder");
341        formatter.field("map_name", &self.map_name);
342        formatter.field("map_arn", &self.map_arn);
343        formatter.field("pricing_plan", &self.pricing_plan);
344        formatter.field("data_source", &self.data_source);
345        formatter.field("configuration", &self.configuration);
346        formatter.field("description", &self.description);
347        formatter.field("tags", &self.tags);
348        formatter.field("create_time", &"*** Sensitive Data Redacted ***");
349        formatter.field("update_time", &"*** Sensitive Data Redacted ***");
350        formatter.field("_request_id", &self._request_id);
351        formatter.finish()
352    }
353}