aws-sdk-iot 1.112.0

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

/// <p>The input for the GetTopicRule operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetTopicRuleInput {
    /// <p>The name of the rule.</p>
    pub rule_name: ::std::option::Option<::std::string::String>,
}
impl GetTopicRuleInput {
    /// <p>The name of the rule.</p>
    pub fn rule_name(&self) -> ::std::option::Option<&str> {
        self.rule_name.as_deref()
    }
}
impl GetTopicRuleInput {
    /// Creates a new builder-style object to manufacture [`GetTopicRuleInput`](crate::operation::get_topic_rule::GetTopicRuleInput).
    pub fn builder() -> crate::operation::get_topic_rule::builders::GetTopicRuleInputBuilder {
        crate::operation::get_topic_rule::builders::GetTopicRuleInputBuilder::default()
    }
}

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