aws_sdk_dataexchange/operation/get_revision/
_get_revision_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, ::std::fmt::Debug)]
5pub struct GetRevisionOutput {
6    /// <p>The ARN for the revision.</p>
7    pub arn: ::std::option::Option<::std::string::String>,
8    /// <p>An optional comment about the revision.</p>
9    pub comment: ::std::option::Option<::std::string::String>,
10    /// <p>The date and time that the revision was created, in ISO 8601 format.</p>
11    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
12    /// <p>The unique identifier for the data set associated with the data set revision.</p>
13    pub data_set_id: ::std::option::Option<::std::string::String>,
14    /// <p>To publish a revision to a data set in a product, the revision must first be finalized. Finalizing a revision tells AWS Data Exchange that your changes to the assets in the revision are complete. After it's in this read-only state, you can publish the revision to your products. Finalized revisions can be published through the AWS Data Exchange console or the AWS Marketplace Catalog API, using the StartChangeSet AWS Marketplace Catalog API action. When using the API, revisions are uniquely identified by their ARN.</p>
15    pub finalized: bool,
16    /// <p>The unique identifier for the revision.</p>
17    pub id: ::std::option::Option<::std::string::String>,
18    /// <p>The revision ID of the owned revision corresponding to the entitled revision being viewed. This parameter is returned when a revision owner is viewing the entitled copy of its owned revision.</p>
19    pub source_id: ::std::option::Option<::std::string::String>,
20    /// <p>The tags for the revision.</p>
21    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
22    /// <p>The date and time that the revision was last updated, in ISO 8601 format.</p>
23    pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
24    /// <p>A required comment to inform subscribers of the reason their access to the revision was revoked.</p>
25    pub revocation_comment: ::std::option::Option<::std::string::String>,
26    /// <p>A status indicating that subscribers' access to the revision was revoked.</p>
27    pub revoked: bool,
28    /// <p>The date and time that the revision was revoked, in ISO 8601 format.</p>
29    pub revoked_at: ::std::option::Option<::aws_smithy_types::DateTime>,
30    _request_id: Option<String>,
31}
32impl GetRevisionOutput {
33    /// <p>The ARN for the revision.</p>
34    pub fn arn(&self) -> ::std::option::Option<&str> {
35        self.arn.as_deref()
36    }
37    /// <p>An optional comment about the revision.</p>
38    pub fn comment(&self) -> ::std::option::Option<&str> {
39        self.comment.as_deref()
40    }
41    /// <p>The date and time that the revision was created, in ISO 8601 format.</p>
42    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
43        self.created_at.as_ref()
44    }
45    /// <p>The unique identifier for the data set associated with the data set revision.</p>
46    pub fn data_set_id(&self) -> ::std::option::Option<&str> {
47        self.data_set_id.as_deref()
48    }
49    /// <p>To publish a revision to a data set in a product, the revision must first be finalized. Finalizing a revision tells AWS Data Exchange that your changes to the assets in the revision are complete. After it's in this read-only state, you can publish the revision to your products. Finalized revisions can be published through the AWS Data Exchange console or the AWS Marketplace Catalog API, using the StartChangeSet AWS Marketplace Catalog API action. When using the API, revisions are uniquely identified by their ARN.</p>
50    pub fn finalized(&self) -> bool {
51        self.finalized
52    }
53    /// <p>The unique identifier for the revision.</p>
54    pub fn id(&self) -> ::std::option::Option<&str> {
55        self.id.as_deref()
56    }
57    /// <p>The revision ID of the owned revision corresponding to the entitled revision being viewed. This parameter is returned when a revision owner is viewing the entitled copy of its owned revision.</p>
58    pub fn source_id(&self) -> ::std::option::Option<&str> {
59        self.source_id.as_deref()
60    }
61    /// <p>The tags for the revision.</p>
62    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
63        self.tags.as_ref()
64    }
65    /// <p>The date and time that the revision was last updated, in ISO 8601 format.</p>
66    pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
67        self.updated_at.as_ref()
68    }
69    /// <p>A required comment to inform subscribers of the reason their access to the revision was revoked.</p>
70    pub fn revocation_comment(&self) -> ::std::option::Option<&str> {
71        self.revocation_comment.as_deref()
72    }
73    /// <p>A status indicating that subscribers' access to the revision was revoked.</p>
74    pub fn revoked(&self) -> bool {
75        self.revoked
76    }
77    /// <p>The date and time that the revision was revoked, in ISO 8601 format.</p>
78    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    /// Creates a new builder-style object to manufacture [`GetRevisionOutput`](crate::operation::get_revision::GetRevisionOutput).
89    pub fn builder() -> crate::operation::get_revision::builders::GetRevisionOutputBuilder {
90        crate::operation::get_revision::builders::GetRevisionOutputBuilder::default()
91    }
92}
93
94/// A builder for [`GetRevisionOutput`](crate::operation::get_revision::GetRevisionOutput).
95#[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    /// <p>The ARN for the revision.</p>
114    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    /// <p>The ARN for the revision.</p>
119    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.arn = input;
121        self
122    }
123    /// <p>The ARN for the revision.</p>
124    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
125        &self.arn
126    }
127    /// <p>An optional comment about the revision.</p>
128    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    /// <p>An optional comment about the revision.</p>
133    pub fn set_comment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.comment = input;
135        self
136    }
137    /// <p>An optional comment about the revision.</p>
138    pub fn get_comment(&self) -> &::std::option::Option<::std::string::String> {
139        &self.comment
140    }
141    /// <p>The date and time that the revision was created, in ISO 8601 format.</p>
142    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    /// <p>The date and time that the revision was created, in ISO 8601 format.</p>
147    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    /// <p>The date and time that the revision was created, in ISO 8601 format.</p>
152    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
153        &self.created_at
154    }
155    /// <p>The unique identifier for the data set associated with the data set revision.</p>
156    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    /// <p>The unique identifier for the data set associated with the data set revision.</p>
161    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    /// <p>The unique identifier for the data set associated with the data set revision.</p>
166    pub fn get_data_set_id(&self) -> &::std::option::Option<::std::string::String> {
167        &self.data_set_id
168    }
169    /// <p>To publish a revision to a data set in a product, the revision must first be finalized. Finalizing a revision tells AWS Data Exchange that your changes to the assets in the revision are complete. After it's in this read-only state, you can publish the revision to your products. Finalized revisions can be published through the AWS Data Exchange console or the AWS Marketplace Catalog API, using the StartChangeSet AWS Marketplace Catalog API action. When using the API, revisions are uniquely identified by their ARN.</p>
170    pub fn finalized(mut self, input: bool) -> Self {
171        self.finalized = ::std::option::Option::Some(input);
172        self
173    }
174    /// <p>To publish a revision to a data set in a product, the revision must first be finalized. Finalizing a revision tells AWS Data Exchange that your changes to the assets in the revision are complete. After it's in this read-only state, you can publish the revision to your products. Finalized revisions can be published through the AWS Data Exchange console or the AWS Marketplace Catalog API, using the StartChangeSet AWS Marketplace Catalog API action. When using the API, revisions are uniquely identified by their ARN.</p>
175    pub fn set_finalized(mut self, input: ::std::option::Option<bool>) -> Self {
176        self.finalized = input;
177        self
178    }
179    /// <p>To publish a revision to a data set in a product, the revision must first be finalized. Finalizing a revision tells AWS Data Exchange that your changes to the assets in the revision are complete. After it's in this read-only state, you can publish the revision to your products. Finalized revisions can be published through the AWS Data Exchange console or the AWS Marketplace Catalog API, using the StartChangeSet AWS Marketplace Catalog API action. When using the API, revisions are uniquely identified by their ARN.</p>
180    pub fn get_finalized(&self) -> &::std::option::Option<bool> {
181        &self.finalized
182    }
183    /// <p>The unique identifier for the revision.</p>
184    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    /// <p>The unique identifier for the revision.</p>
189    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
190        self.id = input;
191        self
192    }
193    /// <p>The unique identifier for the revision.</p>
194    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
195        &self.id
196    }
197    /// <p>The revision ID of the owned revision corresponding to the entitled revision being viewed. This parameter is returned when a revision owner is viewing the entitled copy of its owned revision.</p>
198    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    /// <p>The revision ID of the owned revision corresponding to the entitled revision being viewed. This parameter is returned when a revision owner is viewing the entitled copy of its owned revision.</p>
203    pub fn set_source_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
204        self.source_id = input;
205        self
206    }
207    /// <p>The revision ID of the owned revision corresponding to the entitled revision being viewed. This parameter is returned when a revision owner is viewing the entitled copy of its owned revision.</p>
208    pub fn get_source_id(&self) -> &::std::option::Option<::std::string::String> {
209        &self.source_id
210    }
211    /// Adds a key-value pair to `tags`.
212    ///
213    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
214    ///
215    /// <p>The tags for the revision.</p>
216    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    /// <p>The tags for the revision.</p>
223    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    /// <p>The tags for the revision.</p>
228    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
229        &self.tags
230    }
231    /// <p>The date and time that the revision was last updated, in ISO 8601 format.</p>
232    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    /// <p>The date and time that the revision was last updated, in ISO 8601 format.</p>
237    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    /// <p>The date and time that the revision was last updated, in ISO 8601 format.</p>
242    pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
243        &self.updated_at
244    }
245    /// <p>A required comment to inform subscribers of the reason their access to the revision was revoked.</p>
246    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    /// <p>A required comment to inform subscribers of the reason their access to the revision was revoked.</p>
251    pub fn set_revocation_comment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
252        self.revocation_comment = input;
253        self
254    }
255    /// <p>A required comment to inform subscribers of the reason their access to the revision was revoked.</p>
256    pub fn get_revocation_comment(&self) -> &::std::option::Option<::std::string::String> {
257        &self.revocation_comment
258    }
259    /// <p>A status indicating that subscribers' access to the revision was revoked.</p>
260    pub fn revoked(mut self, input: bool) -> Self {
261        self.revoked = ::std::option::Option::Some(input);
262        self
263    }
264    /// <p>A status indicating that subscribers' access to the revision was revoked.</p>
265    pub fn set_revoked(mut self, input: ::std::option::Option<bool>) -> Self {
266        self.revoked = input;
267        self
268    }
269    /// <p>A status indicating that subscribers' access to the revision was revoked.</p>
270    pub fn get_revoked(&self) -> &::std::option::Option<bool> {
271        &self.revoked
272    }
273    /// <p>The date and time that the revision was revoked, in ISO 8601 format.</p>
274    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    /// <p>The date and time that the revision was revoked, in ISO 8601 format.</p>
279    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    /// <p>The date and time that the revision was revoked, in ISO 8601 format.</p>
284    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    /// Consumes the builder and constructs a [`GetRevisionOutput`](crate::operation::get_revision::GetRevisionOutput).
297    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}