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