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>A map of key-value pairs for all supported statistics. For issues with missing or unexpected values for this API, consult <a href="https://docs.aws.amazon.com/iot/latest/developerguide/fleet-indexing-troubleshooting.html"> Fleet indexing troubleshooting guide</a>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Statistics {
/// <p>The count of things that match the query string criteria and contain a valid aggregation field value.</p>
pub count: i32,
/// <p>The average of the aggregated field values.</p>
pub average: ::std::option::Option<f64>,
/// <p>The sum of the aggregated field values.</p>
pub sum: ::std::option::Option<f64>,
/// <p>The minimum aggregated field value.</p>
pub minimum: ::std::option::Option<f64>,
/// <p>The maximum aggregated field value.</p>
pub maximum: ::std::option::Option<f64>,
/// <p>The sum of the squares of the aggregated field values.</p>
pub sum_of_squares: ::std::option::Option<f64>,
/// <p>The variance of the aggregated field values.</p>
pub variance: ::std::option::Option<f64>,
/// <p>The standard deviation of the aggregated field values.</p>
pub std_deviation: ::std::option::Option<f64>,
}
impl Statistics {
/// <p>The count of things that match the query string criteria and contain a valid aggregation field value.</p>
pub fn count(&self) -> i32 {
self.count
}
/// <p>The average of the aggregated field values.</p>
pub fn average(&self) -> ::std::option::Option<f64> {
self.average
}
/// <p>The sum of the aggregated field values.</p>
pub fn sum(&self) -> ::std::option::Option<f64> {
self.sum
}
/// <p>The minimum aggregated field value.</p>
pub fn minimum(&self) -> ::std::option::Option<f64> {
self.minimum
}
/// <p>The maximum aggregated field value.</p>
pub fn maximum(&self) -> ::std::option::Option<f64> {
self.maximum
}
/// <p>The sum of the squares of the aggregated field values.</p>
pub fn sum_of_squares(&self) -> ::std::option::Option<f64> {
self.sum_of_squares
}
/// <p>The variance of the aggregated field values.</p>
pub fn variance(&self) -> ::std::option::Option<f64> {
self.variance
}
/// <p>The standard deviation of the aggregated field values.</p>
pub fn std_deviation(&self) -> ::std::option::Option<f64> {
self.std_deviation
}
}
impl Statistics {
/// Creates a new builder-style object to manufacture [`Statistics`](crate::types::Statistics).
pub fn builder() -> crate::types::builders::StatisticsBuilder {
crate::types::builders::StatisticsBuilder::default()
}
}
/// A builder for [`Statistics`](crate::types::Statistics).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StatisticsBuilder {
pub(crate) count: ::std::option::Option<i32>,
pub(crate) average: ::std::option::Option<f64>,
pub(crate) sum: ::std::option::Option<f64>,
pub(crate) minimum: ::std::option::Option<f64>,
pub(crate) maximum: ::std::option::Option<f64>,
pub(crate) sum_of_squares: ::std::option::Option<f64>,
pub(crate) variance: ::std::option::Option<f64>,
pub(crate) std_deviation: ::std::option::Option<f64>,
}
impl StatisticsBuilder {
/// <p>The count of things that match the query string criteria and contain a valid aggregation field value.</p>
pub fn count(mut self, input: i32) -> Self {
self.count = ::std::option::Option::Some(input);
self
}
/// <p>The count of things that match the query string criteria and contain a valid aggregation field value.</p>
pub fn set_count(mut self, input: ::std::option::Option<i32>) -> Self {
self.count = input;
self
}
/// <p>The count of things that match the query string criteria and contain a valid aggregation field value.</p>
pub fn get_count(&self) -> &::std::option::Option<i32> {
&self.count
}
/// <p>The average of the aggregated field values.</p>
pub fn average(mut self, input: f64) -> Self {
self.average = ::std::option::Option::Some(input);
self
}
/// <p>The average of the aggregated field values.</p>
pub fn set_average(mut self, input: ::std::option::Option<f64>) -> Self {
self.average = input;
self
}
/// <p>The average of the aggregated field values.</p>
pub fn get_average(&self) -> &::std::option::Option<f64> {
&self.average
}
/// <p>The sum of the aggregated field values.</p>
pub fn sum(mut self, input: f64) -> Self {
self.sum = ::std::option::Option::Some(input);
self
}
/// <p>The sum of the aggregated field values.</p>
pub fn set_sum(mut self, input: ::std::option::Option<f64>) -> Self {
self.sum = input;
self
}
/// <p>The sum of the aggregated field values.</p>
pub fn get_sum(&self) -> &::std::option::Option<f64> {
&self.sum
}
/// <p>The minimum aggregated field value.</p>
pub fn minimum(mut self, input: f64) -> Self {
self.minimum = ::std::option::Option::Some(input);
self
}
/// <p>The minimum aggregated field value.</p>
pub fn set_minimum(mut self, input: ::std::option::Option<f64>) -> Self {
self.minimum = input;
self
}
/// <p>The minimum aggregated field value.</p>
pub fn get_minimum(&self) -> &::std::option::Option<f64> {
&self.minimum
}
/// <p>The maximum aggregated field value.</p>
pub fn maximum(mut self, input: f64) -> Self {
self.maximum = ::std::option::Option::Some(input);
self
}
/// <p>The maximum aggregated field value.</p>
pub fn set_maximum(mut self, input: ::std::option::Option<f64>) -> Self {
self.maximum = input;
self
}
/// <p>The maximum aggregated field value.</p>
pub fn get_maximum(&self) -> &::std::option::Option<f64> {
&self.maximum
}
/// <p>The sum of the squares of the aggregated field values.</p>
pub fn sum_of_squares(mut self, input: f64) -> Self {
self.sum_of_squares = ::std::option::Option::Some(input);
self
}
/// <p>The sum of the squares of the aggregated field values.</p>
pub fn set_sum_of_squares(mut self, input: ::std::option::Option<f64>) -> Self {
self.sum_of_squares = input;
self
}
/// <p>The sum of the squares of the aggregated field values.</p>
pub fn get_sum_of_squares(&self) -> &::std::option::Option<f64> {
&self.sum_of_squares
}
/// <p>The variance of the aggregated field values.</p>
pub fn variance(mut self, input: f64) -> Self {
self.variance = ::std::option::Option::Some(input);
self
}
/// <p>The variance of the aggregated field values.</p>
pub fn set_variance(mut self, input: ::std::option::Option<f64>) -> Self {
self.variance = input;
self
}
/// <p>The variance of the aggregated field values.</p>
pub fn get_variance(&self) -> &::std::option::Option<f64> {
&self.variance
}
/// <p>The standard deviation of the aggregated field values.</p>
pub fn std_deviation(mut self, input: f64) -> Self {
self.std_deviation = ::std::option::Option::Some(input);
self
}
/// <p>The standard deviation of the aggregated field values.</p>
pub fn set_std_deviation(mut self, input: ::std::option::Option<f64>) -> Self {
self.std_deviation = input;
self
}
/// <p>The standard deviation of the aggregated field values.</p>
pub fn get_std_deviation(&self) -> &::std::option::Option<f64> {
&self.std_deviation
}
/// Consumes the builder and constructs a [`Statistics`](crate::types::Statistics).
pub fn build(self) -> crate::types::Statistics {
crate::types::Statistics {
count: self.count.unwrap_or_default(),
average: self.average,
sum: self.sum,
minimum: self.minimum,
maximum: self.maximum,
sum_of_squares: self.sum_of_squares,
variance: self.variance,
std_deviation: self.std_deviation,
}
}
}