aws_sdk_codestarnotifications/operation/delete_target/
_delete_target_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct DeleteTargetInput {
6    /// <p>The Amazon Resource Name (ARN) of the Chatbot topic or Chatbot client to delete.</p>
7    pub target_address: ::std::option::Option<::std::string::String>,
8    /// <p>A Boolean value that can be used to delete all associations with this Chatbot topic. The default value is FALSE. If set to TRUE, all associations between that target and every notification rule in your Amazon Web Services account are deleted.</p>
9    pub force_unsubscribe_all: ::std::option::Option<bool>,
10}
11impl DeleteTargetInput {
12    /// <p>The Amazon Resource Name (ARN) of the Chatbot topic or Chatbot client to delete.</p>
13    pub fn target_address(&self) -> ::std::option::Option<&str> {
14        self.target_address.as_deref()
15    }
16    /// <p>A Boolean value that can be used to delete all associations with this Chatbot topic. The default value is FALSE. If set to TRUE, all associations between that target and every notification rule in your Amazon Web Services account are deleted.</p>
17    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    /// Creates a new builder-style object to manufacture [`DeleteTargetInput`](crate::operation::delete_target::DeleteTargetInput).
31    pub fn builder() -> crate::operation::delete_target::builders::DeleteTargetInputBuilder {
32        crate::operation::delete_target::builders::DeleteTargetInputBuilder::default()
33    }
34}
35
36/// A builder for [`DeleteTargetInput`](crate::operation::delete_target::DeleteTargetInput).
37#[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    /// <p>The Amazon Resource Name (ARN) of the Chatbot topic or Chatbot client to delete.</p>
45    /// This field is required.
46    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    /// <p>The Amazon Resource Name (ARN) of the Chatbot topic or Chatbot client to delete.</p>
51    pub fn set_target_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52        self.target_address = input;
53        self
54    }
55    /// <p>The Amazon Resource Name (ARN) of the Chatbot topic or Chatbot client to delete.</p>
56    pub fn get_target_address(&self) -> &::std::option::Option<::std::string::String> {
57        &self.target_address
58    }
59    /// <p>A Boolean value that can be used to delete all associations with this Chatbot topic. The default value is FALSE. If set to TRUE, all associations between that target and every notification rule in your Amazon Web Services account are deleted.</p>
60    pub fn force_unsubscribe_all(mut self, input: bool) -> Self {
61        self.force_unsubscribe_all = ::std::option::Option::Some(input);
62        self
63    }
64    /// <p>A Boolean value that can be used to delete all associations with this Chatbot topic. The default value is FALSE. If set to TRUE, all associations between that target and every notification rule in your Amazon Web Services account are deleted.</p>
65    pub fn set_force_unsubscribe_all(mut self, input: ::std::option::Option<bool>) -> Self {
66        self.force_unsubscribe_all = input;
67        self
68    }
69    /// <p>A Boolean value that can be used to delete all associations with this Chatbot topic. The default value is FALSE. If set to TRUE, all associations between that target and every notification rule in your Amazon Web Services account are deleted.</p>
70    pub fn get_force_unsubscribe_all(&self) -> &::std::option::Option<bool> {
71        &self.force_unsubscribe_all
72    }
73    /// Consumes the builder and constructs a [`DeleteTargetInput`](crate::operation::delete_target::DeleteTargetInput).
74    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}