aws_sdk_dataexchange/operation/update_revision/_update_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 UpdateRevisionOutput {
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 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 date and time that the revision was last updated, in ISO 8601 format.</p>
21 pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
22 /// <p>A required comment to inform subscribers of the reason their access to the revision was revoked.</p>
23 pub revocation_comment: ::std::option::Option<::std::string::String>,
24 /// <p>A status indicating that subscribers' access to the revision was revoked.</p>
25 pub revoked: bool,
26 /// <p>The date and time that the revision was revoked, in ISO 8601 format.</p>
27 pub revoked_at: ::std::option::Option<::aws_smithy_types::DateTime>,
28 _request_id: Option<String>,
29}
30impl UpdateRevisionOutput {
31 /// <p>The ARN for the revision.</p>
32 pub fn arn(&self) -> ::std::option::Option<&str> {
33 self.arn.as_deref()
34 }
35 /// <p>An optional comment about the revision.</p>
36 pub fn comment(&self) -> ::std::option::Option<&str> {
37 self.comment.as_deref()
38 }
39 /// <p>The date and time that the revision was created, in ISO 8601 format.</p>
40 pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
41 self.created_at.as_ref()
42 }
43 /// <p>The unique identifier for the data set associated with the data set revision.</p>
44 pub fn data_set_id(&self) -> ::std::option::Option<&str> {
45 self.data_set_id.as_deref()
46 }
47 /// <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 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>
48 pub fn finalized(&self) -> bool {
49 self.finalized
50 }
51 /// <p>The unique identifier for the revision.</p>
52 pub fn id(&self) -> ::std::option::Option<&str> {
53 self.id.as_deref()
54 }
55 /// <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>
56 pub fn source_id(&self) -> ::std::option::Option<&str> {
57 self.source_id.as_deref()
58 }
59 /// <p>The date and time that the revision was last updated, in ISO 8601 format.</p>
60 pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
61 self.updated_at.as_ref()
62 }
63 /// <p>A required comment to inform subscribers of the reason their access to the revision was revoked.</p>
64 pub fn revocation_comment(&self) -> ::std::option::Option<&str> {
65 self.revocation_comment.as_deref()
66 }
67 /// <p>A status indicating that subscribers' access to the revision was revoked.</p>
68 pub fn revoked(&self) -> bool {
69 self.revoked
70 }
71 /// <p>The date and time that the revision was revoked, in ISO 8601 format.</p>
72 pub fn revoked_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
73 self.revoked_at.as_ref()
74 }
75}
76impl ::aws_types::request_id::RequestId for UpdateRevisionOutput {
77 fn request_id(&self) -> Option<&str> {
78 self._request_id.as_deref()
79 }
80}
81impl UpdateRevisionOutput {
82 /// Creates a new builder-style object to manufacture [`UpdateRevisionOutput`](crate::operation::update_revision::UpdateRevisionOutput).
83 pub fn builder() -> crate::operation::update_revision::builders::UpdateRevisionOutputBuilder {
84 crate::operation::update_revision::builders::UpdateRevisionOutputBuilder::default()
85 }
86}
87
88/// A builder for [`UpdateRevisionOutput`](crate::operation::update_revision::UpdateRevisionOutput).
89#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
90#[non_exhaustive]
91pub struct UpdateRevisionOutputBuilder {
92 pub(crate) arn: ::std::option::Option<::std::string::String>,
93 pub(crate) comment: ::std::option::Option<::std::string::String>,
94 pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
95 pub(crate) data_set_id: ::std::option::Option<::std::string::String>,
96 pub(crate) finalized: ::std::option::Option<bool>,
97 pub(crate) id: ::std::option::Option<::std::string::String>,
98 pub(crate) source_id: ::std::option::Option<::std::string::String>,
99 pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
100 pub(crate) revocation_comment: ::std::option::Option<::std::string::String>,
101 pub(crate) revoked: ::std::option::Option<bool>,
102 pub(crate) revoked_at: ::std::option::Option<::aws_smithy_types::DateTime>,
103 _request_id: Option<String>,
104}
105impl UpdateRevisionOutputBuilder {
106 /// <p>The ARN for the revision.</p>
107 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108 self.arn = ::std::option::Option::Some(input.into());
109 self
110 }
111 /// <p>The ARN for the revision.</p>
112 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113 self.arn = input;
114 self
115 }
116 /// <p>The ARN for the revision.</p>
117 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
118 &self.arn
119 }
120 /// <p>An optional comment about the revision.</p>
121 pub fn comment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122 self.comment = ::std::option::Option::Some(input.into());
123 self
124 }
125 /// <p>An optional comment about the revision.</p>
126 pub fn set_comment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127 self.comment = input;
128 self
129 }
130 /// <p>An optional comment about the revision.</p>
131 pub fn get_comment(&self) -> &::std::option::Option<::std::string::String> {
132 &self.comment
133 }
134 /// <p>The date and time that the revision was created, in ISO 8601 format.</p>
135 pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
136 self.created_at = ::std::option::Option::Some(input);
137 self
138 }
139 /// <p>The date and time that the revision was created, in ISO 8601 format.</p>
140 pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
141 self.created_at = input;
142 self
143 }
144 /// <p>The date and time that the revision was created, in ISO 8601 format.</p>
145 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
146 &self.created_at
147 }
148 /// <p>The unique identifier for the data set associated with the data set revision.</p>
149 pub fn data_set_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150 self.data_set_id = ::std::option::Option::Some(input.into());
151 self
152 }
153 /// <p>The unique identifier for the data set associated with the data set revision.</p>
154 pub fn set_data_set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155 self.data_set_id = input;
156 self
157 }
158 /// <p>The unique identifier for the data set associated with the data set revision.</p>
159 pub fn get_data_set_id(&self) -> &::std::option::Option<::std::string::String> {
160 &self.data_set_id
161 }
162 /// <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 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>
163 pub fn finalized(mut self, input: bool) -> Self {
164 self.finalized = ::std::option::Option::Some(input);
165 self
166 }
167 /// <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 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>
168 pub fn set_finalized(mut self, input: ::std::option::Option<bool>) -> Self {
169 self.finalized = input;
170 self
171 }
172 /// <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 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>
173 pub fn get_finalized(&self) -> &::std::option::Option<bool> {
174 &self.finalized
175 }
176 /// <p>The unique identifier for the revision.</p>
177 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
178 self.id = ::std::option::Option::Some(input.into());
179 self
180 }
181 /// <p>The unique identifier for the revision.</p>
182 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
183 self.id = input;
184 self
185 }
186 /// <p>The unique identifier for the revision.</p>
187 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
188 &self.id
189 }
190 /// <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>
191 pub fn source_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
192 self.source_id = ::std::option::Option::Some(input.into());
193 self
194 }
195 /// <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>
196 pub fn set_source_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
197 self.source_id = input;
198 self
199 }
200 /// <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>
201 pub fn get_source_id(&self) -> &::std::option::Option<::std::string::String> {
202 &self.source_id
203 }
204 /// <p>The date and time that the revision was last updated, in ISO 8601 format.</p>
205 pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
206 self.updated_at = ::std::option::Option::Some(input);
207 self
208 }
209 /// <p>The date and time that the revision was last updated, in ISO 8601 format.</p>
210 pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
211 self.updated_at = input;
212 self
213 }
214 /// <p>The date and time that the revision was last updated, in ISO 8601 format.</p>
215 pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
216 &self.updated_at
217 }
218 /// <p>A required comment to inform subscribers of the reason their access to the revision was revoked.</p>
219 pub fn revocation_comment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
220 self.revocation_comment = ::std::option::Option::Some(input.into());
221 self
222 }
223 /// <p>A required comment to inform subscribers of the reason their access to the revision was revoked.</p>
224 pub fn set_revocation_comment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
225 self.revocation_comment = input;
226 self
227 }
228 /// <p>A required comment to inform subscribers of the reason their access to the revision was revoked.</p>
229 pub fn get_revocation_comment(&self) -> &::std::option::Option<::std::string::String> {
230 &self.revocation_comment
231 }
232 /// <p>A status indicating that subscribers' access to the revision was revoked.</p>
233 pub fn revoked(mut self, input: bool) -> Self {
234 self.revoked = ::std::option::Option::Some(input);
235 self
236 }
237 /// <p>A status indicating that subscribers' access to the revision was revoked.</p>
238 pub fn set_revoked(mut self, input: ::std::option::Option<bool>) -> Self {
239 self.revoked = input;
240 self
241 }
242 /// <p>A status indicating that subscribers' access to the revision was revoked.</p>
243 pub fn get_revoked(&self) -> &::std::option::Option<bool> {
244 &self.revoked
245 }
246 /// <p>The date and time that the revision was revoked, in ISO 8601 format.</p>
247 pub fn revoked_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
248 self.revoked_at = ::std::option::Option::Some(input);
249 self
250 }
251 /// <p>The date and time that the revision was revoked, in ISO 8601 format.</p>
252 pub fn set_revoked_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
253 self.revoked_at = input;
254 self
255 }
256 /// <p>The date and time that the revision was revoked, in ISO 8601 format.</p>
257 pub fn get_revoked_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
258 &self.revoked_at
259 }
260 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
261 self._request_id = Some(request_id.into());
262 self
263 }
264
265 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
266 self._request_id = request_id;
267 self
268 }
269 /// Consumes the builder and constructs a [`UpdateRevisionOutput`](crate::operation::update_revision::UpdateRevisionOutput).
270 pub fn build(self) -> crate::operation::update_revision::UpdateRevisionOutput {
271 crate::operation::update_revision::UpdateRevisionOutput {
272 arn: self.arn,
273 comment: self.comment,
274 created_at: self.created_at,
275 data_set_id: self.data_set_id,
276 finalized: self.finalized.unwrap_or_default(),
277 id: self.id,
278 source_id: self.source_id,
279 updated_at: self.updated_at,
280 revocation_comment: self.revocation_comment,
281 revoked: self.revoked.unwrap_or_default(),
282 revoked_at: self.revoked_at,
283 _request_id: self._request_id,
284 }
285 }
286}