aws_sdk_dataexchange/operation/update_asset/_update_asset_input.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 UpdateAssetInput {
6 /// <p>The unique identifier for an asset.</p>
7 pub asset_id: ::std::option::Option<::std::string::String>,
8 /// <p>The unique identifier for a data set.</p>
9 pub data_set_id: ::std::option::Option<::std::string::String>,
10 /// <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 name.</p>
11 pub name: ::std::option::Option<::std::string::String>,
12 /// <p>The unique identifier for a revision.</p>
13 pub revision_id: ::std::option::Option<::std::string::String>,
14}
15impl UpdateAssetInput {
16 /// <p>The unique identifier for an asset.</p>
17 pub fn asset_id(&self) -> ::std::option::Option<&str> {
18 self.asset_id.as_deref()
19 }
20 /// <p>The unique identifier for a data set.</p>
21 pub fn data_set_id(&self) -> ::std::option::Option<&str> {
22 self.data_set_id.as_deref()
23 }
24 /// <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 name.</p>
25 pub fn name(&self) -> ::std::option::Option<&str> {
26 self.name.as_deref()
27 }
28 /// <p>The unique identifier for a revision.</p>
29 pub fn revision_id(&self) -> ::std::option::Option<&str> {
30 self.revision_id.as_deref()
31 }
32}
33impl UpdateAssetInput {
34 /// Creates a new builder-style object to manufacture [`UpdateAssetInput`](crate::operation::update_asset::UpdateAssetInput).
35 pub fn builder() -> crate::operation::update_asset::builders::UpdateAssetInputBuilder {
36 crate::operation::update_asset::builders::UpdateAssetInputBuilder::default()
37 }
38}
39
40/// A builder for [`UpdateAssetInput`](crate::operation::update_asset::UpdateAssetInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct UpdateAssetInputBuilder {
44 pub(crate) asset_id: ::std::option::Option<::std::string::String>,
45 pub(crate) data_set_id: ::std::option::Option<::std::string::String>,
46 pub(crate) name: ::std::option::Option<::std::string::String>,
47 pub(crate) revision_id: ::std::option::Option<::std::string::String>,
48}
49impl UpdateAssetInputBuilder {
50 /// <p>The unique identifier for an asset.</p>
51 /// This field is required.
52 pub fn asset_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.asset_id = ::std::option::Option::Some(input.into());
54 self
55 }
56 /// <p>The unique identifier for an asset.</p>
57 pub fn set_asset_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.asset_id = input;
59 self
60 }
61 /// <p>The unique identifier for an asset.</p>
62 pub fn get_asset_id(&self) -> &::std::option::Option<::std::string::String> {
63 &self.asset_id
64 }
65 /// <p>The unique identifier for a data set.</p>
66 /// This field is required.
67 pub fn data_set_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68 self.data_set_id = ::std::option::Option::Some(input.into());
69 self
70 }
71 /// <p>The unique identifier for a data set.</p>
72 pub fn set_data_set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73 self.data_set_id = input;
74 self
75 }
76 /// <p>The unique identifier for a data set.</p>
77 pub fn get_data_set_id(&self) -> &::std::option::Option<::std::string::String> {
78 &self.data_set_id
79 }
80 /// <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 name.</p>
81 /// This field is required.
82 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83 self.name = ::std::option::Option::Some(input.into());
84 self
85 }
86 /// <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 name.</p>
87 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88 self.name = input;
89 self
90 }
91 /// <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 name.</p>
92 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
93 &self.name
94 }
95 /// <p>The unique identifier for a revision.</p>
96 /// This field is required.
97 pub fn revision_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
98 self.revision_id = ::std::option::Option::Some(input.into());
99 self
100 }
101 /// <p>The unique identifier for a revision.</p>
102 pub fn set_revision_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
103 self.revision_id = input;
104 self
105 }
106 /// <p>The unique identifier for a revision.</p>
107 pub fn get_revision_id(&self) -> &::std::option::Option<::std::string::String> {
108 &self.revision_id
109 }
110 /// Consumes the builder and constructs a [`UpdateAssetInput`](crate::operation::update_asset::UpdateAssetInput).
111 pub fn build(self) -> ::std::result::Result<crate::operation::update_asset::UpdateAssetInput, ::aws_smithy_types::error::operation::BuildError> {
112 ::std::result::Result::Ok(crate::operation::update_asset::UpdateAssetInput {
113 asset_id: self.asset_id,
114 data_set_id: self.data_set_id,
115 name: self.name,
116 revision_id: self.revision_id,
117 })
118 }
119}