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