#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetTableOutput {
pub table_name: ::std::option::Option<::std::string::String>,
pub description: ::std::option::Option<::std::string::String>,
pub table_properties: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub schema: ::std::option::Option<::std::vec::Vec<crate::types::Column>>,
_request_id: Option<String>,
}
impl GetTableOutput {
pub fn table_name(&self) -> ::std::option::Option<&str> {
self.table_name.as_deref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn table_properties(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.table_properties.as_ref()
}
pub fn schema(&self) -> &[crate::types::Column] {
self.schema.as_deref().unwrap_or_default()
}
}
impl ::aws_types::request_id::RequestId for GetTableOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetTableOutput {
pub fn builder() -> crate::operation::get_table::builders::GetTableOutputBuilder {
crate::operation::get_table::builders::GetTableOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GetTableOutputBuilder {
pub(crate) table_name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) table_properties: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) schema: ::std::option::Option<::std::vec::Vec<crate::types::Column>>,
_request_id: Option<String>,
}
impl GetTableOutputBuilder {
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 description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
pub fn table_properties(
mut self,
k: impl ::std::convert::Into<::std::string::String>,
v: impl ::std::convert::Into<::std::string::String>,
) -> Self {
let mut hash_map = self.table_properties.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.table_properties = ::std::option::Option::Some(hash_map);
self
}
pub fn set_table_properties(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
) -> Self {
self.table_properties = input;
self
}
pub fn get_table_properties(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.table_properties
}
pub fn schema(mut self, input: crate::types::Column) -> Self {
let mut v = self.schema.unwrap_or_default();
v.push(input);
self.schema = ::std::option::Option::Some(v);
self
}
pub fn set_schema(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Column>>) -> Self {
self.schema = input;
self
}
pub fn get_schema(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Column>> {
&self.schema
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(self) -> crate::operation::get_table::GetTableOutput {
crate::operation::get_table::GetTableOutput {
table_name: self.table_name,
description: self.description,
table_properties: self.table_properties,
schema: self.schema,
_request_id: self._request_id,
}
}
}