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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes a problem that is detected by correlating observations.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Problem {
    /// <p>The ID of the problem.</p>
    pub id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the problem.</p>
    pub title: ::std::option::Option<::std::string::String>,
    /// <p>A detailed analysis of the problem using machine learning.</p>
    pub insights: ::std::option::Option<::std::string::String>,
    /// <p>The status of the problem.</p>
    pub status: ::std::option::Option<crate::types::Status>,
    /// <p>The resource affected by the problem.</p>
    pub affected_resource: ::std::option::Option<::std::string::String>,
    /// <p>The time when the problem started, in epoch seconds.</p>
    pub start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The time when the problem ended, in epoch seconds.</p>
    pub end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>A measure of the level of impact of the problem.</p>
    pub severity_level: ::std::option::Option<crate::types::SeverityLevel>,
    /// <p>The AWS account ID for the owner of the resource group affected by the problem.</p>
    pub account_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the resource group affected by the problem.</p>
    pub resource_group_name: ::std::option::Option<::std::string::String>,
    /// <p>Feedback provided by the user about the problem.</p>
    pub feedback: ::std::option::Option<::std::collections::HashMap<crate::types::FeedbackKey, crate::types::FeedbackValue>>,
    /// <p>The number of times that the same problem reoccurred after the first time it was resolved.</p>
    pub recurring_count: ::std::option::Option<i64>,
    /// <p>The last time that the problem reoccurred after its last resolution.</p>
    pub last_recurrence_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>Specifies whether or not you can view the problem. Updates to ignored problems do not generate notifications.</p>
    pub visibility: ::std::option::Option<crate::types::Visibility>,
    /// <p>Specifies how the problem was resolved. If the value is <code>AUTOMATIC</code>, the system resolved the problem. If the value is <code>MANUAL</code>, the user resolved the problem. If the value is <code>UNRESOLVED</code>, then the problem is not resolved.</p>
    pub resolution_method: ::std::option::Option<crate::types::ResolutionMethod>,
}
impl Problem {
    /// <p>The ID of the problem.</p>
    pub fn id(&self) -> ::std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The name of the problem.</p>
    pub fn title(&self) -> ::std::option::Option<&str> {
        self.title.as_deref()
    }
    /// <p>A detailed analysis of the problem using machine learning.</p>
    pub fn insights(&self) -> ::std::option::Option<&str> {
        self.insights.as_deref()
    }
    /// <p>The status of the problem.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::Status> {
        self.status.as_ref()
    }
    /// <p>The resource affected by the problem.</p>
    pub fn affected_resource(&self) -> ::std::option::Option<&str> {
        self.affected_resource.as_deref()
    }
    /// <p>The time when the problem started, in epoch seconds.</p>
    pub fn start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.start_time.as_ref()
    }
    /// <p>The time when the problem ended, in epoch seconds.</p>
    pub fn end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.end_time.as_ref()
    }
    /// <p>A measure of the level of impact of the problem.</p>
    pub fn severity_level(&self) -> ::std::option::Option<&crate::types::SeverityLevel> {
        self.severity_level.as_ref()
    }
    /// <p>The AWS account ID for the owner of the resource group affected by the problem.</p>
    pub fn account_id(&self) -> ::std::option::Option<&str> {
        self.account_id.as_deref()
    }
    /// <p>The name of the resource group affected by the problem.</p>
    pub fn resource_group_name(&self) -> ::std::option::Option<&str> {
        self.resource_group_name.as_deref()
    }
    /// <p>Feedback provided by the user about the problem.</p>
    pub fn feedback(&self) -> ::std::option::Option<&::std::collections::HashMap<crate::types::FeedbackKey, crate::types::FeedbackValue>> {
        self.feedback.as_ref()
    }
    /// <p>The number of times that the same problem reoccurred after the first time it was resolved.</p>
    pub fn recurring_count(&self) -> ::std::option::Option<i64> {
        self.recurring_count
    }
    /// <p>The last time that the problem reoccurred after its last resolution.</p>
    pub fn last_recurrence_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_recurrence_time.as_ref()
    }
    /// <p>Specifies whether or not you can view the problem. Updates to ignored problems do not generate notifications.</p>
    pub fn visibility(&self) -> ::std::option::Option<&crate::types::Visibility> {
        self.visibility.as_ref()
    }
    /// <p>Specifies how the problem was resolved. If the value is <code>AUTOMATIC</code>, the system resolved the problem. If the value is <code>MANUAL</code>, the user resolved the problem. If the value is <code>UNRESOLVED</code>, then the problem is not resolved.</p>
    pub fn resolution_method(&self) -> ::std::option::Option<&crate::types::ResolutionMethod> {
        self.resolution_method.as_ref()
    }
}
impl Problem {
    /// Creates a new builder-style object to manufacture [`Problem`](crate::types::Problem).
    pub fn builder() -> crate::types::builders::ProblemBuilder {
        crate::types::builders::ProblemBuilder::default()
    }
}

