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>Contains information about a historical metric. For a description of each metric, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/historical-metrics-definitions.html">Historical Metrics Definitions</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct HistoricalMetric {
    /// <p>The name of the metric.</p>
    pub name: ::std::option::Option<crate::types::HistoricalMetricName>,
    /// <p>The threshold for the metric, used with service level metrics.</p>
    pub threshold: ::std::option::Option<crate::types::Threshold>,
    /// <p>The statistic for the metric.</p>
    pub statistic: ::std::option::Option<crate::types::Statistic>,
    /// <p>The unit for the metric.</p>
    pub unit: ::std::option::Option<crate::types::Unit>,
}
impl HistoricalMetric {
    /// <p>The name of the metric.</p>
    pub fn name(&self) -> ::std::option::Option<&crate::types::HistoricalMetricName> {
        self.name.as_ref()
    }
    /// <p>The threshold for the metric, used with service level metrics.</p>
    pub fn threshold(&self) -> ::std::option::Option<&crate::types::Threshold> {
        self.threshold.as_ref()
    }
    /// <p>The statistic for the metric.</p>
    pub fn statistic(&self) -> ::std::option::Option<&crate::types::Statistic> {
        self.statistic.as_ref()
    }
    /// <p>The unit for the metric.</p>
    pub fn unit(&self) -> ::std::option::Option<&crate::types::Unit> {
        self.unit.as_ref()
    }
}
impl HistoricalMetric {
    /// Creates a new builder-style object to manufacture [`HistoricalMetric`](crate::types::HistoricalMetric).
    pub fn builder() -> crate::types::builders::HistoricalMetricBuilder {
        crate::types::builders::HistoricalMetricBuilder::default()
    }
}

/// A builder for [`HistoricalMetric`](crate::types::HistoricalMetric).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct HistoricalMetricBuilder {
    pub(crate) name: ::std::option::Option<crate::types::HistoricalMetricName>,
    pub(crate) threshold: ::std::option::Option<crate::types::Threshold>,
    pub(crate) statistic: ::std::option::Option<crate::types::Statistic>,
    pub(crate) unit: ::std::option::Option<crate::types::Unit>,
}
impl HistoricalMetricBuilder {
    /// <p>The name of the metric.</p>
    pub fn name(mut self, input: crate::types::HistoricalMetricName) -> Self {
        self.name = ::std::option::Option::Some(input);
        self
    }
    /// <p>The name of the metric.</p>
    pub fn set_name(mut self, input: ::std::option::Option<crate::types::HistoricalMetricName>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the metric.</p>
    pub fn get_name(&self) -> &::std::option::Option<crate::types::HistoricalMetricName> {
        &self.name
    }
    /// <p>The threshold for the metric, used with service level metrics.</p>
    pub fn threshold(mut self, input: crate::types::Threshold) -> Self {
        self.threshold = ::std::option::Option::Some(input);
        self
    }
    /// <p>The threshold for the metric, used with service level metrics.</p>
    pub fn set_threshold(mut self, input: ::std::option::Option<crate::types::Threshold>) -> Self {
        self.threshold = input;
        self
    }
    /// <p>The threshold for the metric, used with service level metrics.</p>
    pub fn get_threshold(&self) -> &::std::option::Option<crate::types::Threshold> {
        &self.threshold
    }
    /// <p>The statistic for the metric.</p>
    pub fn statistic(mut self, input: crate::types::Statistic) -> Self {
        self.statistic = ::std::option::Option::Some(input);
        self
    }
    /// <p>The statistic for the metric.</p>
    pub fn set_statistic(mut self, input: ::std::option::Option<crate::types::Statistic>) -> Self {
        self.statistic = input;
        self
    }
    /// <p>The statistic for the metric.</p>
    pub fn get_statistic(&self) -> &::std::option::Option<crate::types::Statistic> {
        &self.statistic
    }
    /// <p>The unit for the metric.</p>
    pub fn unit(mut self, input: crate::types::Unit) -> Self {
        self.unit = ::std::option::Option::Some(input);
        self
    }
    /// <p>The unit for the metric.</p>
    pub fn set_unit(mut self, input: ::std::option::Option<crate::types::Unit>) -> Self {
        self.unit = input;
        self
    }
    /// <p>The unit for the metric.</p>
    pub fn get_unit(&self) -> &::std::option::Option<crate::types::Unit> {
        &self.unit
    }
    /// Consumes the builder and constructs a [`HistoricalMetric`](crate::types::HistoricalMetric).
    pub fn build(self) -> crate::types::HistoricalMetric {
        crate::types::HistoricalMetric {
            name: self.name,
            threshold: self.threshold,
            statistic: self.statistic,
            unit: self.unit,
        }
    }
}