aws_sdk_location/operation/describe_map/
_describe_map_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct DescribeMapOutput {
6 pub map_name: ::std::string::String,
8 pub map_arn: ::std::string::String,
14 #[deprecated(note = "Deprecated. Always returns RequestBasedUsage.", since = "2022-02-01")]
16 pub pricing_plan: ::std::option::Option<crate::types::PricingPlan>,
17 pub data_source: ::std::string::String,
19 pub configuration: ::std::option::Option<crate::types::MapConfiguration>,
21 pub description: ::std::string::String,
23 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
25 pub create_time: ::aws_smithy_types::DateTime,
27 pub update_time: ::aws_smithy_types::DateTime,
29 _request_id: Option<String>,
30}
31impl DescribeMapOutput {
32 pub fn map_name(&self) -> &str {
34 use std::ops::Deref;
35 self.map_name.deref()
36 }
37 pub fn map_arn(&self) -> &str {
43 use std::ops::Deref;
44 self.map_arn.deref()
45 }
46 #[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 pub fn data_source(&self) -> &str {
53 use std::ops::Deref;
54 self.data_source.deref()
55 }
56 pub fn configuration(&self) -> ::std::option::Option<&crate::types::MapConfiguration> {
58 self.configuration.as_ref()
59 }
60 pub fn description(&self) -> &str {
62 use std::ops::Deref;
63 self.description.deref()
64 }
65 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
67 self.tags.as_ref()
68 }
69 pub fn create_time(&self) -> &::aws_smithy_types::DateTime {
71 &self.create_time
72 }
73 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 pub fn builder() -> crate::operation::describe_map::builders::DescribeMapOutputBuilder {
102 crate::operation::describe_map::builders::DescribeMapOutputBuilder::default()
103 }
104}
105
106#[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 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 pub fn set_map_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
130 self.map_name = input;
131 self
132 }
133 pub fn get_map_name(&self) -> &::std::option::Option<::std::string::String> {
135 &self.map_name
136 }
137 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 pub fn set_map_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
153 self.map_arn = input;
154 self
155 }
156 pub fn get_map_arn(&self) -> &::std::option::Option<::std::string::String> {
162 &self.map_arn
163 }
164 #[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 #[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 #[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 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 pub fn set_data_source(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
189 self.data_source = input;
190 self
191 }
192 pub fn get_data_source(&self) -> &::std::option::Option<::std::string::String> {
194 &self.data_source
195 }
196 pub fn configuration(mut self, input: crate::types::MapConfiguration) -> Self {
199 self.configuration = ::std::option::Option::Some(input);
200 self
201 }
202 pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::MapConfiguration>) -> Self {
204 self.configuration = input;
205 self
206 }
207 pub fn get_configuration(&self) -> &::std::option::Option<crate::types::MapConfiguration> {
209 &self.configuration
210 }
211 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 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
219 self.description = input;
220 self
221 }
222 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
224 &self.description
225 }
226 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 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 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
244 &self.tags
245 }
246 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 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 pub fn get_create_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
259 &self.create_time
260 }
261 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 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 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 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}