aws-sdk-sns 1.97.0

AWS SDK for Amazon Simple Notification Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A wrapper type for the topic's Amazon Resource Name (ARN). To retrieve a topic's attributes, use <code>GetTopicAttributes</code>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Topic {
    /// <p>The topic's ARN.</p>
    pub topic_arn: ::std::option::Option<::std::string::String>,
}
impl Topic {
    /// <p>The topic's ARN.</p>
    pub fn topic_arn(&self) -> ::std::option::Option<&str> {
        self.topic_arn.as_deref()
    }
}
impl Topic {
    /// Creates a new builder-style object to manufacture [`Topic`](crate::types::Topic).
    pub fn builder() -> crate::types::builders::TopicBuilder {
        crate::types::builders::TopicBuilder::default()
    }
}

/// A builder for [`Topic`](crate::types::Topic).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct TopicBuilder {
    pub(crate) topic_arn: ::std::option::Option<::std::string::String>,
}
impl TopicBuilder {
    /// <p>The topic's ARN.</p>
    pub fn topic_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.topic_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The topic's ARN.</p>
    pub fn set_topic_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.topic_arn = input;
        self
    }
    /// <p>The topic's ARN.</p>
    pub fn get_topic_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.topic_arn
    }
    /// Consumes the builder and constructs a [`Topic`](crate::types::Topic).
    pub fn build(self) -> crate::types::Topic {
        crate::types::Topic { topic_arn: self.topic_arn }
    }
}