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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Response statistics for an edge.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct EdgeStatistics {
    /// <p>The number of requests that completed with a 2xx Success status code.</p>
    pub ok_count: ::std::option::Option<i64>,
    /// <p>Information about requests that failed with a 4xx Client Error status code.</p>
    pub error_statistics: ::std::option::Option<crate::types::ErrorStatistics>,
    /// <p>Information about requests that failed with a 5xx Server Error status code.</p>
    pub fault_statistics: ::std::option::Option<crate::types::FaultStatistics>,
    /// <p>The total number of completed requests.</p>
    pub total_count: ::std::option::Option<i64>,
    /// <p>The aggregate response time of completed requests.</p>
    pub total_response_time: ::std::option::Option<f64>,
}
impl EdgeStatistics {
    /// <p>The number of requests that completed with a 2xx Success status code.</p>
    pub fn ok_count(&self) -> ::std::option::Option<i64> {
        self.ok_count
    }
    /// <p>Information about requests that failed with a 4xx Client Error status code.</p>
    pub fn error_statistics(&self) -> ::std::option::Option<&crate::types::ErrorStatistics> {
        self.error_statistics.as_ref()
    }
    /// <p>Information about requests that failed with a 5xx Server Error status code.</p>
    pub fn fault_statistics(&self) -> ::std::option::Option<&crate::types::FaultStatistics> {
        self.fault_statistics.as_ref()
    }
    /// <p>The total number of completed requests.</p>
    pub fn total_count(&self) -> ::std::option::Option<i64> {
        self.total_count
    }
    /// <p>The aggregate response time of completed requests.</p>
    pub fn total_response_time(&self) -> ::std::option::Option<f64> {
        self.total_response_time
    }
}
impl EdgeStatistics {
    /// Creates a new builder-style object to manufacture [`EdgeStatistics`](crate::types::EdgeStatistics).
    pub fn builder() -> crate::types::builders::EdgeStatisticsBuilder {
        crate::types::builders::EdgeStatisticsBuilder::default()
    }
}

/// A builder for [`EdgeStatistics`](crate::types::EdgeStatistics).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct EdgeStatisticsBuilder {
    pub(crate) ok_count: ::std::option::Option<i64>,
    pub(crate) error_statistics: ::std::option::Option<crate::types::ErrorStatistics>,
    pub(crate) fault_statistics: ::std::option::Option<crate::types::FaultStatistics>,
    pub(crate) total_count: ::std::option::Option<i64>,
    pub(crate) total_response_time: ::std::option::Option<f64>,
}
impl EdgeStatisticsBuilder {
    /// <p>The number of requests that completed with a 2xx Success status code.</p>
    pub fn ok_count(mut self, input: i64) -> Self {
        self.ok_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of requests that completed with a 2xx Success status code.</p>
    pub fn set_ok_count(mut self, input: ::std::option::Option<i64>) -> Self {
        self.ok_count = input;
        self
    }
    /// <p>The number of requests that completed with a 2xx Success status code.</p>
    pub fn get_ok_count(&self) -> &::std::option::Option<i64> {
        &self.ok_count
    }
    /// <p>Information about requests that failed with a 4xx Client Error status code.</p>
    pub fn error_statistics(mut self, input: crate::types::ErrorStatistics) -> Self {
        self.error_statistics = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about requests that failed with a 4xx Client Error status code.</p>
    pub fn set_error_statistics(mut self, input: ::std::option::Option<crate::types::ErrorStatistics>) -> Self {
        self.error_statistics = input;
        self
    }
    /// <p>Information about requests that failed with a 4xx Client Error status code.</p>
    pub fn get_error_statistics(&self) -> &::std::option::Option<crate::types::ErrorStatistics> {
        &self.error_statistics
    }
    /// <p>Information about requests that failed with a 5xx Server Error status code.</p>
    pub fn fault_statistics(mut self, input: crate::types::FaultStatistics) -> Self {
        self.fault_statistics = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about requests that failed with a 5xx Server Error status code.</p>
    pub fn set_fault_statistics(mut self, input: ::std::option::Option<crate::types::FaultStatistics>) -> Self {
        self.fault_statistics = input;
        self
    }
    /// <p>Information about requests that failed with a 5xx Server Error status code.</p>
    pub fn get_fault_statistics(&self) -> &::std::option::Option<crate::types::FaultStatistics> {
        &self.fault_statistics
    }
    /// <p>The total number of completed requests.</p>
    pub fn total_count(mut self, input: i64) -> Self {
        self.total_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The total number of completed requests.</p>
    pub fn set_total_count(mut self, input: ::std::option::Option<i64>) -> Self {
        self.total_count = input;
        self
    }
    /// <p>The total number of completed requests.</p>
    pub fn get_total_count(&self) -> &::std::option::Option<i64> {
        &self.total_count
    }
    /// <p>The aggregate response time of completed requests.</p>
    pub fn total_response_time(mut self, input: f64) -> Self {
        self.total_response_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The aggregate response time of completed requests.</p>
    pub fn set_total_response_time(mut self, input: ::std::option::Option<f64>) -> Self {
        self.total_response_time = input;
        self
    }
    /// <p>The aggregate response time of completed requests.</p>
    pub fn get_total_response_time(&self) -> &::std::option::Option<f64> {
        &self.total_response_time
    }
    /// Consumes the builder and constructs a [`EdgeStatistics`](crate::types::EdgeStatistics).
    pub fn build(self) -> crate::types::EdgeStatistics {
        crate::types::EdgeStatistics {
            ok_count: self.ok_count,
            error_statistics: self.error_statistics,
            fault_statistics: self.fault_statistics,
            total_count: self.total_count,
            total_response_time: self.total_response_time,
        }
    }
}