1#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct LabelPair {
4 #[prost(string, optional, tag = "1")]
5 pub name: ::core::option::Option<::prost::alloc::string::String>,
6 #[prost(string, optional, tag = "2")]
7 pub value: ::core::option::Option<::prost::alloc::string::String>,
8}
9impl ::prost::Name for LabelPair {
10 const NAME: &'static str = "LabelPair";
11 const PACKAGE: &'static str = "io.prometheus.client";
12 fn full_name() -> ::prost::alloc::string::String {
13 "io.prometheus.client.LabelPair".into()
14 }
15 fn type_url() -> ::prost::alloc::string::String {
16 "/io.prometheus.client.LabelPair".into()
17 }
18}
19#[derive(Clone, Copy, PartialEq, ::prost::Message)]
20pub struct Gauge {
21 #[prost(double, optional, tag = "1")]
22 pub value: ::core::option::Option<f64>,
23}
24impl ::prost::Name for Gauge {
25 const NAME: &'static str = "Gauge";
26 const PACKAGE: &'static str = "io.prometheus.client";
27 fn full_name() -> ::prost::alloc::string::String {
28 "io.prometheus.client.Gauge".into()
29 }
30 fn type_url() -> ::prost::alloc::string::String {
31 "/io.prometheus.client.Gauge".into()
32 }
33}
34#[derive(Clone, PartialEq, ::prost::Message)]
35pub struct Counter {
36 #[prost(double, optional, tag = "1")]
37 pub value: ::core::option::Option<f64>,
38 #[prost(message, optional, tag = "2")]
39 pub exemplar: ::core::option::Option<Exemplar>,
40 #[prost(message, optional, tag = "3")]
41 pub created_timestamp: ::core::option::Option<
42 super::super::super::google::protobuf::Timestamp,
43 >,
44}
45impl ::prost::Name for Counter {
46 const NAME: &'static str = "Counter";
47 const PACKAGE: &'static str = "io.prometheus.client";
48 fn full_name() -> ::prost::alloc::string::String {
49 "io.prometheus.client.Counter".into()
50 }
51 fn type_url() -> ::prost::alloc::string::String {
52 "/io.prometheus.client.Counter".into()
53 }
54}
55#[derive(Clone, Copy, PartialEq, ::prost::Message)]
56pub struct Quantile {
57 #[prost(double, optional, tag = "1")]
58 pub quantile: ::core::option::Option<f64>,
59 #[prost(double, optional, tag = "2")]
60 pub value: ::core::option::Option<f64>,
61}
62impl ::prost::Name for Quantile {
63 const NAME: &'static str = "Quantile";
64 const PACKAGE: &'static str = "io.prometheus.client";
65 fn full_name() -> ::prost::alloc::string::String {
66 "io.prometheus.client.Quantile".into()
67 }
68 fn type_url() -> ::prost::alloc::string::String {
69 "/io.prometheus.client.Quantile".into()
70 }
71}
72#[derive(Clone, PartialEq, ::prost::Message)]
73pub struct Summary {
74 #[prost(uint64, optional, tag = "1")]
75 pub sample_count: ::core::option::Option<u64>,
76 #[prost(double, optional, tag = "2")]
77 pub sample_sum: ::core::option::Option<f64>,
78 #[prost(message, repeated, tag = "3")]
79 pub quantile: ::prost::alloc::vec::Vec<Quantile>,
80 #[prost(message, optional, tag = "4")]
81 pub created_timestamp: ::core::option::Option<
82 super::super::super::google::protobuf::Timestamp,
83 >,
84}
85impl ::prost::Name for Summary {
86 const NAME: &'static str = "Summary";
87 const PACKAGE: &'static str = "io.prometheus.client";
88 fn full_name() -> ::prost::alloc::string::String {
89 "io.prometheus.client.Summary".into()
90 }
91 fn type_url() -> ::prost::alloc::string::String {
92 "/io.prometheus.client.Summary".into()
93 }
94}
95#[derive(Clone, Copy, PartialEq, ::prost::Message)]
96pub struct Untyped {
97 #[prost(double, optional, tag = "1")]
98 pub value: ::core::option::Option<f64>,
99}
100impl ::prost::Name for Untyped {
101 const NAME: &'static str = "Untyped";
102 const PACKAGE: &'static str = "io.prometheus.client";
103 fn full_name() -> ::prost::alloc::string::String {
104 "io.prometheus.client.Untyped".into()
105 }
106 fn type_url() -> ::prost::alloc::string::String {
107 "/io.prometheus.client.Untyped".into()
108 }
109}
110#[derive(Clone, PartialEq, ::prost::Message)]
111pub struct Histogram {
112 #[prost(uint64, optional, tag = "1")]
113 pub sample_count: ::core::option::Option<u64>,
114 #[prost(double, optional, tag = "4")]
116 pub sample_count_float: ::core::option::Option<f64>,
117 #[prost(double, optional, tag = "2")]
118 pub sample_sum: ::core::option::Option<f64>,
119 #[prost(message, repeated, tag = "3")]
123 pub bucket: ::prost::alloc::vec::Vec<Bucket>,
124 #[prost(message, optional, tag = "15")]
125 pub created_timestamp: ::core::option::Option<
126 super::super::super::google::protobuf::Timestamp,
127 >,
128 #[prost(sint32, optional, tag = "5")]
134 pub schema: ::core::option::Option<i32>,
135 #[prost(double, optional, tag = "6")]
137 pub zero_threshold: ::core::option::Option<f64>,
138 #[prost(uint64, optional, tag = "7")]
140 pub zero_count: ::core::option::Option<u64>,
141 #[prost(double, optional, tag = "8")]
143 pub zero_count_float: ::core::option::Option<f64>,
144 #[prost(message, repeated, tag = "9")]
146 pub negative_span: ::prost::alloc::vec::Vec<BucketSpan>,
147 #[prost(sint64, repeated, packed = "false", tag = "10")]
153 pub negative_delta: ::prost::alloc::vec::Vec<i64>,
154 #[prost(double, repeated, packed = "false", tag = "11")]
156 pub negative_count: ::prost::alloc::vec::Vec<f64>,
157 #[prost(message, repeated, tag = "12")]
162 pub positive_span: ::prost::alloc::vec::Vec<BucketSpan>,
163 #[prost(sint64, repeated, packed = "false", tag = "13")]
169 pub positive_delta: ::prost::alloc::vec::Vec<i64>,
170 #[prost(double, repeated, packed = "false", tag = "14")]
172 pub positive_count: ::prost::alloc::vec::Vec<f64>,
173 #[prost(message, repeated, tag = "16")]
175 pub exemplars: ::prost::alloc::vec::Vec<Exemplar>,
176}
177impl ::prost::Name for Histogram {
178 const NAME: &'static str = "Histogram";
179 const PACKAGE: &'static str = "io.prometheus.client";
180 fn full_name() -> ::prost::alloc::string::String {
181 "io.prometheus.client.Histogram".into()
182 }
183 fn type_url() -> ::prost::alloc::string::String {
184 "/io.prometheus.client.Histogram".into()
185 }
186}
187#[derive(Clone, PartialEq, ::prost::Message)]
190pub struct Bucket {
191 #[prost(uint64, optional, tag = "1")]
193 pub cumulative_count: ::core::option::Option<u64>,
194 #[prost(double, optional, tag = "4")]
196 pub cumulative_count_float: ::core::option::Option<f64>,
197 #[prost(double, optional, tag = "2")]
199 pub upper_bound: ::core::option::Option<f64>,
200 #[prost(message, optional, tag = "3")]
201 pub exemplar: ::core::option::Option<Exemplar>,
202}
203impl ::prost::Name for Bucket {
204 const NAME: &'static str = "Bucket";
205 const PACKAGE: &'static str = "io.prometheus.client";
206 fn full_name() -> ::prost::alloc::string::String {
207 "io.prometheus.client.Bucket".into()
208 }
209 fn type_url() -> ::prost::alloc::string::String {
210 "/io.prometheus.client.Bucket".into()
211 }
212}
213#[derive(Clone, Copy, PartialEq, ::prost::Message)]
220pub struct BucketSpan {
221 #[prost(sint32, optional, tag = "1")]
223 pub offset: ::core::option::Option<i32>,
224 #[prost(uint32, optional, tag = "2")]
226 pub length: ::core::option::Option<u32>,
227}
228impl ::prost::Name for BucketSpan {
229 const NAME: &'static str = "BucketSpan";
230 const PACKAGE: &'static str = "io.prometheus.client";
231 fn full_name() -> ::prost::alloc::string::String {
232 "io.prometheus.client.BucketSpan".into()
233 }
234 fn type_url() -> ::prost::alloc::string::String {
235 "/io.prometheus.client.BucketSpan".into()
236 }
237}
238#[derive(Clone, PartialEq, ::prost::Message)]
239pub struct Exemplar {
240 #[prost(message, repeated, tag = "1")]
241 pub label: ::prost::alloc::vec::Vec<LabelPair>,
242 #[prost(double, optional, tag = "2")]
243 pub value: ::core::option::Option<f64>,
244 #[prost(message, optional, tag = "3")]
246 pub timestamp: ::core::option::Option<
247 super::super::super::google::protobuf::Timestamp,
248 >,
249}
250impl ::prost::Name for Exemplar {
251 const NAME: &'static str = "Exemplar";
252 const PACKAGE: &'static str = "io.prometheus.client";
253 fn full_name() -> ::prost::alloc::string::String {
254 "io.prometheus.client.Exemplar".into()
255 }
256 fn type_url() -> ::prost::alloc::string::String {
257 "/io.prometheus.client.Exemplar".into()
258 }
259}
260#[derive(Clone, PartialEq, ::prost::Message)]
261pub struct Metric {
262 #[prost(message, repeated, tag = "1")]
263 pub label: ::prost::alloc::vec::Vec<LabelPair>,
264 #[prost(message, optional, tag = "2")]
265 pub gauge: ::core::option::Option<Gauge>,
266 #[prost(message, optional, tag = "3")]
267 pub counter: ::core::option::Option<Counter>,
268 #[prost(message, optional, tag = "4")]
269 pub summary: ::core::option::Option<Summary>,
270 #[prost(message, optional, tag = "5")]
271 pub untyped: ::core::option::Option<Untyped>,
272 #[prost(message, optional, tag = "7")]
273 pub histogram: ::core::option::Option<Histogram>,
274 #[prost(int64, optional, tag = "6")]
275 pub timestamp_ms: ::core::option::Option<i64>,
276}
277impl ::prost::Name for Metric {
278 const NAME: &'static str = "Metric";
279 const PACKAGE: &'static str = "io.prometheus.client";
280 fn full_name() -> ::prost::alloc::string::String {
281 "io.prometheus.client.Metric".into()
282 }
283 fn type_url() -> ::prost::alloc::string::String {
284 "/io.prometheus.client.Metric".into()
285 }
286}
287#[derive(Clone, PartialEq, ::prost::Message)]
288pub struct MetricFamily {
289 #[prost(string, optional, tag = "1")]
290 pub name: ::core::option::Option<::prost::alloc::string::String>,
291 #[prost(string, optional, tag = "2")]
292 pub help: ::core::option::Option<::prost::alloc::string::String>,
293 #[prost(enumeration = "MetricType", optional, tag = "3")]
294 pub r#type: ::core::option::Option<i32>,
295 #[prost(message, repeated, tag = "4")]
296 pub metric: ::prost::alloc::vec::Vec<Metric>,
297 #[prost(string, optional, tag = "5")]
298 pub unit: ::core::option::Option<::prost::alloc::string::String>,
299}
300impl ::prost::Name for MetricFamily {
301 const NAME: &'static str = "MetricFamily";
302 const PACKAGE: &'static str = "io.prometheus.client";
303 fn full_name() -> ::prost::alloc::string::String {
304 "io.prometheus.client.MetricFamily".into()
305 }
306 fn type_url() -> ::prost::alloc::string::String {
307 "/io.prometheus.client.MetricFamily".into()
308 }
309}
310#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
311#[repr(i32)]
312pub enum MetricType {
313 Counter = 0,
315 Gauge = 1,
317 Summary = 2,
319 Untyped = 3,
321 Histogram = 4,
323 GaugeHistogram = 5,
325}
326impl MetricType {
327 pub fn as_str_name(&self) -> &'static str {
332 match self {
333 Self::Counter => "COUNTER",
334 Self::Gauge => "GAUGE",
335 Self::Summary => "SUMMARY",
336 Self::Untyped => "UNTYPED",
337 Self::Histogram => "HISTOGRAM",
338 Self::GaugeHistogram => "GAUGE_HISTOGRAM",
339 }
340 }
341 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
343 match value {
344 "COUNTER" => Some(Self::Counter),
345 "GAUGE" => Some(Self::Gauge),
346 "SUMMARY" => Some(Self::Summary),
347 "UNTYPED" => Some(Self::Untyped),
348 "HISTOGRAM" => Some(Self::Histogram),
349 "GAUGE_HISTOGRAM" => Some(Self::GaugeHistogram),
350 _ => None,
351 }
352 }
353}