aws-sdk-glue 1.147.0

AWS SDK for AWS Glue
Documentation
// 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>The unique identifier for the table within the specified database that will be created in the Glue Data Catalog.</p>
    pub 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>,
    /// <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>
    pub update_open_table_format_input: ::std::option::Option<crate::types::UpdateOpenTableFormatInput>,
}
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>The unique identifier for the table within the specified database that will be created in the Glue Data Catalog.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.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
    }
    /// <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>
    pub fn update_open_table_format_input(&self) -> ::std::option::Option<&crate::types::UpdateOpenTableFormatInput> {
        self.update_open_table_format_input.as_ref()
    }
}
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).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
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) 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>,
    pub(crate) update_open_table_format_input: ::std::option::Option<crate::types::UpdateOpenTableFormatInput>,
}
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>The unique identifier for the table within the specified database that will be created in the Glue Data Catalog.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier for the table within the specified database that will be created in the Glue Data Catalog.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The unique identifier for the table within the specified database that will be created in the Glue Data Catalog.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>An updated <code>TableInput</code> object to define the metadata table in the catalog.</p>
    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
    }
    /// <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>
    pub fn update_open_table_format_input(mut self, input: crate::types::UpdateOpenTableFormatInput) -> Self {
        self.update_open_table_format_input = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    pub fn set_update_open_table_format_input(mut self, input: ::std::option::Option<crate::types::UpdateOpenTableFormatInput>) -> Self {
        self.update_open_table_format_input = input;
        self
    }
    /// <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>
    pub fn get_update_open_table_format_input(&self) -> &::std::option::Option<crate::types::UpdateOpenTableFormatInput> {
        &self.update_open_table_format_input
    }
    /// 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,
            name: self.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,
            update_open_table_format_input: self.update_open_table_format_input,
        })
    }
}