aws_sdk_dataexchange/operation/update_asset/
_update_asset_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 UpdateAssetOutput {
6    /// <p>The ARN for the asset.</p>
7    pub arn: ::std::option::Option<::std::string::String>,
8    /// <p>Details about the asset.</p>
9    pub asset_details: ::std::option::Option<crate::types::AssetDetails>,
10    /// <p>The type of asset that is added to a data set.</p>
11    pub asset_type: ::std::option::Option<crate::types::AssetType>,
12    /// <p>The date and time that the asset was created, in ISO 8601 format.</p>
13    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
14    /// <p>The unique identifier for the data set associated with this asset.</p>
15    pub data_set_id: ::std::option::Option<::std::string::String>,
16    /// <p>The unique identifier for the asset.</p>
17    pub id: ::std::option::Option<::std::string::String>,
18    /// <p>The name of the asset. When importing from Amazon S3, the Amazon S3 object key is used as the asset name. When exporting to Amazon S3, the asset name is used as default target Amazon S3 object key. When importing from Amazon API Gateway API, the API name is used as the asset name. When importing from Amazon Redshift, the datashare name is used as the asset name. When importing from AWS Lake Formation, the static values of "Database(s) included in the LF-tag policy"- or "Table(s) included in LF-tag policy" are used as the asset name.</p>
19    pub name: ::std::option::Option<::std::string::String>,
20    /// <p>The unique identifier for the revision associated with this asset.</p>
21    pub revision_id: ::std::option::Option<::std::string::String>,
22    /// <p>The asset ID of the owned asset corresponding to the entitled asset being viewed. This parameter is returned when an asset owner is viewing the entitled copy of its owned asset.</p>
23    pub source_id: ::std::option::Option<::std::string::String>,
24    /// <p>The date and time that the asset was last updated, in ISO 8601 format.</p>
25    pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
26    _request_id: Option<String>,
27}
28impl UpdateAssetOutput {
29    /// <p>The ARN for the asset.</p>
30    pub fn arn(&self) -> ::std::option::Option<&str> {
31        self.arn.as_deref()
32    }
33    /// <p>Details about the asset.</p>
34    pub fn asset_details(&self) -> ::std::option::Option<&crate::types::AssetDetails> {
35        self.asset_details.as_ref()
36    }
37    /// <p>The type of asset that is added to a data set.</p>
38    pub fn asset_type(&self) -> ::std::option::Option<&crate::types::AssetType> {
39        self.asset_type.as_ref()
40    }
41    /// <p>The date and time that the asset 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 this asset.</p>
46    pub fn data_set_id(&self) -> ::std::option::Option<&str> {
47        self.data_set_id.as_deref()
48    }
49    /// <p>The unique identifier for the asset.</p>
50    pub fn id(&self) -> ::std::option::Option<&str> {
51        self.id.as_deref()
52    }
53    /// <p>The name of the asset. When importing from Amazon S3, the Amazon S3 object key is used as the asset name. When exporting to Amazon S3, the asset name is used as default target Amazon S3 object key. When importing from Amazon API Gateway API, the API name is used as the asset name. When importing from Amazon Redshift, the datashare name is used as the asset name. When importing from AWS Lake Formation, the static values of "Database(s) included in the LF-tag policy"- or "Table(s) included in LF-tag policy" are used as the asset name.</p>
54    pub fn name(&self) -> ::std::option::Option<&str> {
55        self.name.as_deref()
56    }
57    /// <p>The unique identifier for the revision associated with this asset.</p>
58    pub fn revision_id(&self) -> ::std::option::Option<&str> {
59        self.revision_id.as_deref()
60    }
61    /// <p>The asset ID of the owned asset corresponding to the entitled asset being viewed. This parameter is returned when an asset owner is viewing the entitled copy of its owned asset.</p>
62    pub fn source_id(&self) -> ::std::option::Option<&str> {
63        self.source_id.as_deref()
64    }
65    /// <p>The date and time that the asset 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}
70impl ::aws_types::request_id::RequestId for UpdateAssetOutput {
71    fn request_id(&self) -> Option<&str> {
72        self._request_id.as_deref()
73    }
74}
75impl UpdateAssetOutput {
76    /// Creates a new builder-style object to manufacture [`UpdateAssetOutput`](crate::operation::update_asset::UpdateAssetOutput).
77    pub fn builder() -> crate::operation::update_asset::builders::UpdateAssetOutputBuilder {
78        crate::operation::update_asset::builders::UpdateAssetOutputBuilder::default()
79    }
80}
81
82/// A builder for [`UpdateAssetOutput`](crate::operation::update_asset::UpdateAssetOutput).
83#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
84#[non_exhaustive]
85pub struct UpdateAssetOutputBuilder {
86    pub(crate) arn: ::std::option::Option<::std::string::String>,
87    pub(crate) asset_details: ::std::option::Option<crate::types::AssetDetails>,
88    pub(crate) asset_type: ::std::option::Option<crate::types::AssetType>,
89    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
90    pub(crate) data_set_id: ::std::option::Option<::std::string::String>,
91    pub(crate) id: ::std::option::Option<::std::string::String>,
92    pub(crate) name: ::std::option::Option<::std::string::String>,
93    pub(crate) revision_id: ::std::option::Option<::std::string::String>,
94    pub(crate) source_id: ::std::option::Option<::std::string::String>,
95    pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
96    _request_id: Option<String>,
97}
98impl UpdateAssetOutputBuilder {
99    /// <p>The ARN for the asset.</p>
100    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101        self.arn = ::std::option::Option::Some(input.into());
102        self
103    }
104    /// <p>The ARN for the asset.</p>
105    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106        self.arn = input;
107        self
108    }
109    /// <p>The ARN for the asset.</p>
110    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
111        &self.arn
112    }
113    /// <p>Details about the asset.</p>
114    pub fn asset_details(mut self, input: crate::types::AssetDetails) -> Self {
115        self.asset_details = ::std::option::Option::Some(input);
116        self
117    }
118    /// <p>Details about the asset.</p>
119    pub fn set_asset_details(mut self, input: ::std::option::Option<crate::types::AssetDetails>) -> Self {
120        self.asset_details = input;
121        self
122    }
123    /// <p>Details about the asset.</p>
124    pub fn get_asset_details(&self) -> &::std::option::Option<crate::types::AssetDetails> {
125        &self.asset_details
126    }
127    /// <p>The type of asset that is added to a data set.</p>
128    pub fn asset_type(mut self, input: crate::types::AssetType) -> Self {
129        self.asset_type = ::std::option::Option::Some(input);
130        self
131    }
132    /// <p>The type of asset that is added to a data set.</p>
133    pub fn set_asset_type(mut self, input: ::std::option::Option<crate::types::AssetType>) -> Self {
134        self.asset_type = input;
135        self
136    }
137    /// <p>The type of asset that is added to a data set.</p>
138    pub fn get_asset_type(&self) -> &::std::option::Option<crate::types::AssetType> {
139        &self.asset_type
140    }
141    /// <p>The date and time that the asset 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 asset 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 asset 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 this asset.</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 this asset.</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 this asset.</p>
166    pub fn get_data_set_id(&self) -> &::std::option::Option<::std::string::String> {
167        &self.data_set_id
168    }
169    /// <p>The unique identifier for the asset.</p>
170    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
171        self.id = ::std::option::Option::Some(input.into());
172        self
173    }
174    /// <p>The unique identifier for the asset.</p>
175    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
176        self.id = input;
177        self
178    }
179    /// <p>The unique identifier for the asset.</p>
180    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
181        &self.id
182    }
183    /// <p>The name of the asset. When importing from Amazon S3, the Amazon S3 object key is used as the asset name. When exporting to Amazon S3, the asset name is used as default target Amazon S3 object key. When importing from Amazon API Gateway API, the API name is used as the asset name. When importing from Amazon Redshift, the datashare name is used as the asset name. When importing from AWS Lake Formation, the static values of "Database(s) included in the LF-tag policy"- or "Table(s) included in LF-tag policy" are used as the asset name.</p>
184    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
185        self.name = ::std::option::Option::Some(input.into());
186        self
187    }
188    /// <p>The name of the asset. When importing from Amazon S3, the Amazon S3 object key is used as the asset name. When exporting to Amazon S3, the asset name is used as default target Amazon S3 object key. When importing from Amazon API Gateway API, the API name is used as the asset name. When importing from Amazon Redshift, the datashare name is used as the asset name. When importing from AWS Lake Formation, the static values of "Database(s) included in the LF-tag policy"- or "Table(s) included in LF-tag policy" are used as the asset name.</p>
189    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
190        self.name = input;
191        self
192    }
193    /// <p>The name of the asset. When importing from Amazon S3, the Amazon S3 object key is used as the asset name. When exporting to Amazon S3, the asset name is used as default target Amazon S3 object key. When importing from Amazon API Gateway API, the API name is used as the asset name. When importing from Amazon Redshift, the datashare name is used as the asset name. When importing from AWS Lake Formation, the static values of "Database(s) included in the LF-tag policy"- or "Table(s) included in LF-tag policy" are used as the asset name.</p>
194    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
195        &self.name
196    }
197    /// <p>The unique identifier for the revision associated with this asset.</p>
198    pub fn revision_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
199        self.revision_id = ::std::option::Option::Some(input.into());
200        self
201    }
202    /// <p>The unique identifier for the revision associated with this asset.</p>
203    pub fn set_revision_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
204        self.revision_id = input;
205        self
206    }
207    /// <p>The unique identifier for the revision associated with this asset.</p>
208    pub fn get_revision_id(&self) -> &::std::option::Option<::std::string::String> {
209        &self.revision_id
210    }
211    /// <p>The asset ID of the owned asset corresponding to the entitled asset being viewed. This parameter is returned when an asset owner is viewing the entitled copy of its owned asset.</p>
212    pub fn source_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
213        self.source_id = ::std::option::Option::Some(input.into());
214        self
215    }
216    /// <p>The asset ID of the owned asset corresponding to the entitled asset being viewed. This parameter is returned when an asset owner is viewing the entitled copy of its owned asset.</p>
217    pub fn set_source_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
218        self.source_id = input;
219        self
220    }
221    /// <p>The asset ID of the owned asset corresponding to the entitled asset being viewed. This parameter is returned when an asset owner is viewing the entitled copy of its owned asset.</p>
222    pub fn get_source_id(&self) -> &::std::option::Option<::std::string::String> {
223        &self.source_id
224    }
225    /// <p>The date and time that the asset was last updated, in ISO 8601 format.</p>
226    pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
227        self.updated_at = ::std::option::Option::Some(input);
228        self
229    }
230    /// <p>The date and time that the asset was last updated, in ISO 8601 format.</p>
231    pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
232        self.updated_at = input;
233        self
234    }
235    /// <p>The date and time that the asset was last updated, in ISO 8601 format.</p>
236    pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
237        &self.updated_at
238    }
239    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
240        self._request_id = Some(request_id.into());
241        self
242    }
243
244    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
245        self._request_id = request_id;
246        self
247    }
248    /// Consumes the builder and constructs a [`UpdateAssetOutput`](crate::operation::update_asset::UpdateAssetOutput).
249    pub fn build(self) -> crate::operation::update_asset::UpdateAssetOutput {
250        crate::operation::update_asset::UpdateAssetOutput {
251            arn: self.arn,
252            asset_details: self.asset_details,
253            asset_type: self.asset_type,
254            created_at: self.created_at,
255            data_set_id: self.data_set_id,
256            id: self.id,
257            name: self.name,
258            revision_id: self.revision_id,
259            source_id: self.source_id,
260            updated_at: self.updated_at,
261            _request_id: self._request_id,
262        }
263    }
264}