#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateDatabaseInput {
pub catalog_id: ::std::option::Option<::std::string::String>,
pub database_input: ::std::option::Option<crate::types::DatabaseInput>,
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateDatabaseInput {
pub fn catalog_id(&self) -> ::std::option::Option<&str> {
self.catalog_id.as_deref()
}
pub fn database_input(&self) -> ::std::option::Option<&crate::types::DatabaseInput> {
self.database_input.as_ref()
}
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
}
impl CreateDatabaseInput {
pub fn builder() -> crate::operation::create_database::builders::CreateDatabaseInputBuilder {
crate::operation::create_database::builders::CreateDatabaseInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CreateDatabaseInputBuilder {
pub(crate) catalog_id: ::std::option::Option<::std::string::String>,
pub(crate) database_input: ::std::option::Option<crate::types::DatabaseInput>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateDatabaseInputBuilder {
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_input(mut self, input: crate::types::DatabaseInput) -> Self {
self.database_input = ::std::option::Option::Some(input);
self
}
pub fn set_database_input(mut self, input: ::std::option::Option<crate::types::DatabaseInput>) -> Self {
self.database_input = input;
self
}
pub fn get_database_input(&self) -> &::std::option::Option<crate::types::DatabaseInput> {
&self.database_input
}
pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = ::std::option::Option::Some(hash_map);
self
}
pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.tags = input;
self
}
pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.tags
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_database::CreateDatabaseInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_database::CreateDatabaseInput {
catalog_id: self.catalog_id,
database_input: self.database_input,
tags: self.tags,
})
}
}