aws_sdk_glue/operation/update_table/
_update_table_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 UpdateTableInput {
6    /// <p>The ID of the Data Catalog where the table resides. If none is provided, the Amazon Web Services account ID is used by default.</p>
7    pub catalog_id: ::std::option::Option<::std::string::String>,
8    /// <p>The name of the catalog database in which the table resides. For Hive compatibility, this name is entirely lowercase.</p>
9    pub database_name: ::std::option::Option<::std::string::String>,
10    /// <p>The unique identifier for the table within the specified database that will be created in the Glue Data Catalog.</p>
11    pub name: ::std::option::Option<::std::string::String>,
12    /// <p>An updated <code>TableInput</code> object to define the metadata table in the catalog.</p>
13    pub table_input: ::std::option::Option<crate::types::TableInput>,
14    /// <p>By default, <code>UpdateTable</code> always creates an archived version of the table before updating it. However, if <code>skipArchive</code> is set to true, <code>UpdateTable</code> does not create the archived version.</p>
15    pub skip_archive: ::std::option::Option<bool>,
16    /// <p>The transaction ID at which to update the table contents.</p>
17    pub transaction_id: ::std::option::Option<::std::string::String>,
18    /// <p>The version ID at which to update the table contents.</p>
19    pub version_id: ::std::option::Option<::std::string::String>,
20    /// <p>The operation to be performed when updating the view.</p>
21    pub view_update_action: ::std::option::Option<crate::types::ViewUpdateAction>,
22    /// <p>A flag that can be set to true to ignore matching storage descriptor and subobject matching requirements.</p>
23    pub force: ::std::option::Option<bool>,
24    /// <p>Input parameters for updating open table format tables in GlueData Catalog, serving as a wrapper for format-specific update operations such as Apache Iceberg.</p>
25    pub update_open_table_format_input: ::std::option::Option<crate::types::UpdateOpenTableFormatInput>,
26}
27impl UpdateTableInput {
28    /// <p>The ID of the Data Catalog where the table resides. If none is provided, the Amazon Web Services account ID is used by default.</p>
29    pub fn catalog_id(&self) -> ::std::option::Option<&str> {
30        self.catalog_id.as_deref()
31    }
32    /// <p>The name of the catalog database in which the table resides. For Hive compatibility, this name is entirely lowercase.</p>
33    pub fn database_name(&self) -> ::std::option::Option<&str> {
34        self.database_name.as_deref()
35    }
36    /// <p>The unique identifier for the table within the specified database that will be created in the Glue Data Catalog.</p>
37    pub fn name(&self) -> ::std::option::Option<&str> {
38        self.name.as_deref()
39    }
40    /// <p>An updated <code>TableInput</code> object to define the metadata table in the catalog.</p>
41    pub fn table_input(&self) -> ::std::option::Option<&crate::types::TableInput> {
42        self.table_input.as_ref()
43    }
44    /// <p>By default, <code>UpdateTable</code> always creates an archived version of the table before updating it. However, if <code>skipArchive</code> is set to true, <code>UpdateTable</code> does not create the archived version.</p>
45    pub fn skip_archive(&self) -> ::std::option::Option<bool> {
46        self.skip_archive
47    }
48    /// <p>The transaction ID at which to update the table contents.</p>
49    pub fn transaction_id(&self) -> ::std::option::Option<&str> {
50        self.transaction_id.as_deref()
51    }
52    /// <p>The version ID at which to update the table contents.</p>
53    pub fn version_id(&self) -> ::std::option::Option<&str> {
54        self.version_id.as_deref()
55    }
56    /// <p>The operation to be performed when updating the view.</p>
57    pub fn view_update_action(&self) -> ::std::option::Option<&crate::types::ViewUpdateAction> {
58        self.view_update_action.as_ref()
59    }
60    /// <p>A flag that can be set to true to ignore matching storage descriptor and subobject matching requirements.</p>
61    pub fn force(&self) -> ::std::option::Option<bool> {
62        self.force
63    }
64    /// <p>Input parameters for updating open table format tables in GlueData Catalog, serving as a wrapper for format-specific update operations such as Apache Iceberg.</p>
65    pub fn update_open_table_format_input(&self) -> ::std::option::Option<&crate::types::UpdateOpenTableFormatInput> {
66        self.update_open_table_format_input.as_ref()
67    }
68}
69impl UpdateTableInput {
70    /// Creates a new builder-style object to manufacture [`UpdateTableInput`](crate::operation::update_table::UpdateTableInput).
71    pub fn builder() -> crate::operation::update_table::builders::UpdateTableInputBuilder {
72        crate::operation::update_table::builders::UpdateTableInputBuilder::default()
73    }
74}
75
76/// A builder for [`UpdateTableInput`](crate::operation::update_table::UpdateTableInput).
77#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
78#[non_exhaustive]
79pub struct UpdateTableInputBuilder {
80    pub(crate) catalog_id: ::std::option::Option<::std::string::String>,
81    pub(crate) database_name: ::std::option::Option<::std::string::String>,
82    pub(crate) name: ::std::option::Option<::std::string::String>,
83    pub(crate) table_input: ::std::option::Option<crate::types::TableInput>,
84    pub(crate) skip_archive: ::std::option::Option<bool>,
85    pub(crate) transaction_id: ::std::option::Option<::std::string::String>,
86    pub(crate) version_id: ::std::option::Option<::std::string::String>,
87    pub(crate) view_update_action: ::std::option::Option<crate::types::ViewUpdateAction>,
88    pub(crate) force: ::std::option::Option<bool>,
89    pub(crate) update_open_table_format_input: ::std::option::Option<crate::types::UpdateOpenTableFormatInput>,
90}
91impl UpdateTableInputBuilder {
92    /// <p>The ID of the Data Catalog where the table resides. If none is provided, the Amazon Web Services account ID is used by default.</p>
93    pub fn catalog_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94        self.catalog_id = ::std::option::Option::Some(input.into());
95        self
96    }
97    /// <p>The ID of the Data Catalog where the table resides. If none is provided, the Amazon Web Services account ID is used by default.</p>
98    pub fn set_catalog_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99        self.catalog_id = input;
100        self
101    }
102    /// <p>The ID of the Data Catalog where the table resides. If none is provided, the Amazon Web Services account ID is used by default.</p>
103    pub fn get_catalog_id(&self) -> &::std::option::Option<::std::string::String> {
104        &self.catalog_id
105    }
106    /// <p>The name of the catalog database in which the table resides. For Hive compatibility, this name is entirely lowercase.</p>
107    /// This field is required.
108    pub fn database_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
109        self.database_name = ::std::option::Option::Some(input.into());
110        self
111    }
112    /// <p>The name of the catalog database in which the table resides. For Hive compatibility, this name is entirely lowercase.</p>
113    pub fn set_database_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
114        self.database_name = input;
115        self
116    }
117    /// <p>The name of the catalog database in which the table resides. For Hive compatibility, this name is entirely lowercase.</p>
118    pub fn get_database_name(&self) -> &::std::option::Option<::std::string::String> {
119        &self.database_name
120    }
121    /// <p>The unique identifier for the table within the specified database that will be created in the Glue Data Catalog.</p>
122    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123        self.name = ::std::option::Option::Some(input.into());
124        self
125    }
126    /// <p>The unique identifier for the table within the specified database that will be created in the Glue Data Catalog.</p>
127    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128        self.name = input;
129        self
130    }
131    /// <p>The unique identifier for the table within the specified database that will be created in the Glue Data Catalog.</p>
132    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
133        &self.name
134    }
135    /// <p>An updated <code>TableInput</code> object to define the metadata table in the catalog.</p>
136    pub fn table_input(mut self, input: crate::types::TableInput) -> Self {
137        self.table_input = ::std::option::Option::Some(input);
138        self
139    }
140    /// <p>An updated <code>TableInput</code> object to define the metadata table in the catalog.</p>
141    pub fn set_table_input(mut self, input: ::std::option::Option<crate::types::TableInput>) -> Self {
142        self.table_input = input;
143        self
144    }
145    /// <p>An updated <code>TableInput</code> object to define the metadata table in the catalog.</p>
146    pub fn get_table_input(&self) -> &::std::option::Option<crate::types::TableInput> {
147        &self.table_input
148    }
149    /// <p>By default, <code>UpdateTable</code> always creates an archived version of the table before updating it. However, if <code>skipArchive</code> is set to true, <code>UpdateTable</code> does not create the archived version.</p>
150    pub fn skip_archive(mut self, input: bool) -> Self {
151        self.skip_archive = ::std::option::Option::Some(input);
152        self
153    }
154    /// <p>By default, <code>UpdateTable</code> always creates an archived version of the table before updating it. However, if <code>skipArchive</code> is set to true, <code>UpdateTable</code> does not create the archived version.</p>
155    pub fn set_skip_archive(mut self, input: ::std::option::Option<bool>) -> Self {
156        self.skip_archive = input;
157        self
158    }
159    /// <p>By default, <code>UpdateTable</code> always creates an archived version of the table before updating it. However, if <code>skipArchive</code> is set to true, <code>UpdateTable</code> does not create the archived version.</p>
160    pub fn get_skip_archive(&self) -> &::std::option::Option<bool> {
161        &self.skip_archive
162    }
163    /// <p>The transaction ID at which to update the table contents.</p>
164    pub fn transaction_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
165        self.transaction_id = ::std::option::Option::Some(input.into());
166        self
167    }
168    /// <p>The transaction ID at which to update the table contents.</p>
169    pub fn set_transaction_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
170        self.transaction_id = input;
171        self
172    }
173    /// <p>The transaction ID at which to update the table contents.</p>
174    pub fn get_transaction_id(&self) -> &::std::option::Option<::std::string::String> {
175        &self.transaction_id
176    }
177    /// <p>The version ID at which to update the table contents.</p>
178    pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
179        self.version_id = ::std::option::Option::Some(input.into());
180        self
181    }
182    /// <p>The version ID at which to update the table contents.</p>
183    pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
184        self.version_id = input;
185        self
186    }
187    /// <p>The version ID at which to update the table contents.</p>
188    pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
189        &self.version_id
190    }
191    /// <p>The operation to be performed when updating the view.</p>
192    pub fn view_update_action(mut self, input: crate::types::ViewUpdateAction) -> Self {
193        self.view_update_action = ::std::option::Option::Some(input);
194        self
195    }
196    /// <p>The operation to be performed when updating the view.</p>
197    pub fn set_view_update_action(mut self, input: ::std::option::Option<crate::types::ViewUpdateAction>) -> Self {
198        self.view_update_action = input;
199        self
200    }
201    /// <p>The operation to be performed when updating the view.</p>
202    pub fn get_view_update_action(&self) -> &::std::option::Option<crate::types::ViewUpdateAction> {
203        &self.view_update_action
204    }
205    /// <p>A flag that can be set to true to ignore matching storage descriptor and subobject matching requirements.</p>
206    pub fn force(mut self, input: bool) -> Self {
207        self.force = ::std::option::Option::Some(input);
208        self
209    }
210    /// <p>A flag that can be set to true to ignore matching storage descriptor and subobject matching requirements.</p>
211    pub fn set_force(mut self, input: ::std::option::Option<bool>) -> Self {
212        self.force = input;
213        self
214    }
215    /// <p>A flag that can be set to true to ignore matching storage descriptor and subobject matching requirements.</p>
216    pub fn get_force(&self) -> &::std::option::Option<bool> {
217        &self.force
218    }
219    /// <p>Input parameters for updating open table format tables in GlueData Catalog, serving as a wrapper for format-specific update operations such as Apache Iceberg.</p>
220    pub fn update_open_table_format_input(mut self, input: crate::types::UpdateOpenTableFormatInput) -> Self {
221        self.update_open_table_format_input = ::std::option::Option::Some(input);
222        self
223    }
224    /// <p>Input parameters for updating open table format tables in GlueData Catalog, serving as a wrapper for format-specific update operations such as Apache Iceberg.</p>
225    pub fn set_update_open_table_format_input(mut self, input: ::std::option::Option<crate::types::UpdateOpenTableFormatInput>) -> Self {
226        self.update_open_table_format_input = input;
227        self
228    }
229    /// <p>Input parameters for updating open table format tables in GlueData Catalog, serving as a wrapper for format-specific update operations such as Apache Iceberg.</p>
230    pub fn get_update_open_table_format_input(&self) -> &::std::option::Option<crate::types::UpdateOpenTableFormatInput> {
231        &self.update_open_table_format_input
232    }
233    /// Consumes the builder and constructs a [`UpdateTableInput`](crate::operation::update_table::UpdateTableInput).
234    pub fn build(self) -> ::std::result::Result<crate::operation::update_table::UpdateTableInput, ::aws_smithy_types::error::operation::BuildError> {
235        ::std::result::Result::Ok(crate::operation::update_table::UpdateTableInput {
236            catalog_id: self.catalog_id,
237            database_name: self.database_name,
238            name: self.name,
239            table_input: self.table_input,
240            skip_archive: self.skip_archive,
241            transaction_id: self.transaction_id,
242            version_id: self.version_id,
243            view_update_action: self.view_update_action,
244            force: self.force,
245            update_open_table_format_input: self.update_open_table_format_input,
246        })
247    }
248}