1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes a rule.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct TopicRuleListItem {
    /// <p>The rule ARN.</p>
    pub rule_arn: ::std::option::Option<::std::string::String>,
    /// <p>The name of the rule.</p>
    pub rule_name: ::std::option::Option<::std::string::String>,
    /// <p>The pattern for the topic names that apply.</p>
    pub topic_pattern: ::std::option::Option<::std::string::String>,
    /// <p>The date and time the rule was created.</p>
    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>Specifies whether the rule is disabled.</p>
    pub rule_disabled: ::std::option::Option<bool>,
}
impl TopicRuleListItem {
    /// <p>The rule ARN.</p>
    pub fn rule_arn(&self) -> ::std::option::Option<&str> {
        self.rule_arn.as_deref()
    }
    /// <p>The name of the rule.</p>
    pub fn rule_name(&self) -> ::std::option::Option<&str> {
        self.rule_name.as_deref()
    }
    /// <p>The pattern for the topic names that apply.</p>
    pub fn topic_pattern(&self) -> ::std::option::Option<&str> {
        self.topic_pattern.as_deref()
    }
    /// <p>The date and time the rule was created.</p>
    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
    /// <p>Specifies whether the rule is disabled.</p>
    pub fn rule_disabled(&self) -> ::std::option::Option<bool> {
        self.rule_disabled
    }
}
impl TopicRuleListItem {
    /// Creates a new builder-style object to manufacture [`TopicRuleListItem`](crate::types::TopicRuleListItem).
    pub fn builder() -> crate::types::builders::TopicRuleListItemBuilder {
        crate::types::builders::TopicRuleListItemBuilder::default()
    }
}

/// A builder for [`TopicRuleListItem`](crate::types::TopicRuleListItem).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct TopicRuleListItemBuilder {
    pub(crate) rule_arn: ::std::option::Option<::std::string::String>,
    pub(crate) rule_name: ::std::option::Option<::std::string::String>,
    pub(crate) topic_pattern: ::std::option::Option<::std::string::String>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) rule_disabled: ::std::option::Option<bool>,
}
impl TopicRuleListItemBuilder {
    /// <p>The rule ARN.</p>
    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
    }
    /// <p>The rule ARN.</p>
    pub fn set_rule_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.rule_arn = input;
        self
    }
    /// <p>The rule ARN.</p>
    pub fn get_rule_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.rule_arn
    }
    /// <p>The name of the rule.</p>
    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
    }
    /// <p>The pattern for the topic names that apply.</p>
    pub fn topic_pattern(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.topic_pattern = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The pattern for the topic names that apply.</p>
    pub fn set_topic_pattern(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.topic_pattern = input;
        self
    }
    /// <p>The pattern for the topic names that apply.</p>
    pub fn get_topic_pattern(&self) -> &::std::option::Option<::std::string::String> {
        &self.topic_pattern
    }
    /// <p>The date and time the rule was created.</p>
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time the rule was created.</p>
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// <p>The date and time the rule was created.</p>
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// <p>Specifies whether the rule is disabled.</p>
    pub fn rule_disabled(mut self, input: bool) -> Self {
        self.rule_disabled = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies whether the rule is disabled.</p>
    pub fn set_rule_disabled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.rule_disabled = input;
        self
    }
    /// <p>Specifies whether the rule is disabled.</p>
    pub fn get_rule_disabled(&self) -> &::std::option::Option<bool> {
        &self.rule_disabled
    }
    /// Consumes the builder and constructs a [`TopicRuleListItem`](crate::types::TopicRuleListItem).
    pub fn build(self) -> crate::types::TopicRuleListItem {
        crate::types::TopicRuleListItem {
            rule_arn: self.rule_arn,
            rule_name: self.rule_name,
            topic_pattern: self.topic_pattern,
            created_at: self.created_at,
            rule_disabled: self.rule_disabled,
        }
    }
}