aws_sdk_finspacedata/operation/update_dataset/
_update_dataset_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// The request for an UpdateDataset operation
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateDatasetInput {
7    /// <p>A token that ensures idempotency. This token expires in 10 minutes.</p>
8    pub client_token: ::std::option::Option<::std::string::String>,
9    /// <p>The unique identifier for the Dataset to update.</p>
10    pub dataset_id: ::std::option::Option<::std::string::String>,
11    /// <p>A display title for the Dataset.</p>
12    pub dataset_title: ::std::option::Option<::std::string::String>,
13    /// <p>The format in which the Dataset data is structured.</p>
14    /// <ul>
15    /// <li>
16    /// <p><code>TABULAR</code> – Data is structured in a tabular format.</p></li>
17    /// <li>
18    /// <p><code>NON_TABULAR</code> – Data is structured in a non-tabular format.</p></li>
19    /// </ul>
20    pub kind: ::std::option::Option<crate::types::DatasetKind>,
21    /// <p>A description for the Dataset.</p>
22    pub dataset_description: ::std::option::Option<::std::string::String>,
23    /// <p>The unique resource identifier for a Dataset.</p>
24    pub alias: ::std::option::Option<::std::string::String>,
25    /// <p>Definition for a schema on a tabular Dataset.</p>
26    pub schema_definition: ::std::option::Option<crate::types::SchemaUnion>,
27}
28impl UpdateDatasetInput {
29    /// <p>A token that ensures idempotency. This token expires in 10 minutes.</p>
30    pub fn client_token(&self) -> ::std::option::Option<&str> {
31        self.client_token.as_deref()
32    }
33    /// <p>The unique identifier for the Dataset to update.</p>
34    pub fn dataset_id(&self) -> ::std::option::Option<&str> {
35        self.dataset_id.as_deref()
36    }
37    /// <p>A display title for the Dataset.</p>
38    pub fn dataset_title(&self) -> ::std::option::Option<&str> {
39        self.dataset_title.as_deref()
40    }
41    /// <p>The format in which the Dataset data is structured.</p>
42    /// <ul>
43    /// <li>
44    /// <p><code>TABULAR</code> – Data is structured in a tabular format.</p></li>
45    /// <li>
46    /// <p><code>NON_TABULAR</code> – Data is structured in a non-tabular format.</p></li>
47    /// </ul>
48    pub fn kind(&self) -> ::std::option::Option<&crate::types::DatasetKind> {
49        self.kind.as_ref()
50    }
51    /// <p>A description for the Dataset.</p>
52    pub fn dataset_description(&self) -> ::std::option::Option<&str> {
53        self.dataset_description.as_deref()
54    }
55    /// <p>The unique resource identifier for a Dataset.</p>
56    pub fn alias(&self) -> ::std::option::Option<&str> {
57        self.alias.as_deref()
58    }
59    /// <p>Definition for a schema on a tabular Dataset.</p>
60    pub fn schema_definition(&self) -> ::std::option::Option<&crate::types::SchemaUnion> {
61        self.schema_definition.as_ref()
62    }
63}
64impl UpdateDatasetInput {
65    /// Creates a new builder-style object to manufacture [`UpdateDatasetInput`](crate::operation::update_dataset::UpdateDatasetInput).
66    pub fn builder() -> crate::operation::update_dataset::builders::UpdateDatasetInputBuilder {
67        crate::operation::update_dataset::builders::UpdateDatasetInputBuilder::default()
68    }
69}
70
71/// A builder for [`UpdateDatasetInput`](crate::operation::update_dataset::UpdateDatasetInput).
72#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
73#[non_exhaustive]
74pub struct UpdateDatasetInputBuilder {
75    pub(crate) client_token: ::std::option::Option<::std::string::String>,
76    pub(crate) dataset_id: ::std::option::Option<::std::string::String>,
77    pub(crate) dataset_title: ::std::option::Option<::std::string::String>,
78    pub(crate) kind: ::std::option::Option<crate::types::DatasetKind>,
79    pub(crate) dataset_description: ::std::option::Option<::std::string::String>,
80    pub(crate) alias: ::std::option::Option<::std::string::String>,
81    pub(crate) schema_definition: ::std::option::Option<crate::types::SchemaUnion>,
82}
83impl UpdateDatasetInputBuilder {
84    /// <p>A token that ensures idempotency. This token expires in 10 minutes.</p>
85    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
86        self.client_token = ::std::option::Option::Some(input.into());
87        self
88    }
89    /// <p>A token that ensures idempotency. This token expires in 10 minutes.</p>
90    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
91        self.client_token = input;
92        self
93    }
94    /// <p>A token that ensures idempotency. This token expires in 10 minutes.</p>
95    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
96        &self.client_token
97    }
98    /// <p>The unique identifier for the Dataset to update.</p>
99    /// This field is required.
100    pub fn dataset_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101        self.dataset_id = ::std::option::Option::Some(input.into());
102        self
103    }
104    /// <p>The unique identifier for the Dataset to update.</p>
105    pub fn set_dataset_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106        self.dataset_id = input;
107        self
108    }
109    /// <p>The unique identifier for the Dataset to update.</p>
110    pub fn get_dataset_id(&self) -> &::std::option::Option<::std::string::String> {
111        &self.dataset_id
112    }
113    /// <p>A display title for the Dataset.</p>
114    /// This field is required.
115    pub fn dataset_title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.dataset_title = ::std::option::Option::Some(input.into());
117        self
118    }
119    /// <p>A display title for the Dataset.</p>
120    pub fn set_dataset_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.dataset_title = input;
122        self
123    }
124    /// <p>A display title for the Dataset.</p>
125    pub fn get_dataset_title(&self) -> &::std::option::Option<::std::string::String> {
126        &self.dataset_title
127    }
128    /// <p>The format in which the Dataset data is structured.</p>
129    /// <ul>
130    /// <li>
131    /// <p><code>TABULAR</code> – Data is structured in a tabular format.</p></li>
132    /// <li>
133    /// <p><code>NON_TABULAR</code> – Data is structured in a non-tabular format.</p></li>
134    /// </ul>
135    /// This field is required.
136    pub fn kind(mut self, input: crate::types::DatasetKind) -> Self {
137        self.kind = ::std::option::Option::Some(input);
138        self
139    }
140    /// <p>The format in which the Dataset data is structured.</p>
141    /// <ul>
142    /// <li>
143    /// <p><code>TABULAR</code> – Data is structured in a tabular format.</p></li>
144    /// <li>
145    /// <p><code>NON_TABULAR</code> – Data is structured in a non-tabular format.</p></li>
146    /// </ul>
147    pub fn set_kind(mut self, input: ::std::option::Option<crate::types::DatasetKind>) -> Self {
148        self.kind = input;
149        self
150    }
151    /// <p>The format in which the Dataset data is structured.</p>
152    /// <ul>
153    /// <li>
154    /// <p><code>TABULAR</code> – Data is structured in a tabular format.</p></li>
155    /// <li>
156    /// <p><code>NON_TABULAR</code> – Data is structured in a non-tabular format.</p></li>
157    /// </ul>
158    pub fn get_kind(&self) -> &::std::option::Option<crate::types::DatasetKind> {
159        &self.kind
160    }
161    /// <p>A description for the Dataset.</p>
162    pub fn dataset_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
163        self.dataset_description = ::std::option::Option::Some(input.into());
164        self
165    }
166    /// <p>A description for the Dataset.</p>
167    pub fn set_dataset_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
168        self.dataset_description = input;
169        self
170    }
171    /// <p>A description for the Dataset.</p>
172    pub fn get_dataset_description(&self) -> &::std::option::Option<::std::string::String> {
173        &self.dataset_description
174    }
175    /// <p>The unique resource identifier for a Dataset.</p>
176    pub fn alias(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
177        self.alias = ::std::option::Option::Some(input.into());
178        self
179    }
180    /// <p>The unique resource identifier for a Dataset.</p>
181    pub fn set_alias(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
182        self.alias = input;
183        self
184    }
185    /// <p>The unique resource identifier for a Dataset.</p>
186    pub fn get_alias(&self) -> &::std::option::Option<::std::string::String> {
187        &self.alias
188    }
189    /// <p>Definition for a schema on a tabular Dataset.</p>
190    pub fn schema_definition(mut self, input: crate::types::SchemaUnion) -> Self {
191        self.schema_definition = ::std::option::Option::Some(input);
192        self
193    }
194    /// <p>Definition for a schema on a tabular Dataset.</p>
195    pub fn set_schema_definition(mut self, input: ::std::option::Option<crate::types::SchemaUnion>) -> Self {
196        self.schema_definition = input;
197        self
198    }
199    /// <p>Definition for a schema on a tabular Dataset.</p>
200    pub fn get_schema_definition(&self) -> &::std::option::Option<crate::types::SchemaUnion> {
201        &self.schema_definition
202    }
203    /// Consumes the builder and constructs a [`UpdateDatasetInput`](crate::operation::update_dataset::UpdateDatasetInput).
204    pub fn build(
205        self,
206    ) -> ::std::result::Result<crate::operation::update_dataset::UpdateDatasetInput, ::aws_smithy_types::error::operation::BuildError> {
207        ::std::result::Result::Ok(crate::operation::update_dataset::UpdateDatasetInput {
208            client_token: self.client_token,
209            dataset_id: self.dataset_id,
210            dataset_title: self.dataset_title,
211            kind: self.kind,
212            dataset_description: self.dataset_description,
213            alias: self.alias,
214            schema_definition: self.schema_definition,
215        })
216    }
217}