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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetRuleSetOutput {
    /// <p>The identifier of the rule set resource.</p>
    pub rule_set_id: ::std::string::String,
    /// <p>The Amazon Resource Name (ARN) of the rule set resource.</p>
    pub rule_set_arn: ::std::string::String,
    /// <p>A user-friendly name for the rule set resource.</p>
    pub rule_set_name: ::std::string::String,
    /// <p>The date of when then rule set was created.</p>
    pub created_date: ::aws_smithy_types::DateTime,
    /// <p>The date of when the rule set was last modified.</p>
    pub last_modification_date: ::aws_smithy_types::DateTime,
    /// <p>The rules contained in the rule set.</p>
    pub rules: ::std::vec::Vec<crate::types::Rule>,
    _request_id: Option<String>,
}
impl GetRuleSetOutput {
    /// <p>The identifier of the rule set resource.</p>
    pub fn rule_set_id(&self) -> &str {
        use std::ops::Deref;
        self.rule_set_id.deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the rule set resource.</p>
    pub fn rule_set_arn(&self) -> &str {
        use std::ops::Deref;
        self.rule_set_arn.deref()
    }
    /// <p>A user-friendly name for the rule set resource.</p>
    pub fn rule_set_name(&self) -> &str {
        use std::ops::Deref;
        self.rule_set_name.deref()
    }
    /// <p>The date of when then rule set was created.</p>
    pub fn created_date(&self) -> &::aws_smithy_types::DateTime {
        &self.created_date
    }
    /// <p>The date of when the rule set was last modified.</p>
    pub fn last_modification_date(&self) -> &::aws_smithy_types::DateTime {
        &self.last_modification_date
    }
    /// <p>The rules contained in the rule set.</p>
    pub fn rules(&self) -> &[crate::types::Rule] {
        use std::ops::Deref;
        self.rules.deref()
    }
}
impl ::aws_types::request_id::RequestId for GetRuleSetOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetRuleSetOutput {
    /// Creates a new builder-style object to manufacture [`GetRuleSetOutput`](crate::operation::get_rule_set::GetRuleSetOutput).
    pub fn builder() -> crate::operation::get_rule_set::builders::GetRuleSetOutputBuilder {
        crate::operation::get_rule_set::builders::GetRuleSetOutputBuilder::default()
    }
}

/// A builder for [`GetRuleSetOutput`](crate::operation::get_rule_set::GetRuleSetOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GetRuleSetOutputBuilder {
    pub(crate) rule_set_id: ::std::option::Option<::std::string::String>,
    pub(crate) rule_set_arn: ::std::option::Option<::std::string::String>,
    pub(crate) rule_set_name: ::std::option::Option<::std::string::String>,
    pub(crate) created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_modification_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) rules: ::std::option::Option<::std::vec::Vec<crate::types::Rule>>,
    _request_id: Option<String>,
}
impl GetRuleSetOutputBuilder {
    /// <p>The identifier of the rule set resource.</p>
    /// This field is required.
    pub fn rule_set_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.rule_set_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the rule set resource.</p>
    pub fn set_rule_set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.rule_set_id = input;
        self
    }
    /// <p>The identifier of the rule set resource.</p>
    pub fn get_rule_set_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.rule_set_id
    }
    /// <p>The Amazon Resource Name (ARN) of the rule set resource.</p>
    /// This field is required.
    pub fn rule_set_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.rule_set_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the rule set resource.</p>
    pub fn set_rule_set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.rule_set_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the rule set resource.</p>
    pub fn get_rule_set_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.rule_set_arn
    }
    /// <p>A user-friendly name for the rule set resource.</p>
    /// This field is required.
    pub fn rule_set_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.rule_set_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A user-friendly name for the rule set resource.</p>
    pub fn set_rule_set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.rule_set_name = input;
        self
    }
    /// <p>A user-friendly name for the rule set resource.</p>
    pub fn get_rule_set_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.rule_set_name
    }
    /// <p>The date of when then rule set was created.</p>
    /// This field is required.
    pub fn created_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_date = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date of when then rule set was created.</p>
    pub fn set_created_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_date = input;
        self
    }
    /// <p>The date of when then rule set was created.</p>
    pub fn get_created_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_date
    }
    /// <p>The date of when the rule set was last modified.</p>
    /// This field is required.
    pub fn last_modification_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_modification_date = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date of when the rule set was last modified.</p>
    pub fn set_last_modification_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_modification_date = input;
        self
    }
    /// <p>The date of when the rule set was last modified.</p>
    pub fn get_last_modification_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_modification_date
    }
    /// Appends an item to `rules`.
    ///
    /// To override the contents of this collection use [`set_rules`](Self::set_rules).
    ///
    /// <p>The rules contained in the rule set.</p>
    pub fn rules(mut self, input: crate::types::Rule) -> Self {
        let mut v = self.rules.unwrap_or_default();
        v.push(input);
        self.rules = ::std::option::Option::Some(v);
        self
    }
    /// <p>The rules contained in the rule set.</p>
    pub fn set_rules(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Rule>>) -> Self {
        self.rules = input;
        self
    }
    /// <p>The rules contained in the rule set.</p>
    pub fn get_rules(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Rule>> {
        &self.rules
    }
    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
    }
    /// Consumes the builder and constructs a [`GetRuleSetOutput`](crate::operation::get_rule_set::GetRuleSetOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`rule_set_id`](crate::operation::get_rule_set::builders::GetRuleSetOutputBuilder::rule_set_id)
    /// - [`rule_set_arn`](crate::operation::get_rule_set::builders::GetRuleSetOutputBuilder::rule_set_arn)
    /// - [`rule_set_name`](crate::operation::get_rule_set::builders::GetRuleSetOutputBuilder::rule_set_name)
    /// - [`created_date`](crate::operation::get_rule_set::builders::GetRuleSetOutputBuilder::created_date)
    /// - [`last_modification_date`](crate::operation::get_rule_set::builders::GetRuleSetOutputBuilder::last_modification_date)
    /// - [`rules`](crate::operation::get_rule_set::builders::GetRuleSetOutputBuilder::rules)
    pub fn build(self) -> ::std::result::Result<crate::operation::get_rule_set::GetRuleSetOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_rule_set::GetRuleSetOutput {
            rule_set_id: self.rule_set_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "rule_set_id",
                    "rule_set_id was not specified but it is required when building GetRuleSetOutput",
                )
            })?,
            rule_set_arn: self.rule_set_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "rule_set_arn",
                    "rule_set_arn was not specified but it is required when building GetRuleSetOutput",
                )
            })?,
            rule_set_name: self.rule_set_name.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "rule_set_name",
                    "rule_set_name was not specified but it is required when building GetRuleSetOutput",
                )
            })?,
            created_date: self.created_date.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "created_date",
                    "created_date was not specified but it is required when building GetRuleSetOutput",
                )
            })?,
            last_modification_date: self.last_modification_date.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "last_modification_date",
                    "last_modification_date was not specified but it is required when building GetRuleSetOutput",
                )
            })?,
            rules: self.rules.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "rules",
                    "rules was not specified but it is required when building GetRuleSetOutput",
                )
            })?,
            _request_id: self._request_id,
        })
    }
}