aws-sdk-codestarnotifications 1.99.0

AWS SDK for AWS CodeStar Notifications
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Information about the Amazon Q Developer in chat applications topics or Amazon Q Developer in chat applications clients associated with a notification rule.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct Target {
    /// <p>The target type. Can be an Amazon Q Developer in chat applications topic or Amazon Q Developer in chat applications client.</p>
    /// <ul>
    /// <li>
    /// <p>Amazon Q Developer in chat applications topics are specified as <code>SNS</code>.</p></li>
    /// <li>
    /// <p>Amazon Q Developer in chat applications clients are specified as <code>AWSChatbotSlack</code>.</p></li>
    /// </ul>
    pub target_type: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the Amazon Q Developer in chat applications topic or Amazon Q Developer in chat applications client.</p>
    pub target_address: ::std::option::Option<::std::string::String>,
}
impl Target {
    /// <p>The target type. Can be an Amazon Q Developer in chat applications topic or Amazon Q Developer in chat applications client.</p>
    /// <ul>
    /// <li>
    /// <p>Amazon Q Developer in chat applications topics are specified as <code>SNS</code>.</p></li>
    /// <li>
    /// <p>Amazon Q Developer in chat applications clients are specified as <code>AWSChatbotSlack</code>.</p></li>
    /// </ul>
    pub fn target_type(&self) -> ::std::option::Option<&str> {
        self.target_type.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the Amazon Q Developer in chat applications topic or Amazon Q Developer in chat applications client.</p>
    pub fn target_address(&self) -> ::std::option::Option<&str> {
        self.target_address.as_deref()
    }
}
impl ::std::fmt::Debug for Target {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("Target");
        formatter.field("target_type", &self.target_type);
        formatter.field("target_address", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl Target {
    /// Creates a new builder-style object to manufacture [`Target`](crate::types::Target).
    pub fn builder() -> crate::types::builders::TargetBuilder {
        crate::types::builders::TargetBuilder::default()
    }
}

/// A builder for [`Target`](crate::types::Target).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct TargetBuilder {
    pub(crate) target_type: ::std::option::Option<::std::string::String>,
    pub(crate) target_address: ::std::option::Option<::std::string::String>,
}
impl TargetBuilder {
    /// <p>The target type. Can be an Amazon Q Developer in chat applications topic or Amazon Q Developer in chat applications client.</p>
    /// <ul>
    /// <li>
    /// <p>Amazon Q Developer in chat applications topics are specified as <code>SNS</code>.</p></li>
    /// <li>
    /// <p>Amazon Q Developer in chat applications clients are specified as <code>AWSChatbotSlack</code>.</p></li>
    /// </ul>
    pub fn target_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.target_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The target type. Can be an Amazon Q Developer in chat applications topic or Amazon Q Developer in chat applications client.</p>
    /// <ul>
    /// <li>
    /// <p>Amazon Q Developer in chat applications topics are specified as <code>SNS</code>.</p></li>
    /// <li>
    /// <p>Amazon Q Developer in chat applications clients are specified as <code>AWSChatbotSlack</code>.</p></li>
    /// </ul>
    pub fn set_target_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.target_type = input;
        self
    }
    /// <p>The target type. Can be an Amazon Q Developer in chat applications topic or Amazon Q Developer in chat applications client.</p>
    /// <ul>
    /// <li>
    /// <p>Amazon Q Developer in chat applications topics are specified as <code>SNS</code>.</p></li>
    /// <li>
    /// <p>Amazon Q Developer in chat applications clients are specified as <code>AWSChatbotSlack</code>.</p></li>
    /// </ul>
    pub fn get_target_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.target_type
    }
    /// <p>The Amazon Resource Name (ARN) of the Amazon Q Developer in chat applications topic or Amazon Q Developer in chat applications client.</p>
    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
    }
    /// <p>The Amazon Resource Name (ARN) of the Amazon Q Developer in chat applications topic or Amazon Q Developer in chat applications client.</p>
    pub fn set_target_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.target_address = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Amazon Q Developer in chat applications topic or Amazon Q Developer in chat applications client.</p>
    pub fn get_target_address(&self) -> &::std::option::Option<::std::string::String> {
        &self.target_address
    }
    /// Consumes the builder and constructs a [`Target`](crate::types::Target).
    pub fn build(self) -> crate::types::Target {
        crate::types::Target {
            target_type: self.target_type,
            target_address: self.target_address,
        }
    }
}
impl ::std::fmt::Debug for TargetBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("TargetBuilder");
        formatter.field("target_type", &self.target_type);
        formatter.field("target_address", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}