#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateTableInput {
pub catalog_id: ::std::option::Option<::std::string::String>,
pub database_name: ::std::option::Option<::std::string::String>,
pub table_input: ::std::option::Option<crate::types::TableInput>,
pub partition_indexes: ::std::option::Option<::std::vec::Vec<crate::types::PartitionIndex>>,
pub transaction_id: ::std::option::Option<::std::string::String>,
pub open_table_format_input: ::std::option::Option<crate::types::OpenTableFormatInput>,
}
impl CreateTableInput {
pub fn catalog_id(&self) -> ::std::option::Option<&str> {
self.catalog_id.as_deref()
}
pub fn database_name(&self) -> ::std::option::Option<&str> {
self.database_name.as_deref()
}
pub fn table_input(&self) -> ::std::option::Option<&crate::types::TableInput> {
self.table_input.as_ref()
}
pub fn partition_indexes(&self) -> ::std::option::Option<&[crate::types::PartitionIndex]> {
self.partition_indexes.as_deref()
}
pub fn transaction_id(&self) -> ::std::option::Option<&str> {
self.transaction_id.as_deref()
}
pub fn open_table_format_input(&self) -> ::std::option::Option<&crate::types::OpenTableFormatInput> {
self.open_table_format_input.as_ref()
}
}
impl CreateTableInput {
pub fn builder() -> crate::operation::create_table::builders::CreateTableInputBuilder {
crate::operation::create_table::builders::CreateTableInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CreateTableInputBuilder {
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) partition_indexes: ::std::option::Option<::std::vec::Vec<crate::types::PartitionIndex>>,
pub(crate) transaction_id: ::std::option::Option<::std::string::String>,
pub(crate) open_table_format_input: ::std::option::Option<crate::types::OpenTableFormatInput>,
}
impl CreateTableInputBuilder {
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
}
pub fn set_catalog_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.catalog_id = input;
self
}
pub fn get_catalog_id(&self) -> &::std::option::Option<::std::string::String> {
&self.catalog_id
}
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
}
pub fn set_database_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.database_name = input;
self
}
pub fn get_database_name(&self) -> &::std::option::Option<::std::string::String> {
&self.database_name
}
pub fn table_input(mut self, input: crate::types::TableInput) -> Self {
self.table_input = ::std::option::Option::Some(input);
self
}
pub fn set_table_input(mut self, input: ::std::option::Option<crate::types::TableInput>) -> Self {
self.table_input = input;
self
}
pub fn get_table_input(&self) -> &::std::option::Option<crate::types::TableInput> {
&self.table_input
}
pub fn partition_indexes(mut self, input: crate::types::PartitionIndex) -> Self {
let mut v = self.partition_indexes.unwrap_or_default();
v.push(input);
self.partition_indexes = ::std::option::Option::Some(v);
self
}
pub fn set_partition_indexes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PartitionIndex>>) -> Self {
self.partition_indexes = input;
self
}
pub fn get_partition_indexes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PartitionIndex>> {
&self.partition_indexes
}
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
}
pub fn set_transaction_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.transaction_id = input;
self
}
pub fn get_transaction_id(&self) -> &::std::option::Option<::std::string::String> {
&self.transaction_id
}
pub fn open_table_format_input(mut self, input: crate::types::OpenTableFormatInput) -> Self {
self.open_table_format_input = ::std::option::Option::Some(input);
self
}
pub fn set_open_table_format_input(mut self, input: ::std::option::Option<crate::types::OpenTableFormatInput>) -> Self {
self.open_table_format_input = input;
self
}
pub fn get_open_table_format_input(&self) -> &::std::option::Option<crate::types::OpenTableFormatInput> {
&self.open_table_format_input
}
pub fn build(self) -> ::std::result::Result<crate::operation::create_table::CreateTableInput, ::aws_smithy_http::operation::error::BuildError> {
::std::result::Result::Ok(crate::operation::create_table::CreateTableInput {
catalog_id: self.catalog_id,
database_name: self.database_name,
table_input: self.table_input,
partition_indexes: self.partition_indexes,
transaction_id: self.transaction_id,
open_table_format_input: self.open_table_format_input,
})
}
}