/// A builder for [`Problem`](crate::types::Problem).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ProblemBuilder {
    pub(crate) id: ::std::option::Option<::std::string::String>,
    pub(crate) title: ::std::option::Option<::std::string::String>,
    pub(crate) insights: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::Status>,
    pub(crate) affected_resource: ::std::option::Option<::std::string::String>,
    pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) severity_level: ::std::option::Option<crate::types::SeverityLevel>,
    pub(crate) account_id: ::std::option::Option<::std::string::String>,
    pub(crate) resource_group_name: ::std::option::Option<::std::string::String>,
    pub(crate) feedback: ::std::option::Option<::std::collections::HashMap<crate::types::FeedbackKey, crate::types::FeedbackValue>>,
    pub(crate) recurring_count: ::std::option::Option<i64>,
    pub(crate) last_recurrence_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) visibility: ::std::option::Option<crate::types::Visibility>,
    pub(crate) resolution_method: ::std::option::Option<crate::types::ResolutionMethod>,
}
impl ProblemBuilder {
    /// <p>The ID of the problem.</p>
    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the problem.</p>
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.id = input;
        self
    }
    /// <p>The ID of the problem.</p>
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// <p>The name of the problem.</p>
    pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.title = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the problem.</p>
    pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.title = input;
        self
    }
    /// <p>The name of the problem.</p>
    pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
        &self.title
    }
    /// <p>A detailed analysis of the problem using machine learning.</p>
    pub fn insights(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.insights = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A detailed analysis of the problem using machine learning.</p>
    pub fn set_insights(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.insights = input;
        self
    }
    /// <p>A detailed analysis of the problem using machine learning.</p>
    pub fn get_insights(&self) -> &::std::option::Option<::std::string::String> {
        &self.insights
    }
    /// <p>The status of the problem.</p>
    pub fn status(mut self, input: crate::types::Status) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the problem.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::Status>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status of the problem.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::Status> {
        &self.status
    }
    /// <p>The resource affected by the problem.</p>
    pub fn affected_resource(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.affected_resource = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The resource affected by the problem.</p>
    pub fn set_affected_resource(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.affected_resource = input;
        self
    }
    /// <p>The resource affected by the problem.</p>
    pub fn get_affected_resource(&self) -> &::std::option::Option<::std::string::String> {
        &self.affected_resource
    }
    /// <p>The time when the problem started, in epoch seconds.</p>
    pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.start_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time when the problem started, in epoch seconds.</p>
    pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.start_time = input;
        self
    }
    /// <p>The time when the problem started, in epoch seconds.</p>
    pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.start_time
    }
    /// <p>The time when the problem ended, in epoch seconds.</p>
    pub fn end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.end_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time when the problem ended, in epoch seconds.</p>
    pub fn set_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.end_time = input;
        self
    }
    /// <p>The time when the problem ended, in epoch seconds.</p>
    pub fn get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.end_time
    }
    /// <p>A measure of the level of impact of the problem.</p>
    pub fn severity_level(mut self, input: crate::types::SeverityLevel) -> Self {
        self.severity_level = ::std::option::Option::Some(input);
        self
    }
    /// <p>A measure of the level of impact of the problem.</p>
    pub fn set_severity_level(mut self, input: ::std::option::Option<crate::types::SeverityLevel>) -> Self {
        self.severity_level = input;
        self
    }
    /// <p>A measure of the level of impact of the problem.</p>
    pub fn get_severity_level(&self) -> &::std::option::Option<crate::types::SeverityLevel> {
        &self.severity_level
    }
    /// <p>The AWS account ID for the owner of the resource group affected by the problem.</p>
    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.account_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The AWS account ID for the owner of the resource group affected by the problem.</p>
    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.account_id = input;
        self
    }
    /// <p>The AWS account ID for the owner of the resource group affected by the problem.</p>
    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.account_id
    }
    /// <p>The name of the resource group affected by the problem.</p>
    pub fn resource_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.resource_group_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the resource group affected by the problem.</p>
    pub fn set_resource_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.resource_group_name = input;
        self
    }
    /// <p>The name of the resource group affected by the problem.</p>
    pub fn get_resource_group_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.resource_group_name
    }
    /// Adds a key-value pair to `feedback`.
    ///
    /// To override the contents of this collection use [`set_feedback`](Self::set_feedback).
    ///
    /// <p>Feedback provided by the user about the problem.</p>
    pub fn feedback(mut self, k: crate::types::FeedbackKey, v: crate::types::FeedbackValue) -> Self {
        let mut hash_map = self.feedback.unwrap_or_default();
        hash_map.insert(k, v);
        self.feedback = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>Feedback provided by the user about the problem.</p>
    pub fn set_feedback(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<crate::types::FeedbackKey, crate::types::FeedbackValue>>,
    ) -> Self {
        self.feedback = input;
        self
    }
    /// <p>Feedback provided by the user about the problem.</p>
    pub fn get_feedback(&self) -> &::std::option::Option<::std::collections::HashMap<crate::types::FeedbackKey, crate::types::FeedbackValue>> {
        &self.feedback
    }
    /// <p>The number of times that the same problem reoccurred after the first time it was resolved.</p>
    pub fn recurring_count(mut self, input: i64) -> Self {
        self.recurring_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of times that the same problem reoccurred after the first time it was resolved.</p>
    pub fn set_recurring_count(mut self, input: ::std::option::Option<i64>) -> Self {
        self.recurring_count = input;
        self
    }
    /// <p>The number of times that the same problem reoccurred after the first time it was resolved.</p>
    pub fn get_recurring_count(&self) -> &::std::option::Option<i64> {
        &self.recurring_count
    }
    /// <p>The last time that the problem reoccurred after its last resolution.</p>
    pub fn last_recurrence_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_recurrence_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The last time that the problem reoccurred after its last resolution.</p>
    pub fn set_last_recurrence_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_recurrence_time = input;
        self
    }
    /// <p>The last time that the problem reoccurred after its last resolution.</p>
    pub fn get_last_recurrence_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_recurrence_time
    }
    /// <p>Specifies whether or not you can view the problem. Updates to ignored problems do not generate notifications.</p>
    pub fn visibility(mut self, input: crate::types::Visibility) -> Self {
        self.visibility = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies whether or not you can view the problem. Updates to ignored problems do not generate notifications.</p>
    pub fn set_visibility(mut self, input: ::std::option::Option<crate::types::Visibility>) -> Self {
        self.visibility = input;
        self
    }
    /// <p>Specifies whether or not you can view the problem. Updates to ignored problems do not generate notifications.</p>
    pub fn get_visibility(&self) -> &::std::option::Option<crate::types::Visibility> {
        &self.visibility
    }
    /// <p>Specifies how the problem was resolved. If the value is <code>AUTOMATIC</code>, the system resolved the problem. If the value is <code>MANUAL</code>, the user resolved the problem. If the value is <code>UNRESOLVED</code>, then the problem is not resolved.</p>
    pub fn resolution_method(mut self, input: crate::types::ResolutionMethod) -> Self {
        self.resolution_method = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies how the problem was resolved. If the value is <code>AUTOMATIC</code>, the system resolved the problem. If the value is <code>MANUAL</code>, the user resolved the problem. If the value is <code>UNRESOLVED</code>, then the problem is not resolved.</p>
    pub fn set_resolution_method(mut self, input: ::std::option::Option<crate::types::ResolutionMethod>) -> Self {
        self.resolution_method = input;
        self
    }
    /// <p>Specifies how the problem was resolved. If the value is <code>AUTOMATIC</code>, the system resolved the problem. If the value is <code>MANUAL</code>, the user resolved the problem. If the value is <code>UNRESOLVED</code>, then the problem is not resolved.</p>
    pub fn get_resolution_method(&self) -> &::std::option::Option<crate::types::ResolutionMethod> {
        &self.resolution_method
    }
    /// Consumes the builder and constructs a [`Problem`](crate::types::Problem).
    pub fn build(self) -> crate::types::Problem {
        crate::types::Problem {
            id: self.id,
            title: self.title,
            insights: self.insights,
            status: self.status,
            affected_resource: self.affected_resource,
            start_time: self.start_time,
            end_time: self.end_time,
            severity_level: self.severity_level,
            account_id: self.account_id,
            resource_group_name: self.resource_group_name,
            feedback: self.feedback,
            recurring_count: self.recurring_count,
            last_recurrence_time: self.last_recurrence_time,
            visibility: self.visibility,
            resolution_method: self.resolution_method,
        }
    }
}