#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct Account {
pub account_id: ::std::string::String,
pub email_address: ::std::string::String,
}
impl Account {
pub fn account_id(&self) -> &str {
use std::ops::Deref;
self.account_id.deref()
}
pub fn email_address(&self) -> &str {
use std::ops::Deref;
self.email_address.deref()
}
}
impl ::std::fmt::Debug for Account {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("Account");
formatter.field("account_id", &self.account_id);
formatter.field("email_address", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
impl Account {
pub fn builder() -> crate::types::builders::AccountBuilder {
crate::types::builders::AccountBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct AccountBuilder {
pub(crate) account_id: ::std::option::Option<::std::string::String>,
pub(crate) email_address: ::std::option::Option<::std::string::String>,
}
impl AccountBuilder {
pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.account_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.account_id = input;
self
}
pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
&self.account_id
}
pub fn email_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.email_address = ::std::option::Option::Some(input.into());
self
}
pub fn set_email_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.email_address = input;
self
}
pub fn get_email_address(&self) -> &::std::option::Option<::std::string::String> {
&self.email_address
}
pub fn build(self) -> ::std::result::Result<crate::types::Account, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::Account {
account_id: self.account_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"account_id",
"account_id was not specified but it is required when building Account",
)
})?,
email_address: self.email_address.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"email_address",
"email_address was not specified but it is required when building Account",
)
})?,
})
}
}
impl ::std::fmt::Debug for AccountBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("AccountBuilder");
formatter.field("account_id", &self.account_id);
formatter.field("email_address", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}