#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct UnsubscribeInput {
#[doc(hidden)]
pub arn: ::std::option::Option<::std::string::String>,
#[doc(hidden)]
pub target_address: ::std::option::Option<::std::string::String>,
}
impl UnsubscribeInput {
pub fn arn(&self) -> ::std::option::Option<&str> {
self.arn.as_deref()
}
pub fn target_address(&self) -> ::std::option::Option<&str> {
self.target_address.as_deref()
}
}
impl ::std::fmt::Debug for UnsubscribeInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("UnsubscribeInput");
formatter.field("arn", &self.arn);
formatter.field("target_address", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
impl UnsubscribeInput {
pub fn builder() -> crate::operation::unsubscribe::builders::UnsubscribeInputBuilder {
crate::operation::unsubscribe::builders::UnsubscribeInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct UnsubscribeInputBuilder {
pub(crate) arn: ::std::option::Option<::std::string::String>,
pub(crate) target_address: ::std::option::Option<::std::string::String>,
}
impl UnsubscribeInputBuilder {
pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.arn = input;
self
}
pub fn target_address(
mut self,
input: impl ::std::convert::Into<::std::string::String>,
) -> Self {
self.target_address = ::std::option::Option::Some(input.into());
self
}
pub fn set_target_address(
mut self,
input: ::std::option::Option<::std::string::String>,
) -> Self {
self.target_address = input;
self
}
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::unsubscribe::UnsubscribeInput,
::aws_smithy_http::operation::error::BuildError,
> {
::std::result::Result::Ok(crate::operation::unsubscribe::UnsubscribeInput {
arn: self.arn,
target_address: self.target_address,
})
}
}
impl ::std::fmt::Debug for UnsubscribeInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("UnsubscribeInputBuilder");
formatter.field("arn", &self.arn);
formatter.field("target_address", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}