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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The minimum, maximum, average, and sum.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Stats {
/// <p>The minimum of the usage statistics.</p>
pub min: ::std::option::Option<f64>,
/// <p>The maximum among the usage statistics.</p>
pub max: ::std::option::Option<f64>,
/// <p>The average of the usage statistics.</p>
pub avg: ::std::option::Option<f64>,
/// <p>The sum of the usage statistics.</p>
pub sum: ::std::option::Option<f64>,
}
impl Stats {
/// <p>The minimum of the usage statistics.</p>
pub fn min(&self) -> ::std::option::Option<f64> {
self.min
}
/// <p>The maximum among the usage statistics.</p>
pub fn max(&self) -> ::std::option::Option<f64> {
self.max
}
/// <p>The average of the usage statistics.</p>
pub fn avg(&self) -> ::std::option::Option<f64> {
self.avg
}
/// <p>The sum of the usage statistics.</p>
pub fn sum(&self) -> ::std::option::Option<f64> {
self.sum
}
}
impl Stats {
/// Creates a new builder-style object to manufacture [`Stats`](crate::types::Stats).
pub fn builder() -> crate::types::builders::StatsBuilder {
crate::types::builders::StatsBuilder::default()
}
}
/// A builder for [`Stats`](crate::types::Stats).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct StatsBuilder {
pub(crate) min: ::std::option::Option<f64>,
pub(crate) max: ::std::option::Option<f64>,
pub(crate) avg: ::std::option::Option<f64>,
pub(crate) sum: ::std::option::Option<f64>,
}
impl StatsBuilder {
/// <p>The minimum of the usage statistics.</p>
pub fn min(mut self, input: f64) -> Self {
self.min = ::std::option::Option::Some(input);
self
}
/// <p>The minimum of the usage statistics.</p>
pub fn set_min(mut self, input: ::std::option::Option<f64>) -> Self {
self.min = input;
self
}
/// <p>The minimum of the usage statistics.</p>
pub fn get_min(&self) -> &::std::option::Option<f64> {
&self.min
}
/// <p>The maximum among the usage statistics.</p>
pub fn max(mut self, input: f64) -> Self {
self.max = ::std::option::Option::Some(input);
self
}
/// <p>The maximum among the usage statistics.</p>
pub fn set_max(mut self, input: ::std::option::Option<f64>) -> Self {
self.max = input;
self
}
/// <p>The maximum among the usage statistics.</p>
pub fn get_max(&self) -> &::std::option::Option<f64> {
&self.max
}
/// <p>The average of the usage statistics.</p>
pub fn avg(mut self, input: f64) -> Self {
self.avg = ::std::option::Option::Some(input);
self
}
/// <p>The average of the usage statistics.</p>
pub fn set_avg(mut self, input: ::std::option::Option<f64>) -> Self {
self.avg = input;
self
}
/// <p>The average of the usage statistics.</p>
pub fn get_avg(&self) -> &::std::option::Option<f64> {
&self.avg
}
/// <p>The sum of the usage statistics.</p>
pub fn sum(mut self, input: f64) -> Self {
self.sum = ::std::option::Option::Some(input);
self
}
/// <p>The sum of the usage statistics.</p>
pub fn set_sum(mut self, input: ::std::option::Option<f64>) -> Self {
self.sum = input;
self
}
/// <p>The sum of the usage statistics.</p>
pub fn get_sum(&self) -> &::std::option::Option<f64> {
&self.sum
}
/// Consumes the builder and constructs a [`Stats`](crate::types::Stats).
pub fn build(self) -> crate::types::Stats {
crate::types::Stats {
min: self.min,
max: self.max,
avg: self.avg,
sum: self.sum,
}
}
}