aws_sdk_dataexchange/operation/get_revision/
_get_revision_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetRevisionOutput {
6 pub arn: ::std::option::Option<::std::string::String>,
8 pub comment: ::std::option::Option<::std::string::String>,
10 pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
12 pub data_set_id: ::std::option::Option<::std::string::String>,
14 pub finalized: bool,
16 pub id: ::std::option::Option<::std::string::String>,
18 pub source_id: ::std::option::Option<::std::string::String>,
20 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
22 pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
24 pub revocation_comment: ::std::option::Option<::std::string::String>,
26 pub revoked: bool,
28 pub revoked_at: ::std::option::Option<::aws_smithy_types::DateTime>,
30 _request_id: Option<String>,
31}
32impl GetRevisionOutput {
33 pub fn arn(&self) -> ::std::option::Option<&str> {
35 self.arn.as_deref()
36 }
37 pub fn comment(&self) -> ::std::option::Option<&str> {
39 self.comment.as_deref()
40 }
41 pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
43 self.created_at.as_ref()
44 }
45 pub fn data_set_id(&self) -> ::std::option::Option<&str> {
47 self.data_set_id.as_deref()
48 }
49 pub fn finalized(&self) -> bool {
51 self.finalized
52 }
53 pub fn id(&self) -> ::std::option::Option<&str> {
55 self.id.as_deref()
56 }
57 pub fn source_id(&self) -> ::std::option::Option<&str> {
59 self.source_id.as_deref()
60 }
61 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
63 self.tags.as_ref()
64 }
65 pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
67 self.updated_at.as_ref()
68 }
69 pub fn revocation_comment(&self) -> ::std::option::Option<&str> {
71 self.revocation_comment.as_deref()
72 }
73 pub fn revoked(&self) -> bool {
75 self.revoked
76 }
77 pub fn revoked_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
79 self.revoked_at.as_ref()
80 }
81}
82impl ::aws_types::request_id::RequestId for GetRevisionOutput {
83 fn request_id(&self) -> Option<&str> {
84 self._request_id.as_deref()
85 }
86}
87impl GetRevisionOutput {
88 pub fn builder() -> crate::operation::get_revision::builders::GetRevisionOutputBuilder {
90 crate::operation::get_revision::builders::GetRevisionOutputBuilder::default()
91 }
92}
93
94#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
96#[non_exhaustive]
97pub struct GetRevisionOutputBuilder {
98 pub(crate) arn: ::std::option::Option<::std::string::String>,
99 pub(crate) comment: ::std::option::Option<::std::string::String>,
100 pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
101 pub(crate) data_set_id: ::std::option::Option<::std::string::String>,
102 pub(crate) finalized: ::std::option::Option<bool>,
103 pub(crate) id: ::std::option::Option<::std::string::String>,
104 pub(crate) source_id: ::std::option::Option<::std::string::String>,
105 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
106 pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
107 pub(crate) revocation_comment: ::std::option::Option<::std::string::String>,
108 pub(crate) revoked: ::std::option::Option<bool>,
109 pub(crate) revoked_at: ::std::option::Option<::aws_smithy_types::DateTime>,
110 _request_id: Option<String>,
111}
112impl GetRevisionOutputBuilder {
113 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115 self.arn = ::std::option::Option::Some(input.into());
116 self
117 }
118 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120 self.arn = input;
121 self
122 }
123 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
125 &self.arn
126 }
127 pub fn comment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129 self.comment = ::std::option::Option::Some(input.into());
130 self
131 }
132 pub fn set_comment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134 self.comment = input;
135 self
136 }
137 pub fn get_comment(&self) -> &::std::option::Option<::std::string::String> {
139 &self.comment
140 }
141 pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
143 self.created_at = ::std::option::Option::Some(input);
144 self
145 }
146 pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
148 self.created_at = input;
149 self
150 }
151 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
153 &self.created_at
154 }
155 pub fn data_set_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
157 self.data_set_id = ::std::option::Option::Some(input.into());
158 self
159 }
160 pub fn set_data_set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
162 self.data_set_id = input;
163 self
164 }
165 pub fn get_data_set_id(&self) -> &::std::option::Option<::std::string::String> {
167 &self.data_set_id
168 }
169 pub fn finalized(mut self, input: bool) -> Self {
171 self.finalized = ::std::option::Option::Some(input);
172 self
173 }
174 pub fn set_finalized(mut self, input: ::std::option::Option<bool>) -> Self {
176 self.finalized = input;
177 self
178 }
179 pub fn get_finalized(&self) -> &::std::option::Option<bool> {
181 &self.finalized
182 }
183 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
185 self.id = ::std::option::Option::Some(input.into());
186 self
187 }
188 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
190 self.id = input;
191 self
192 }
193 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
195 &self.id
196 }
197 pub fn source_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
199 self.source_id = ::std::option::Option::Some(input.into());
200 self
201 }
202 pub fn set_source_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
204 self.source_id = input;
205 self
206 }
207 pub fn get_source_id(&self) -> &::std::option::Option<::std::string::String> {
209 &self.source_id
210 }
211 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
217 let mut hash_map = self.tags.unwrap_or_default();
218 hash_map.insert(k.into(), v.into());
219 self.tags = ::std::option::Option::Some(hash_map);
220 self
221 }
222 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
224 self.tags = input;
225 self
226 }
227 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
229 &self.tags
230 }
231 pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
233 self.updated_at = ::std::option::Option::Some(input);
234 self
235 }
236 pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
238 self.updated_at = input;
239 self
240 }
241 pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
243 &self.updated_at
244 }
245 pub fn revocation_comment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
247 self.revocation_comment = ::std::option::Option::Some(input.into());
248 self
249 }
250 pub fn set_revocation_comment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
252 self.revocation_comment = input;
253 self
254 }
255 pub fn get_revocation_comment(&self) -> &::std::option::Option<::std::string::String> {
257 &self.revocation_comment
258 }
259 pub fn revoked(mut self, input: bool) -> Self {
261 self.revoked = ::std::option::Option::Some(input);
262 self
263 }
264 pub fn set_revoked(mut self, input: ::std::option::Option<bool>) -> Self {
266 self.revoked = input;
267 self
268 }
269 pub fn get_revoked(&self) -> &::std::option::Option<bool> {
271 &self.revoked
272 }
273 pub fn revoked_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
275 self.revoked_at = ::std::option::Option::Some(input);
276 self
277 }
278 pub fn set_revoked_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
280 self.revoked_at = input;
281 self
282 }
283 pub fn get_revoked_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
285 &self.revoked_at
286 }
287 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
288 self._request_id = Some(request_id.into());
289 self
290 }
291
292 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
293 self._request_id = request_id;
294 self
295 }
296 pub fn build(self) -> crate::operation::get_revision::GetRevisionOutput {
298 crate::operation::get_revision::GetRevisionOutput {
299 arn: self.arn,
300 comment: self.comment,
301 created_at: self.created_at,
302 data_set_id: self.data_set_id,
303 finalized: self.finalized.unwrap_or_default(),
304 id: self.id,
305 source_id: self.source_id,
306 tags: self.tags,
307 updated_at: self.updated_at,
308 revocation_comment: self.revocation_comment,
309 revoked: self.revoked.unwrap_or_default(),
310 revoked_at: self.revoked_at,
311 _request_id: self._request_id,
312 }
313 }
314}