#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetTopicRuleOutput {
pub rule_arn: ::std::option::Option<::std::string::String>,
pub rule: ::std::option::Option<crate::types::TopicRule>,
_request_id: Option<String>,
}
impl GetTopicRuleOutput {
pub fn rule_arn(&self) -> ::std::option::Option<&str> {
self.rule_arn.as_deref()
}
pub fn rule(&self) -> ::std::option::Option<&crate::types::TopicRule> {
self.rule.as_ref()
}
}
impl ::aws_types::request_id::RequestId for GetTopicRuleOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetTopicRuleOutput {
pub fn builder() -> crate::operation::get_topic_rule::builders::GetTopicRuleOutputBuilder {
crate::operation::get_topic_rule::builders::GetTopicRuleOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetTopicRuleOutputBuilder {
pub(crate) rule_arn: ::std::option::Option<::std::string::String>,
pub(crate) rule: ::std::option::Option<crate::types::TopicRule>,
_request_id: Option<String>,
}
impl GetTopicRuleOutputBuilder {
pub fn rule_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.rule_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_rule_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.rule_arn = input;
self
}
pub fn get_rule_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.rule_arn
}
pub fn rule(mut self, input: crate::types::TopicRule) -> Self {
self.rule = ::std::option::Option::Some(input);
self
}
pub fn set_rule(mut self, input: ::std::option::Option<crate::types::TopicRule>) -> Self {
self.rule = input;
self
}
pub fn get_rule(&self) -> &::std::option::Option<crate::types::TopicRule> {
&self.rule
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(self) -> crate::operation::get_topic_rule::GetTopicRuleOutput {
crate::operation::get_topic_rule::GetTopicRuleOutput {
rule_arn: self.rule_arn,
rule: self.rule,
_request_id: self._request_id,
}
}
}