1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateTableInput {
/// <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>
pub catalog_id: ::std::option::Option<::std::string::String>,
/// <p>The name of the catalog database in which the table resides. For Hive compatibility, this name is entirely lowercase.</p>
pub database_name: ::std::option::Option<::std::string::String>,
/// <p>An updated <code>TableInput</code> object to define the metadata table in the catalog.</p>
pub table_input: ::std::option::Option<crate::types::TableInput>,
/// <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>
pub skip_archive: ::std::option::Option<bool>,
/// <p>The transaction ID at which to update the table contents.</p>
pub transaction_id: ::std::option::Option<::std::string::String>,
/// <p>The version ID at which to update the table contents.</p>
pub version_id: ::std::option::Option<::std::string::String>,
/// <p>The operation to be performed when updating the view.</p>
pub view_update_action: ::std::option::Option<crate::types::ViewUpdateAction>,
/// <p>A flag that can be set to true to ignore matching storage descriptor and subobject matching requirements.</p>
pub force: ::std::option::Option<bool>,
}
impl UpdateTableInput {
/// <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>
pub fn catalog_id(&self) -> ::std::option::Option<&str> {
self.catalog_id.as_deref()
}
/// <p>The name of the catalog database in which the table resides. For Hive compatibility, this name is entirely lowercase.</p>
pub fn database_name(&self) -> ::std::option::Option<&str> {
self.database_name.as_deref()
}
/// <p>An updated <code>TableInput</code> object to define the metadata table in the catalog.</p>
pub fn table_input(&self) -> ::std::option::Option<&crate::types::TableInput> {
self.table_input.as_ref()
}
/// <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>
pub fn skip_archive(&self) -> ::std::option::Option<bool> {
self.skip_archive
}
/// <p>The transaction ID at which to update the table contents.</p>
pub fn transaction_id(&self) -> ::std::option::Option<&str> {
self.transaction_id.as_deref()
}
/// <p>The version ID at which to update the table contents.</p>
pub fn version_id(&self) -> ::std::option::Option<&str> {
self.version_id.as_deref()
}
/// <p>The operation to be performed when updating the view.</p>
pub fn view_update_action(&self) -> ::std::option::Option<&crate::types::ViewUpdateAction> {
self.view_update_action.as_ref()
}
/// <p>A flag that can be set to true to ignore matching storage descriptor and subobject matching requirements.</p>
pub fn force(&self) -> ::std::option::Option<bool> {
self.force
}
}
impl UpdateTableInput {
/// Creates a new builder-style object to manufacture [`UpdateTableInput`](crate::operation::update_table::UpdateTableInput).
pub fn builder() -> crate::operation::update_table::builders::UpdateTableInputBuilder {
crate::operation::update_table::builders::UpdateTableInputBuilder::default()
}
}
/// A builder for [`UpdateTableInput`](crate::operation::update_table::UpdateTableInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UpdateTableInputBuilder {
pub(crate) catalog_id: ::std::option::Option<::std::string::String>,
pub(crate) database_name: ::std::option::Option<::std::string::String>,
pub(crate) table_input: ::std::option::Option<crate::types::TableInput>,
pub(crate) skip_archive: ::std::option::Option<bool>,
pub(crate) transaction_id: ::std::option::Option<::std::string::String>,
pub(crate) version_id: ::std::option::Option<::std::string::String>,
pub(crate) view_update_action: ::std::option::Option<crate::types::ViewUpdateAction>,
pub(crate) force: ::std::option::Option<bool>,
}
impl UpdateTableInputBuilder {
/// <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>
pub fn catalog_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.catalog_id = ::std::option::Option::Some(input.into());
self
}
/// <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>
pub fn set_catalog_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.catalog_id = input;
self
}
/// <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>
pub fn get_catalog_id(&self) -> &::std::option::Option<::std::string::String> {
&self.catalog_id
}
/// <p>The name of the catalog database in which the table resides. For Hive compatibility, this name is entirely lowercase.</p>
/// This field is required.
pub fn database_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.database_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the catalog database in which the table resides. For Hive compatibility, this name is entirely lowercase.</p>
pub fn set_database_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.database_name = input;
self
}
/// <p>The name of the catalog database in which the table resides. For Hive compatibility, this name is entirely lowercase.</p>
pub fn get_database_name(&self) -> &::std::option::Option<::std::string::String> {
&self.database_name
}
/// <p>An updated <code>TableInput</code> object to define the metadata table in the catalog.</p>
/// This field is required.
pub fn table_input(mut self, input: crate::types::TableInput) -> Self {
self.table_input = ::std::option::Option::Some(input);
self
}
/// <p>An updated <code>TableInput</code> object to define the metadata table in the catalog.</p>
pub fn set_table_input(mut self, input: ::std::option::Option<crate::types::TableInput>) -> Self {
self.table_input = input;
self
}
/// <p>An updated <code>TableInput</code> object to define the metadata table in the catalog.</p>
pub fn get_table_input(&self) -> &::std::option::Option<crate::types::TableInput> {
&self.table_input
}
/// <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>
pub fn skip_archive(mut self, input: bool) -> Self {
self.skip_archive = ::std::option::Option::Some(input);
self
}
/// <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>
pub fn set_skip_archive(mut self, input: ::std::option::Option<bool>) -> Self {
self.skip_archive = input;
self
}
/// <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>
pub fn get_skip_archive(&self) -> &::std::option::Option<bool> {
&self.skip_archive
}
/// <p>The transaction ID at which to update the table contents.</p>
pub fn transaction_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.transaction_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The transaction ID at which to update the table contents.</p>
pub fn set_transaction_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.transaction_id = input;
self
}
/// <p>The transaction ID at which to update the table contents.</p>
pub fn get_transaction_id(&self) -> &::std::option::Option<::std::string::String> {
&self.transaction_id
}
/// <p>The version ID at which to update the table contents.</p>
pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.version_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The version ID at which to update the table contents.</p>
pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.version_id = input;
self
}
/// <p>The version ID at which to update the table contents.</p>
pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
&self.version_id
}
/// <p>The operation to be performed when updating the view.</p>
pub fn view_update_action(mut self, input: crate::types::ViewUpdateAction) -> Self {
self.view_update_action = ::std::option::Option::Some(input);
self
}
/// <p>The operation to be performed when updating the view.</p>
pub fn set_view_update_action(mut self, input: ::std::option::Option<crate::types::ViewUpdateAction>) -> Self {
self.view_update_action = input;
self
}
/// <p>The operation to be performed when updating the view.</p>
pub fn get_view_update_action(&self) -> &::std::option::Option<crate::types::ViewUpdateAction> {
&self.view_update_action
}
/// <p>A flag that can be set to true to ignore matching storage descriptor and subobject matching requirements.</p>
pub fn force(mut self, input: bool) -> Self {
self.force = ::std::option::Option::Some(input);
self
}
/// <p>A flag that can be set to true to ignore matching storage descriptor and subobject matching requirements.</p>
pub fn set_force(mut self, input: ::std::option::Option<bool>) -> Self {
self.force = input;
self
}
/// <p>A flag that can be set to true to ignore matching storage descriptor and subobject matching requirements.</p>
pub fn get_force(&self) -> &::std::option::Option<bool> {
&self.force
}
/// Consumes the builder and constructs a [`UpdateTableInput`](crate::operation::update_table::UpdateTableInput).
pub fn build(self) -> ::std::result::Result<crate::operation::update_table::UpdateTableInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_table::UpdateTableInput {
catalog_id: self.catalog_id,
database_name: self.database_name,
table_input: self.table_input,
skip_archive: self.skip_archive,
transaction_id: self.transaction_id,
version_id: self.version_id,
view_update_action: self.view_update_action,
force: self.force,
})
}
}