#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateCollectionInput {
pub collection_id: ::std::option::Option<::std::string::String>,
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateCollectionInput {
pub fn collection_id(&self) -> ::std::option::Option<&str> {
self.collection_id.as_deref()
}
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
}
impl CreateCollectionInput {
pub fn builder() -> crate::operation::create_collection::builders::CreateCollectionInputBuilder {
crate::operation::create_collection::builders::CreateCollectionInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CreateCollectionInputBuilder {
pub(crate) collection_id: ::std::option::Option<::std::string::String>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateCollectionInputBuilder {
pub fn collection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.collection_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_collection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.collection_id = input;
self
}
pub fn get_collection_id(&self) -> &::std::option::Option<::std::string::String> {
&self.collection_id
}
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_collection::CreateCollectionInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_collection::CreateCollectionInput {
collection_id: self.collection_id,
tags: self.tags,
})
}
}