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