#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct BatchGetPartitionInput {
pub catalog_id: ::std::option::Option<::std::string::String>,
pub database_name: ::std::option::Option<::std::string::String>,
pub table_name: ::std::option::Option<::std::string::String>,
pub partitions_to_get: ::std::option::Option<::std::vec::Vec<crate::types::PartitionValueList>>,
}
impl BatchGetPartitionInput {
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_name(&self) -> ::std::option::Option<&str> {
self.table_name.as_deref()
}
pub fn partitions_to_get(&self) -> &[crate::types::PartitionValueList] {
self.partitions_to_get.as_deref().unwrap_or_default()
}
}
impl BatchGetPartitionInput {
pub fn builder() -> crate::operation::batch_get_partition::builders::BatchGetPartitionInputBuilder {
crate::operation::batch_get_partition::builders::BatchGetPartitionInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BatchGetPartitionInputBuilder {
pub(crate) catalog_id: ::std::option::Option<::std::string::String>,
pub(crate) database_name: ::std::option::Option<::std::string::String>,
pub(crate) table_name: ::std::option::Option<::std::string::String>,
pub(crate) partitions_to_get: ::std::option::Option<::std::vec::Vec<crate::types::PartitionValueList>>,
}
impl BatchGetPartitionInputBuilder {
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_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.table_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.table_name = input;
self
}
pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
&self.table_name
}
pub fn partitions_to_get(mut self, input: crate::types::PartitionValueList) -> Self {
let mut v = self.partitions_to_get.unwrap_or_default();
v.push(input);
self.partitions_to_get = ::std::option::Option::Some(v);
self
}
pub fn set_partitions_to_get(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PartitionValueList>>) -> Self {
self.partitions_to_get = input;
self
}
pub fn get_partitions_to_get(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PartitionValueList>> {
&self.partitions_to_get
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::batch_get_partition::BatchGetPartitionInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::batch_get_partition::BatchGetPartitionInput {
catalog_id: self.catalog_id,
database_name: self.database_name,
table_name: self.table_name,
partitions_to_get: self.partitions_to_get,
})
}
}