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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Represents an insight returned by the <code>ListInsights</code> operation. An insight is a notification about a domain event or recommendation that helps you optimize your Amazon OpenSearch Service domain.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Insight {
/// <p>The unique identifier of the insight.</p>
pub insight_id: ::std::option::Option<::std::string::String>,
/// <p>The display name of the insight.</p>
pub display_name: ::std::option::Option<::std::string::String>,
/// <p>The type of the insight. Possible values are <code>EVENT</code> and <code>RECOMMENDATION</code>.</p>
pub r#type: ::std::option::Option<crate::types::InsightType>,
/// <p>The priority level of the insight. Possible values are <code>CRITICAL</code>, <code>HIGH</code>, <code>MEDIUM</code>, and <code>LOW</code>.</p>
pub priority: ::std::option::Option<crate::types::InsightPriorityLevel>,
/// <p>The current status of the insight. Possible values are <code>ACTIVE</code>, <code>RESOLVED</code>, and <code>DISMISSED</code>.</p>
pub status: ::std::option::Option<crate::types::InsightStatus>,
/// <p>The timestamp when the insight was created, in epoch milliseconds.</p>
pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The timestamp when the insight was last updated, in epoch milliseconds.</p>
pub update_time: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>Indicates whether the insight is experimental.</p>
pub is_experimental: ::std::option::Option<bool>,
}
impl Insight {
/// <p>The unique identifier of the insight.</p>
pub fn insight_id(&self) -> ::std::option::Option<&str> {
self.insight_id.as_deref()
}
/// <p>The display name of the insight.</p>
pub fn display_name(&self) -> ::std::option::Option<&str> {
self.display_name.as_deref()
}
/// <p>The type of the insight. Possible values are <code>EVENT</code> and <code>RECOMMENDATION</code>.</p>
pub fn r#type(&self) -> ::std::option::Option<&crate::types::InsightType> {
self.r#type.as_ref()
}
/// <p>The priority level of the insight. Possible values are <code>CRITICAL</code>, <code>HIGH</code>, <code>MEDIUM</code>, and <code>LOW</code>.</p>
pub fn priority(&self) -> ::std::option::Option<&crate::types::InsightPriorityLevel> {
self.priority.as_ref()
}
/// <p>The current status of the insight. Possible values are <code>ACTIVE</code>, <code>RESOLVED</code>, and <code>DISMISSED</code>.</p>
pub fn status(&self) -> ::std::option::Option<&crate::types::InsightStatus> {
self.status.as_ref()
}
/// <p>The timestamp when the insight was created, in epoch milliseconds.</p>
pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.creation_time.as_ref()
}
/// <p>The timestamp when the insight was last updated, in epoch milliseconds.</p>
pub fn update_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.update_time.as_ref()
}
/// <p>Indicates whether the insight is experimental.</p>
pub fn is_experimental(&self) -> ::std::option::Option<bool> {
self.is_experimental
}
}
impl Insight {
/// Creates a new builder-style object to manufacture [`Insight`](crate::types::Insight).
pub fn builder() -> crate::types::builders::InsightBuilder {
crate::types::builders::InsightBuilder::default()
}
}
/// A builder for [`Insight`](crate::types::Insight).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct InsightBuilder {
pub(crate) insight_id: ::std::option::Option<::std::string::String>,
pub(crate) display_name: ::std::option::Option<::std::string::String>,
pub(crate) r#type: ::std::option::Option<crate::types::InsightType>,
pub(crate) priority: ::std::option::Option<crate::types::InsightPriorityLevel>,
pub(crate) status: ::std::option::Option<crate::types::InsightStatus>,
pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) update_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) is_experimental: ::std::option::Option<bool>,
}
impl InsightBuilder {
/// <p>The unique identifier of the insight.</p>
pub fn insight_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.insight_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique identifier of the insight.</p>
pub fn set_insight_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.insight_id = input;
self
}
/// <p>The unique identifier of the insight.</p>
pub fn get_insight_id(&self) -> &::std::option::Option<::std::string::String> {
&self.insight_id
}
/// <p>The display name of the insight.</p>
pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.display_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The display name of the insight.</p>
pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.display_name = input;
self
}
/// <p>The display name of the insight.</p>
pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
&self.display_name
}
/// <p>The type of the insight. Possible values are <code>EVENT</code> and <code>RECOMMENDATION</code>.</p>
pub fn r#type(mut self, input: crate::types::InsightType) -> Self {
self.r#type = ::std::option::Option::Some(input);
self
}
/// <p>The type of the insight. Possible values are <code>EVENT</code> and <code>RECOMMENDATION</code>.</p>
pub fn set_type(mut self, input: ::std::option::Option<crate::types::InsightType>) -> Self {
self.r#type = input;
self
}
/// <p>The type of the insight. Possible values are <code>EVENT</code> and <code>RECOMMENDATION</code>.</p>
pub fn get_type(&self) -> &::std::option::Option<crate::types::InsightType> {
&self.r#type
}
/// <p>The priority level of the insight. Possible values are <code>CRITICAL</code>, <code>HIGH</code>, <code>MEDIUM</code>, and <code>LOW</code>.</p>
pub fn priority(mut self, input: crate::types::InsightPriorityLevel) -> Self {
self.priority = ::std::option::Option::Some(input);
self
}
/// <p>The priority level of the insight. Possible values are <code>CRITICAL</code>, <code>HIGH</code>, <code>MEDIUM</code>, and <code>LOW</code>.</p>
pub fn set_priority(mut self, input: ::std::option::Option<crate::types::InsightPriorityLevel>) -> Self {
self.priority = input;
self
}
/// <p>The priority level of the insight. Possible values are <code>CRITICAL</code>, <code>HIGH</code>, <code>MEDIUM</code>, and <code>LOW</code>.</p>
pub fn get_priority(&self) -> &::std::option::Option<crate::types::InsightPriorityLevel> {
&self.priority
}
/// <p>The current status of the insight. Possible values are <code>ACTIVE</code>, <code>RESOLVED</code>, and <code>DISMISSED</code>.</p>
pub fn status(mut self, input: crate::types::InsightStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
/// <p>The current status of the insight. Possible values are <code>ACTIVE</code>, <code>RESOLVED</code>, and <code>DISMISSED</code>.</p>
pub fn set_status(mut self, input: ::std::option::Option<crate::types::InsightStatus>) -> Self {
self.status = input;
self
}
/// <p>The current status of the insight. Possible values are <code>ACTIVE</code>, <code>RESOLVED</code>, and <code>DISMISSED</code>.</p>
pub fn get_status(&self) -> &::std::option::Option<crate::types::InsightStatus> {
&self.status
}
/// <p>The timestamp when the insight was created, in epoch milliseconds.</p>
pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.creation_time = ::std::option::Option::Some(input);
self
}
/// <p>The timestamp when the insight was created, in epoch milliseconds.</p>
pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.creation_time = input;
self
}
/// <p>The timestamp when the insight was created, in epoch milliseconds.</p>
pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.creation_time
}
/// <p>The timestamp when the insight was last updated, in epoch milliseconds.</p>
pub fn update_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.update_time = ::std::option::Option::Some(input);
self
}
/// <p>The timestamp when the insight was last updated, in epoch milliseconds.</p>
pub fn set_update_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.update_time = input;
self
}
/// <p>The timestamp when the insight was last updated, in epoch milliseconds.</p>
pub fn get_update_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.update_time
}
/// <p>Indicates whether the insight is experimental.</p>
pub fn is_experimental(mut self, input: bool) -> Self {
self.is_experimental = ::std::option::Option::Some(input);
self
}
/// <p>Indicates whether the insight is experimental.</p>
pub fn set_is_experimental(mut self, input: ::std::option::Option<bool>) -> Self {
self.is_experimental = input;
self
}
/// <p>Indicates whether the insight is experimental.</p>
pub fn get_is_experimental(&self) -> &::std::option::Option<bool> {
&self.is_experimental
}
/// Consumes the builder and constructs a [`Insight`](crate::types::Insight).
pub fn build(self) -> crate::types::Insight {
crate::types::Insight {
insight_id: self.insight_id,
display_name: self.display_name,
r#type: self.r#type,
priority: self.priority,
status: self.status,
creation_time: self.creation_time,
update_time: self.update_time,
is_experimental: self.is_experimental,
}
}
}