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