#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateSchemaInput {
pub content: ::std::option::Option<::std::string::String>,
pub description: ::std::option::Option<::std::string::String>,
pub registry_name: ::std::option::Option<::std::string::String>,
pub schema_name: ::std::option::Option<::std::string::String>,
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub r#type: ::std::option::Option<crate::types::Type>,
}
impl CreateSchemaInput {
pub fn content(&self) -> ::std::option::Option<&str> {
self.content.as_deref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn registry_name(&self) -> ::std::option::Option<&str> {
self.registry_name.as_deref()
}
pub fn schema_name(&self) -> ::std::option::Option<&str> {
self.schema_name.as_deref()
}
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
pub fn r#type(&self) -> ::std::option::Option<&crate::types::Type> {
self.r#type.as_ref()
}
}
impl CreateSchemaInput {
pub fn builder() -> crate::operation::create_schema::builders::CreateSchemaInputBuilder {
crate::operation::create_schema::builders::CreateSchemaInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CreateSchemaInputBuilder {
pub(crate) content: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) registry_name: ::std::option::Option<::std::string::String>,
pub(crate) schema_name: ::std::option::Option<::std::string::String>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) r#type: ::std::option::Option<crate::types::Type>,
}
impl CreateSchemaInputBuilder {
pub fn content(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.content = ::std::option::Option::Some(input.into());
self
}
pub fn set_content(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.content = input;
self
}
pub fn get_content(&self) -> &::std::option::Option<::std::string::String> {
&self.content
}
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 registry_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.registry_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_registry_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.registry_name = input;
self
}
pub fn get_registry_name(&self) -> &::std::option::Option<::std::string::String> {
&self.registry_name
}
pub fn schema_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.schema_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_schema_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.schema_name = input;
self
}
pub fn get_schema_name(&self) -> &::std::option::Option<::std::string::String> {
&self.schema_name
}
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 r#type(mut self, input: crate::types::Type) -> Self {
self.r#type = ::std::option::Option::Some(input);
self
}
pub fn set_type(mut self, input: ::std::option::Option<crate::types::Type>) -> Self {
self.r#type = input;
self
}
pub fn get_type(&self) -> &::std::option::Option<crate::types::Type> {
&self.r#type
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_schema::CreateSchemaInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_schema::CreateSchemaInput {
content: self.content,
description: self.description,
registry_name: self.registry_name,
schema_name: self.schema_name,
tags: self.tags,
r#type: self.r#type,
})
}
}