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