#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GlueStudioSchemaColumn {
pub name: ::std::string::String,
pub r#type: ::std::option::Option<::std::string::String>,
}
impl GlueStudioSchemaColumn {
pub fn name(&self) -> &str {
use std::ops::Deref;
self.name.deref()
}
pub fn r#type(&self) -> ::std::option::Option<&str> {
self.r#type.as_deref()
}
}
impl GlueStudioSchemaColumn {
pub fn builder() -> crate::types::builders::GlueStudioSchemaColumnBuilder {
crate::types::builders::GlueStudioSchemaColumnBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GlueStudioSchemaColumnBuilder {
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) r#type: ::std::option::Option<::std::string::String>,
}
impl GlueStudioSchemaColumnBuilder {
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
pub fn r#type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.r#type = ::std::option::Option::Some(input.into());
self
}
pub fn set_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.r#type = input;
self
}
pub fn get_type(&self) -> &::std::option::Option<::std::string::String> {
&self.r#type
}
pub fn build(self) -> ::std::result::Result<crate::types::GlueStudioSchemaColumn, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::GlueStudioSchemaColumn {
name: self.name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"name",
"name was not specified but it is required when building GlueStudioSchemaColumn",
)
})?,
r#type: self.r#type,
})
}
}