aws-sdk-iotdataplane 1.99.0

AWS SDK for AWS IoT Data Plane
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The input for the GetRetainedMessage operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetRetainedMessageInput {
    /// <p>The topic name of the retained message to retrieve.</p>
    pub topic: ::std::option::Option<::std::string::String>,
}
impl GetRetainedMessageInput {
    /// <p>The topic name of the retained message to retrieve.</p>
    pub fn topic(&self) -> ::std::option::Option<&str> {
        self.topic.as_deref()
    }
}
impl GetRetainedMessageInput {
    /// Creates a new builder-style object to manufacture [`GetRetainedMessageInput`](crate::operation::get_retained_message::GetRetainedMessageInput).
    pub fn builder() -> crate::operation::get_retained_message::builders::GetRetainedMessageInputBuilder {
        crate::operation::get_retained_message::builders::GetRetainedMessageInputBuilder::default()
    }
}

/// A builder for [`GetRetainedMessageInput`](crate::operation::get_retained_message::GetRetainedMessageInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetRetainedMessageInputBuilder {
    pub(crate) topic: ::std::option::Option<::std::string::String>,
}
impl GetRetainedMessageInputBuilder {
    /// <p>The topic name of the retained message to retrieve.</p>
    /// This field is required.
    pub fn topic(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.topic = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The topic name of the retained message to retrieve.</p>
    pub fn set_topic(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.topic = input;
        self
    }
    /// <p>The topic name of the retained message to retrieve.</p>
    pub fn get_topic(&self) -> &::std::option::Option<::std::string::String> {
        &self.topic
    }
    /// Consumes the builder and constructs a [`GetRetainedMessageInput`](crate::operation::get_retained_message::GetRetainedMessageInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_retained_message::GetRetainedMessageInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::get_retained_message::GetRetainedMessageInput { topic: self.topic })
    }
}