aws_sdk_location/operation/update_map/
_update_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 UpdateMapOutput {
6    /// <p>The name of the updated map resource.</p>
7    pub map_name: ::std::string::String,
8    /// <p>The Amazon Resource Name (ARN) of the updated map resource. Used to specify a resource across AWS.</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>The timestamp for when the map resource was last updated 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>
15    pub update_time: ::aws_smithy_types::DateTime,
16    _request_id: Option<String>,
17}
18impl UpdateMapOutput {
19    /// <p>The name of the updated map resource.</p>
20    pub fn map_name(&self) -> &str {
21        use std::ops::Deref;
22        self.map_name.deref()
23    }
24    /// <p>The Amazon Resource Name (ARN) of the updated map resource. Used to specify a resource across AWS.</p>
25    /// <ul>
26    /// <li>
27    /// <p>Format example: <code>arn:aws:geo:region:account-id:map/ExampleMap</code></p></li>
28    /// </ul>
29    pub fn map_arn(&self) -> &str {
30        use std::ops::Deref;
31        self.map_arn.deref()
32    }
33    /// <p>The timestamp for when the map resource was last updated 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>
34    pub fn update_time(&self) -> &::aws_smithy_types::DateTime {
35        &self.update_time
36    }
37}
38impl ::std::fmt::Debug for UpdateMapOutput {
39    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
40        let mut formatter = f.debug_struct("UpdateMapOutput");
41        formatter.field("map_name", &self.map_name);
42        formatter.field("map_arn", &self.map_arn);
43        formatter.field("update_time", &"*** Sensitive Data Redacted ***");
44        formatter.field("_request_id", &self._request_id);
45        formatter.finish()
46    }
47}
48impl ::aws_types::request_id::RequestId for UpdateMapOutput {
49    fn request_id(&self) -> Option<&str> {
50        self._request_id.as_deref()
51    }
52}
53impl UpdateMapOutput {
54    /// Creates a new builder-style object to manufacture [`UpdateMapOutput`](crate::operation::update_map::UpdateMapOutput).
55    pub fn builder() -> crate::operation::update_map::builders::UpdateMapOutputBuilder {
56        crate::operation::update_map::builders::UpdateMapOutputBuilder::default()
57    }
58}
59
60/// A builder for [`UpdateMapOutput`](crate::operation::update_map::UpdateMapOutput).
61#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
62#[non_exhaustive]
63pub struct UpdateMapOutputBuilder {
64    pub(crate) map_name: ::std::option::Option<::std::string::String>,
65    pub(crate) map_arn: ::std::option::Option<::std::string::String>,
66    pub(crate) update_time: ::std::option::Option<::aws_smithy_types::DateTime>,
67    _request_id: Option<String>,
68}
69impl UpdateMapOutputBuilder {
70    /// <p>The name of the updated map resource.</p>
71    /// This field is required.
72    pub fn map_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73        self.map_name = ::std::option::Option::Some(input.into());
74        self
75    }
76    /// <p>The name of the updated map resource.</p>
77    pub fn set_map_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78        self.map_name = input;
79        self
80    }
81    /// <p>The name of the updated map resource.</p>
82    pub fn get_map_name(&self) -> &::std::option::Option<::std::string::String> {
83        &self.map_name
84    }
85    /// <p>The Amazon Resource Name (ARN) of the updated map resource. Used to specify a resource across AWS.</p>
86    /// <ul>
87    /// <li>
88    /// <p>Format example: <code>arn:aws:geo:region:account-id:map/ExampleMap</code></p></li>
89    /// </ul>
90    /// This field is required.
91    pub fn map_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
92        self.map_arn = ::std::option::Option::Some(input.into());
93        self
94    }
95    /// <p>The Amazon Resource Name (ARN) of the updated map resource. Used to specify a resource across AWS.</p>
96    /// <ul>
97    /// <li>
98    /// <p>Format example: <code>arn:aws:geo:region:account-id:map/ExampleMap</code></p></li>
99    /// </ul>
100    pub fn set_map_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101        self.map_arn = input;
102        self
103    }
104    /// <p>The Amazon Resource Name (ARN) of the updated map resource. Used to specify a resource across AWS.</p>
105    /// <ul>
106    /// <li>
107    /// <p>Format example: <code>arn:aws:geo:region:account-id:map/ExampleMap</code></p></li>
108    /// </ul>
109    pub fn get_map_arn(&self) -> &::std::option::Option<::std::string::String> {
110        &self.map_arn
111    }
112    /// <p>The timestamp for when the map resource was last updated 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>
113    /// This field is required.
114    pub fn update_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
115        self.update_time = ::std::option::Option::Some(input);
116        self
117    }
118    /// <p>The timestamp for when the map resource was last updated 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>
119    pub fn set_update_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
120        self.update_time = input;
121        self
122    }
123    /// <p>The timestamp for when the map resource was last updated 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>
124    pub fn get_update_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
125        &self.update_time
126    }
127    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
128        self._request_id = Some(request_id.into());
129        self
130    }
131
132    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
133        self._request_id = request_id;
134        self
135    }
136    /// Consumes the builder and constructs a [`UpdateMapOutput`](crate::operation::update_map::UpdateMapOutput).
137    /// This method will fail if any of the following fields are not set:
138    /// - [`map_name`](crate::operation::update_map::builders::UpdateMapOutputBuilder::map_name)
139    /// - [`map_arn`](crate::operation::update_map::builders::UpdateMapOutputBuilder::map_arn)
140    /// - [`update_time`](crate::operation::update_map::builders::UpdateMapOutputBuilder::update_time)
141    pub fn build(self) -> ::std::result::Result<crate::operation::update_map::UpdateMapOutput, ::aws_smithy_types::error::operation::BuildError> {
142        ::std::result::Result::Ok(crate::operation::update_map::UpdateMapOutput {
143            map_name: self.map_name.ok_or_else(|| {
144                ::aws_smithy_types::error::operation::BuildError::missing_field(
145                    "map_name",
146                    "map_name was not specified but it is required when building UpdateMapOutput",
147                )
148            })?,
149            map_arn: self.map_arn.ok_or_else(|| {
150                ::aws_smithy_types::error::operation::BuildError::missing_field(
151                    "map_arn",
152                    "map_arn was not specified but it is required when building UpdateMapOutput",
153                )
154            })?,
155            update_time: self.update_time.ok_or_else(|| {
156                ::aws_smithy_types::error::operation::BuildError::missing_field(
157                    "update_time",
158                    "update_time was not specified but it is required when building UpdateMapOutput",
159                )
160            })?,
161            _request_id: self._request_id,
162        })
163    }
164}
165impl ::std::fmt::Debug for UpdateMapOutputBuilder {
166    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
167        let mut formatter = f.debug_struct("UpdateMapOutputBuilder");
168        formatter.field("map_name", &self.map_name);
169        formatter.field("map_arn", &self.map_arn);
170        formatter.field("update_time", &"*** Sensitive Data Redacted ***");
171        formatter.field("_request_id", &self._request_id);
172        formatter.finish()
173    }
174}