aws_sdk_iot/operation/list_topic_rules/
_list_topic_rules_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ListTopicRulesInput {
7 pub topic: ::std::option::Option<::std::string::String>,
9 pub max_results: ::std::option::Option<i32>,
11 pub next_token: ::std::option::Option<::std::string::String>,
13 pub rule_disabled: ::std::option::Option<bool>,
15}
16impl ListTopicRulesInput {
17 pub fn topic(&self) -> ::std::option::Option<&str> {
19 self.topic.as_deref()
20 }
21 pub fn max_results(&self) -> ::std::option::Option<i32> {
23 self.max_results
24 }
25 pub fn next_token(&self) -> ::std::option::Option<&str> {
27 self.next_token.as_deref()
28 }
29 pub fn rule_disabled(&self) -> ::std::option::Option<bool> {
31 self.rule_disabled
32 }
33}
34impl ListTopicRulesInput {
35 pub fn builder() -> crate::operation::list_topic_rules::builders::ListTopicRulesInputBuilder {
37 crate::operation::list_topic_rules::builders::ListTopicRulesInputBuilder::default()
38 }
39}
40
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct ListTopicRulesInputBuilder {
45 pub(crate) topic: ::std::option::Option<::std::string::String>,
46 pub(crate) max_results: ::std::option::Option<i32>,
47 pub(crate) next_token: ::std::option::Option<::std::string::String>,
48 pub(crate) rule_disabled: ::std::option::Option<bool>,
49}
50impl ListTopicRulesInputBuilder {
51 pub fn topic(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.topic = ::std::option::Option::Some(input.into());
54 self
55 }
56 pub fn set_topic(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.topic = input;
59 self
60 }
61 pub fn get_topic(&self) -> &::std::option::Option<::std::string::String> {
63 &self.topic
64 }
65 pub fn max_results(mut self, input: i32) -> Self {
67 self.max_results = ::std::option::Option::Some(input);
68 self
69 }
70 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
72 self.max_results = input;
73 self
74 }
75 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
77 &self.max_results
78 }
79 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81 self.next_token = ::std::option::Option::Some(input.into());
82 self
83 }
84 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86 self.next_token = input;
87 self
88 }
89 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
91 &self.next_token
92 }
93 pub fn rule_disabled(mut self, input: bool) -> Self {
95 self.rule_disabled = ::std::option::Option::Some(input);
96 self
97 }
98 pub fn set_rule_disabled(mut self, input: ::std::option::Option<bool>) -> Self {
100 self.rule_disabled = input;
101 self
102 }
103 pub fn get_rule_disabled(&self) -> &::std::option::Option<bool> {
105 &self.rule_disabled
106 }
107 pub fn build(
109 self,
110 ) -> ::std::result::Result<crate::operation::list_topic_rules::ListTopicRulesInput, ::aws_smithy_types::error::operation::BuildError> {
111 ::std::result::Result::Ok(crate::operation::list_topic_rules::ListTopicRulesInput {
112 topic: self.topic,
113 max_results: self.max_results,
114 next_token: self.next_token,
115 rule_disabled: self.rule_disabled,
116 })
117 }
118}