#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct DeleteTargetInput {
#[doc(hidden)]
pub target_address: ::std::option::Option<::std::string::String>,
#[doc(hidden)]
pub force_unsubscribe_all: bool,
}
impl DeleteTargetInput {
pub fn target_address(&self) -> ::std::option::Option<&str> {
self.target_address.as_deref()
}
pub fn force_unsubscribe_all(&self) -> bool {
self.force_unsubscribe_all
}
}
impl ::std::fmt::Debug for DeleteTargetInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("DeleteTargetInput");
formatter.field("target_address", &"*** Sensitive Data Redacted ***");
formatter.field("force_unsubscribe_all", &self.force_unsubscribe_all);
formatter.finish()
}
}
impl DeleteTargetInput {
pub fn builder() -> crate::operation::delete_target::builders::DeleteTargetInputBuilder {
crate::operation::delete_target::builders::DeleteTargetInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct DeleteTargetInputBuilder {
pub(crate) target_address: ::std::option::Option<::std::string::String>,
pub(crate) force_unsubscribe_all: ::std::option::Option<bool>,
}
impl DeleteTargetInputBuilder {
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 force_unsubscribe_all(mut self, input: bool) -> Self {
self.force_unsubscribe_all = ::std::option::Option::Some(input);
self
}
pub fn set_force_unsubscribe_all(mut self, input: ::std::option::Option<bool>) -> Self {
self.force_unsubscribe_all = input;
self
}
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::delete_target::DeleteTargetInput,
::aws_smithy_http::operation::error::BuildError,
> {
::std::result::Result::Ok(crate::operation::delete_target::DeleteTargetInput {
target_address: self.target_address,
force_unsubscribe_all: self.force_unsubscribe_all.unwrap_or_default(),
})
}
}
impl ::std::fmt::Debug for DeleteTargetInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("DeleteTargetInputBuilder");
formatter.field("target_address", &"*** Sensitive Data Redacted ***");
formatter.field("force_unsubscribe_all", &self.force_unsubscribe_all);
formatter.finish()
}
}