aws_sdk_codestarnotifications/operation/delete_target/
_delete_target_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct DeleteTargetInput {
6 pub target_address: ::std::option::Option<::std::string::String>,
8 pub force_unsubscribe_all: ::std::option::Option<bool>,
10}
11impl DeleteTargetInput {
12 pub fn target_address(&self) -> ::std::option::Option<&str> {
14 self.target_address.as_deref()
15 }
16 pub fn force_unsubscribe_all(&self) -> ::std::option::Option<bool> {
18 self.force_unsubscribe_all
19 }
20}
21impl ::std::fmt::Debug for DeleteTargetInput {
22 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
23 let mut formatter = f.debug_struct("DeleteTargetInput");
24 formatter.field("target_address", &"*** Sensitive Data Redacted ***");
25 formatter.field("force_unsubscribe_all", &self.force_unsubscribe_all);
26 formatter.finish()
27 }
28}
29impl DeleteTargetInput {
30 pub fn builder() -> crate::operation::delete_target::builders::DeleteTargetInputBuilder {
32 crate::operation::delete_target::builders::DeleteTargetInputBuilder::default()
33 }
34}
35
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
38#[non_exhaustive]
39pub struct DeleteTargetInputBuilder {
40 pub(crate) target_address: ::std::option::Option<::std::string::String>,
41 pub(crate) force_unsubscribe_all: ::std::option::Option<bool>,
42}
43impl DeleteTargetInputBuilder {
44 pub fn target_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47 self.target_address = ::std::option::Option::Some(input.into());
48 self
49 }
50 pub fn set_target_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52 self.target_address = input;
53 self
54 }
55 pub fn get_target_address(&self) -> &::std::option::Option<::std::string::String> {
57 &self.target_address
58 }
59 pub fn force_unsubscribe_all(mut self, input: bool) -> Self {
61 self.force_unsubscribe_all = ::std::option::Option::Some(input);
62 self
63 }
64 pub fn set_force_unsubscribe_all(mut self, input: ::std::option::Option<bool>) -> Self {
66 self.force_unsubscribe_all = input;
67 self
68 }
69 pub fn get_force_unsubscribe_all(&self) -> &::std::option::Option<bool> {
71 &self.force_unsubscribe_all
72 }
73 pub fn build(
75 self,
76 ) -> ::std::result::Result<crate::operation::delete_target::DeleteTargetInput, ::aws_smithy_types::error::operation::BuildError> {
77 ::std::result::Result::Ok(crate::operation::delete_target::DeleteTargetInput {
78 target_address: self.target_address,
79 force_unsubscribe_all: self.force_unsubscribe_all,
80 })
81 }
82}
83impl ::std::fmt::Debug for DeleteTargetInputBuilder {
84 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
85 let mut formatter = f.debug_struct("DeleteTargetInputBuilder");
86 formatter.field("target_address", &"*** Sensitive Data Redacted ***");
87 formatter.field("force_unsubscribe_all", &self.force_unsubscribe_all);
88 formatter.finish()
89 }
90}