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 the average latency for the slowest X percent of requests over the last 10 seconds.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Latency {
/// <p>The average latency for the slowest 0.1 percent of requests over the last 10 seconds.</p>
pub p999: ::std::option::Option<f64>,
/// <p>The average latency for the slowest 1 percent of requests over the last 10 seconds.</p>
pub p99: ::std::option::Option<f64>,
/// <p>The average latency for the slowest 5 percent of requests over the last 10 seconds.</p>
pub p95: ::std::option::Option<f64>,
/// <p>The average latency for the slowest 10 percent of requests over the last 10 seconds.</p>
pub p90: ::std::option::Option<f64>,
/// <p>The average latency for the slowest 15 percent of requests over the last 10 seconds.</p>
pub p85: ::std::option::Option<f64>,
/// <p>The average latency for the slowest 25 percent of requests over the last 10 seconds.</p>
pub p75: ::std::option::Option<f64>,
/// <p>The average latency for the slowest 50 percent of requests over the last 10 seconds.</p>
pub p50: ::std::option::Option<f64>,
/// <p>The average latency for the slowest 90 percent of requests over the last 10 seconds.</p>
pub p10: ::std::option::Option<f64>,
}
impl Latency {
/// <p>The average latency for the slowest 0.1 percent of requests over the last 10 seconds.</p>
pub fn p999(&self) -> ::std::option::Option<f64> {
self.p999
}
/// <p>The average latency for the slowest 1 percent of requests over the last 10 seconds.</p>
pub fn p99(&self) -> ::std::option::Option<f64> {
self.p99
}
/// <p>The average latency for the slowest 5 percent of requests over the last 10 seconds.</p>
pub fn p95(&self) -> ::std::option::Option<f64> {
self.p95
}
/// <p>The average latency for the slowest 10 percent of requests over the last 10 seconds.</p>
pub fn p90(&self) -> ::std::option::Option<f64> {
self.p90
}
/// <p>The average latency for the slowest 15 percent of requests over the last 10 seconds.</p>
pub fn p85(&self) -> ::std::option::Option<f64> {
self.p85
}
/// <p>The average latency for the slowest 25 percent of requests over the last 10 seconds.</p>
pub fn p75(&self) -> ::std::option::Option<f64> {
self.p75
}
/// <p>The average latency for the slowest 50 percent of requests over the last 10 seconds.</p>
pub fn p50(&self) -> ::std::option::Option<f64> {
self.p50
}
/// <p>The average latency for the slowest 90 percent of requests over the last 10 seconds.</p>
pub fn p10(&self) -> ::std::option::Option<f64> {
self.p10
}
}
impl Latency {
/// Creates a new builder-style object to manufacture [`Latency`](crate::types::Latency).
pub fn builder() -> crate::types::builders::LatencyBuilder {
crate::types::builders::LatencyBuilder::default()
}
}
/// A builder for [`Latency`](crate::types::Latency).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct LatencyBuilder {
pub(crate) p999: ::std::option::Option<f64>,
pub(crate) p99: ::std::option::Option<f64>,
pub(crate) p95: ::std::option::Option<f64>,
pub(crate) p90: ::std::option::Option<f64>,
pub(crate) p85: ::std::option::Option<f64>,
pub(crate) p75: ::std::option::Option<f64>,
pub(crate) p50: ::std::option::Option<f64>,
pub(crate) p10: ::std::option::Option<f64>,
}
impl LatencyBuilder {
/// <p>The average latency for the slowest 0.1 percent of requests over the last 10 seconds.</p>
pub fn p999(mut self, input: f64) -> Self {
self.p999 = ::std::option::Option::Some(input);
self
}
/// <p>The average latency for the slowest 0.1 percent of requests over the last 10 seconds.</p>
pub fn set_p999(mut self, input: ::std::option::Option<f64>) -> Self {
self.p999 = input;
self
}
/// <p>The average latency for the slowest 0.1 percent of requests over the last 10 seconds.</p>
pub fn get_p999(&self) -> &::std::option::Option<f64> {
&self.p999
}
/// <p>The average latency for the slowest 1 percent of requests over the last 10 seconds.</p>
pub fn p99(mut self, input: f64) -> Self {
self.p99 = ::std::option::Option::Some(input);
self
}
/// <p>The average latency for the slowest 1 percent of requests over the last 10 seconds.</p>
pub fn set_p99(mut self, input: ::std::option::Option<f64>) -> Self {
self.p99 = input;
self
}
/// <p>The average latency for the slowest 1 percent of requests over the last 10 seconds.</p>
pub fn get_p99(&self) -> &::std::option::Option<f64> {
&self.p99
}
/// <p>The average latency for the slowest 5 percent of requests over the last 10 seconds.</p>
pub fn p95(mut self, input: f64) -> Self {
self.p95 = ::std::option::Option::Some(input);
self
}
/// <p>The average latency for the slowest 5 percent of requests over the last 10 seconds.</p>
pub fn set_p95(mut self, input: ::std::option::Option<f64>) -> Self {
self.p95 = input;
self
}
/// <p>The average latency for the slowest 5 percent of requests over the last 10 seconds.</p>
pub fn get_p95(&self) -> &::std::option::Option<f64> {
&self.p95
}
/// <p>The average latency for the slowest 10 percent of requests over the last 10 seconds.</p>
pub fn p90(mut self, input: f64) -> Self {
self.p90 = ::std::option::Option::Some(input);
self
}
/// <p>The average latency for the slowest 10 percent of requests over the last 10 seconds.</p>
pub fn set_p90(mut self, input: ::std::option::Option<f64>) -> Self {
self.p90 = input;
self
}
/// <p>The average latency for the slowest 10 percent of requests over the last 10 seconds.</p>
pub fn get_p90(&self) -> &::std::option::Option<f64> {
&self.p90
}
/// <p>The average latency for the slowest 15 percent of requests over the last 10 seconds.</p>
pub fn p85(mut self, input: f64) -> Self {
self.p85 = ::std::option::Option::Some(input);
self
}
/// <p>The average latency for the slowest 15 percent of requests over the last 10 seconds.</p>
pub fn set_p85(mut self, input: ::std::option::Option<f64>) -> Self {
self.p85 = input;
self
}
/// <p>The average latency for the slowest 15 percent of requests over the last 10 seconds.</p>
pub fn get_p85(&self) -> &::std::option::Option<f64> {
&self.p85
}
/// <p>The average latency for the slowest 25 percent of requests over the last 10 seconds.</p>
pub fn p75(mut self, input: f64) -> Self {
self.p75 = ::std::option::Option::Some(input);
self
}
/// <p>The average latency for the slowest 25 percent of requests over the last 10 seconds.</p>
pub fn set_p75(mut self, input: ::std::option::Option<f64>) -> Self {
self.p75 = input;
self
}
/// <p>The average latency for the slowest 25 percent of requests over the last 10 seconds.</p>
pub fn get_p75(&self) -> &::std::option::Option<f64> {
&self.p75
}
/// <p>The average latency for the slowest 50 percent of requests over the last 10 seconds.</p>
pub fn p50(mut self, input: f64) -> Self {
self.p50 = ::std::option::Option::Some(input);
self
}
/// <p>The average latency for the slowest 50 percent of requests over the last 10 seconds.</p>
pub fn set_p50(mut self, input: ::std::option::Option<f64>) -> Self {
self.p50 = input;
self
}
/// <p>The average latency for the slowest 50 percent of requests over the last 10 seconds.</p>
pub fn get_p50(&self) -> &::std::option::Option<f64> {
&self.p50
}
/// <p>The average latency for the slowest 90 percent of requests over the last 10 seconds.</p>
pub fn p10(mut self, input: f64) -> Self {
self.p10 = ::std::option::Option::Some(input);
self
}
/// <p>The average latency for the slowest 90 percent of requests over the last 10 seconds.</p>
pub fn set_p10(mut self, input: ::std::option::Option<f64>) -> Self {
self.p10 = input;
self
}
/// <p>The average latency for the slowest 90 percent of requests over the last 10 seconds.</p>
pub fn get_p10(&self) -> &::std::option::Option<f64> {
&self.p10
}
/// Consumes the builder and constructs a [`Latency`](crate::types::Latency).
pub fn build(self) -> crate::types::Latency {
crate::types::Latency {
p999: self.p999,
p99: self.p99,
p95: self.p95,
p90: self.p90,
p85: self.p85,
p75: self.p75,
p50: self.p50,
p10: self.p10,
}
}
}