cx_api/generated/
com.coralogix.datausage.v2.rs

1// This file is @generated by prost-build.
2#[derive(serde::Serialize, serde::Deserialize)]
3#[serde(rename_all = "snake_case")]
4#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5pub struct Team {
6    #[prost(message, optional, tag = "2")]
7    pub id: ::core::option::Option<u64>,
8}
9#[derive(serde::Serialize, serde::Deserialize)]
10#[serde(rename_all = "snake_case")]
11#[derive(Clone, Copy, PartialEq, ::prost::Message)]
12pub struct Unit {
13    #[prost(message, optional, tag = "1")]
14    pub value: ::core::option::Option<f32>,
15}
16#[derive(serde::Serialize, serde::Deserialize)]
17#[serde(rename_all = "snake_case")]
18#[derive(Clone, Copy, PartialEq, ::prost::Message)]
19pub struct Gb {
20    #[prost(message, optional, tag = "1")]
21    pub value: ::core::option::Option<f32>,
22}
23#[derive(serde::Serialize, serde::Deserialize)]
24#[serde(rename_all = "snake_case")]
25#[derive(Clone, Copy, PartialEq, ::prost::Message)]
26pub struct Token {
27    #[prost(message, optional, tag = "1")]
28    pub value: ::core::option::Option<f32>,
29}
30#[derive(serde::Serialize, serde::Deserialize)]
31#[serde(rename_all = "snake_case")]
32#[derive(Clone, Copy, PartialEq, ::prost::Message)]
33pub struct DateRange {
34    #[prost(message, optional, tag = "1")]
35    pub from_date: ::core::option::Option<::prost_wkt_types::Timestamp>,
36    #[prost(message, optional, tag = "2")]
37    pub to_date: ::core::option::Option<::prost_wkt_types::Timestamp>,
38}
39#[derive(serde::Serialize, serde::Deserialize)]
40#[serde(rename_all = "snake_case")]
41#[derive(Clone, PartialEq, ::prost::Message)]
42pub struct GenericDimension {
43    #[prost(string, tag = "1")]
44    pub key: ::prost::alloc::string::String,
45    #[prost(string, tag = "2")]
46    pub value: ::prost::alloc::string::String,
47}
48#[derive(serde::Serialize, serde::Deserialize)]
49#[serde(rename_all = "snake_case")]
50#[derive(Clone, PartialEq, ::prost::Message)]
51pub struct Dimension {
52    #[prost(oneof = "dimension::Dimension", tags = "1, 2, 3, 4, 5")]
53    pub dimension: ::core::option::Option<dimension::Dimension>,
54}
55/// Nested message and enum types in `Dimension`.
56pub mod dimension {
57    #[derive(serde::Serialize, serde::Deserialize)]
58    #[serde(rename_all = "snake_case")]
59    #[derive(Clone, PartialEq, ::prost::Oneof)]
60    pub enum Dimension {
61        #[prost(enumeration = "super::Pillar", tag = "1")]
62        Pillar(i32),
63        #[prost(message, tag = "2")]
64        GenericDimension(super::GenericDimension),
65        #[prost(enumeration = "super::TcoTier", tag = "3")]
66        Tier(i32),
67        #[prost(enumeration = "super::Severity", tag = "4")]
68        Severity(i32),
69        #[prost(enumeration = "super::Priority", tag = "5")]
70        Priority(i32),
71    }
72}
73/// / Daily data usage in units
74#[derive(serde::Serialize, serde::Deserialize)]
75#[serde(rename_all = "snake_case")]
76#[derive(Clone, Copy, PartialEq, ::prost::Message)]
77pub struct DetailedDailyUnits {
78    #[prost(message, optional, tag = "1")]
79    pub stats_date: ::core::option::Option<::prost_wkt_types::Timestamp>,
80    #[prost(message, optional, tag = "2")]
81    pub total_units: ::core::option::Option<Unit>,
82    #[prost(message, optional, tag = "3")]
83    pub blocked_units: ::core::option::Option<Unit>,
84    #[prost(message, optional, tag = "4")]
85    pub low_logs_units: ::core::option::Option<Unit>,
86    #[prost(message, optional, tag = "5")]
87    pub medium_logs_units: ::core::option::Option<Unit>,
88    #[prost(message, optional, tag = "6")]
89    pub high_logs_units: ::core::option::Option<Unit>,
90    #[prost(message, optional, tag = "7")]
91    pub high_metrics_units: ::core::option::Option<Unit>,
92    #[prost(message, optional, tag = "8")]
93    pub low_tracing_units: ::core::option::Option<Unit>,
94    #[prost(message, optional, tag = "9")]
95    pub medium_tracing_units: ::core::option::Option<Unit>,
96    #[prost(message, optional, tag = "10")]
97    pub high_tracing_units: ::core::option::Option<Unit>,
98    #[prost(message, optional, tag = "11")]
99    pub low_session_recording_units: ::core::option::Option<Unit>,
100    #[prost(message, optional, tag = "12")]
101    pub evaluation_units: ::core::option::Option<Unit>,
102    #[prost(message, optional, tag = "13")]
103    pub cpu_profiles_units: ::core::option::Option<Unit>,
104    #[prost(message, optional, tag = "14")]
105    pub blocked_metrics_units: ::core::option::Option<Unit>,
106}
107/// / Daily data usage in GBs. This entity represents only data processed by CX
108#[derive(serde::Serialize, serde::Deserialize)]
109#[serde(rename_all = "snake_case")]
110#[derive(Clone, Copy, PartialEq, ::prost::Message)]
111pub struct DetailedDailyProcessedGbs {
112    #[prost(message, optional, tag = "1")]
113    pub stats_date: ::core::option::Option<::prost_wkt_types::Timestamp>,
114    #[prost(message, optional, tag = "2")]
115    pub total_gbs: ::core::option::Option<Gb>,
116    #[prost(message, optional, tag = "3")]
117    pub blocked_gbs: ::core::option::Option<Gb>,
118    #[prost(message, optional, tag = "4")]
119    pub low_logs_gbs: ::core::option::Option<Gb>,
120    #[prost(message, optional, tag = "5")]
121    pub medium_logs_gbs: ::core::option::Option<Gb>,
122    #[prost(message, optional, tag = "6")]
123    pub high_logs_gbs: ::core::option::Option<Gb>,
124    #[prost(message, optional, tag = "7")]
125    pub high_metrics_gbs: ::core::option::Option<Gb>,
126    #[prost(message, optional, tag = "8")]
127    pub low_tracing_gbs: ::core::option::Option<Gb>,
128    #[prost(message, optional, tag = "9")]
129    pub medium_tracing_gbs: ::core::option::Option<Gb>,
130    #[prost(message, optional, tag = "10")]
131    pub high_tracing_gbs: ::core::option::Option<Gb>,
132    #[prost(message, optional, tag = "11")]
133    pub low_session_recording_gbs: ::core::option::Option<Gb>,
134    #[prost(message, optional, tag = "12")]
135    pub cpu_profiles_gbs: ::core::option::Option<Gb>,
136    #[prost(message, optional, tag = "13")]
137    pub blocked_metrics_gbs: ::core::option::Option<Gb>,
138}
139/// / Daily data usage in evaluation tokens
140#[derive(serde::Serialize, serde::Deserialize)]
141#[serde(rename_all = "snake_case")]
142#[derive(Clone, PartialEq, ::prost::Message)]
143pub struct DetailedDailyEvaluationTokens {
144    #[prost(message, optional, tag = "1")]
145    pub stats_date: ::core::option::Option<::prost_wkt_types::Timestamp>,
146    #[prost(message, optional, tag = "2")]
147    pub total_tokens: ::core::option::Option<Token>,
148    #[prost(message, repeated, tag = "3")]
149    pub evaluations: ::prost::alloc::vec::Vec<Evaluation>,
150}
151#[derive(serde::Serialize, serde::Deserialize)]
152#[serde(rename_all = "snake_case")]
153#[derive(Clone, PartialEq, ::prost::Message)]
154pub struct Evaluation {
155    #[prost(message, optional, tag = "1")]
156    pub evaluator_name: ::core::option::Option<::prost::alloc::string::String>,
157    #[prost(message, optional, tag = "2")]
158    pub evaluation_tokens: ::core::option::Option<Token>,
159}
160#[derive(serde::Serialize, serde::Deserialize)]
161#[serde(rename_all = "snake_case")]
162#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
163#[repr(i32)]
164pub enum Range {
165    Unspecified = 0,
166    CurrentMonth = 1,
167    Last30Days = 2,
168    Last90Days = 3,
169    LastWeek = 4,
170}
171impl Range {
172    /// String value of the enum field names used in the ProtoBuf definition.
173    ///
174    /// The values are not transformed in any way and thus are considered stable
175    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
176    pub fn as_str_name(&self) -> &'static str {
177        match self {
178            Self::Unspecified => "RANGE_UNSPECIFIED",
179            Self::CurrentMonth => "RANGE_CURRENT_MONTH",
180            Self::Last30Days => "RANGE_LAST_30_DAYS",
181            Self::Last90Days => "RANGE_LAST_90_DAYS",
182            Self::LastWeek => "RANGE_LAST_WEEK",
183        }
184    }
185    /// Creates an enum from field names used in the ProtoBuf definition.
186    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
187        match value {
188            "RANGE_UNSPECIFIED" => Some(Self::Unspecified),
189            "RANGE_CURRENT_MONTH" => Some(Self::CurrentMonth),
190            "RANGE_LAST_30_DAYS" => Some(Self::Last30Days),
191            "RANGE_LAST_90_DAYS" => Some(Self::Last90Days),
192            "RANGE_LAST_WEEK" => Some(Self::LastWeek),
193            _ => None,
194        }
195    }
196}
197#[derive(serde::Serialize, serde::Deserialize)]
198#[serde(rename_all = "snake_case")]
199#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
200#[repr(i32)]
201pub enum Pillar {
202    Unspecified = 0,
203    Metrics = 1,
204    Logs = 2,
205    Spans = 3,
206    Binary = 4,
207    Profiles = 5,
208}
209impl Pillar {
210    /// String value of the enum field names used in the ProtoBuf definition.
211    ///
212    /// The values are not transformed in any way and thus are considered stable
213    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
214    pub fn as_str_name(&self) -> &'static str {
215        match self {
216            Self::Unspecified => "PILLAR_UNSPECIFIED",
217            Self::Metrics => "PILLAR_METRICS",
218            Self::Logs => "PILLAR_LOGS",
219            Self::Spans => "PILLAR_SPANS",
220            Self::Binary => "PILLAR_BINARY",
221            Self::Profiles => "PILLAR_PROFILES",
222        }
223    }
224    /// Creates an enum from field names used in the ProtoBuf definition.
225    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
226        match value {
227            "PILLAR_UNSPECIFIED" => Some(Self::Unspecified),
228            "PILLAR_METRICS" => Some(Self::Metrics),
229            "PILLAR_LOGS" => Some(Self::Logs),
230            "PILLAR_SPANS" => Some(Self::Spans),
231            "PILLAR_BINARY" => Some(Self::Binary),
232            "PILLAR_PROFILES" => Some(Self::Profiles),
233            _ => None,
234        }
235    }
236}
237#[derive(serde::Serialize, serde::Deserialize)]
238#[serde(rename_all = "snake_case")]
239#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
240#[repr(i32)]
241pub enum TcoTier {
242    Unspecified = 0,
243    Low = 1,
244    Medium = 2,
245    High = 3,
246    Blocked = 4,
247}
248impl TcoTier {
249    /// String value of the enum field names used in the ProtoBuf definition.
250    ///
251    /// The values are not transformed in any way and thus are considered stable
252    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
253    pub fn as_str_name(&self) -> &'static str {
254        match self {
255            Self::Unspecified => "TCO_TIER_UNSPECIFIED",
256            Self::Low => "TCO_TIER_LOW",
257            Self::Medium => "TCO_TIER_MEDIUM",
258            Self::High => "TCO_TIER_HIGH",
259            Self::Blocked => "TCO_TIER_BLOCKED",
260        }
261    }
262    /// Creates an enum from field names used in the ProtoBuf definition.
263    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
264        match value {
265            "TCO_TIER_UNSPECIFIED" => Some(Self::Unspecified),
266            "TCO_TIER_LOW" => Some(Self::Low),
267            "TCO_TIER_MEDIUM" => Some(Self::Medium),
268            "TCO_TIER_HIGH" => Some(Self::High),
269            "TCO_TIER_BLOCKED" => Some(Self::Blocked),
270            _ => None,
271        }
272    }
273}
274#[derive(serde::Serialize, serde::Deserialize)]
275#[serde(rename_all = "snake_case")]
276#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
277#[repr(i32)]
278pub enum Priority {
279    Unspecified = 0,
280    Low = 1,
281    Medium = 2,
282    High = 3,
283    Blocked = 4,
284}
285impl Priority {
286    /// String value of the enum field names used in the ProtoBuf definition.
287    ///
288    /// The values are not transformed in any way and thus are considered stable
289    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
290    pub fn as_str_name(&self) -> &'static str {
291        match self {
292            Self::Unspecified => "PRIORITY_UNSPECIFIED",
293            Self::Low => "PRIORITY_LOW",
294            Self::Medium => "PRIORITY_MEDIUM",
295            Self::High => "PRIORITY_HIGH",
296            Self::Blocked => "PRIORITY_BLOCKED",
297        }
298    }
299    /// Creates an enum from field names used in the ProtoBuf definition.
300    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
301        match value {
302            "PRIORITY_UNSPECIFIED" => Some(Self::Unspecified),
303            "PRIORITY_LOW" => Some(Self::Low),
304            "PRIORITY_MEDIUM" => Some(Self::Medium),
305            "PRIORITY_HIGH" => Some(Self::High),
306            "PRIORITY_BLOCKED" => Some(Self::Blocked),
307            _ => None,
308        }
309    }
310}
311#[derive(serde::Serialize, serde::Deserialize)]
312#[serde(rename_all = "snake_case")]
313#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
314#[repr(i32)]
315pub enum Severity {
316    Unspecified = 0,
317    Debug = 1,
318    Verbose = 2,
319    Info = 3,
320    Warning = 4,
321    Error = 5,
322    Critical = 6,
323}
324impl Severity {
325    /// String value of the enum field names used in the ProtoBuf definition.
326    ///
327    /// The values are not transformed in any way and thus are considered stable
328    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
329    pub fn as_str_name(&self) -> &'static str {
330        match self {
331            Self::Unspecified => "SEVERITY_UNSPECIFIED",
332            Self::Debug => "SEVERITY_DEBUG",
333            Self::Verbose => "SEVERITY_VERBOSE",
334            Self::Info => "SEVERITY_INFO",
335            Self::Warning => "SEVERITY_WARNING",
336            Self::Error => "SEVERITY_ERROR",
337            Self::Critical => "SEVERITY_CRITICAL",
338        }
339    }
340    /// Creates an enum from field names used in the ProtoBuf definition.
341    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
342        match value {
343            "SEVERITY_UNSPECIFIED" => Some(Self::Unspecified),
344            "SEVERITY_DEBUG" => Some(Self::Debug),
345            "SEVERITY_VERBOSE" => Some(Self::Verbose),
346            "SEVERITY_INFO" => Some(Self::Info),
347            "SEVERITY_WARNING" => Some(Self::Warning),
348            "SEVERITY_ERROR" => Some(Self::Error),
349            "SEVERITY_CRITICAL" => Some(Self::Critical),
350            _ => None,
351        }
352    }
353}
354#[derive(serde::Serialize, serde::Deserialize)]
355#[serde(rename_all = "snake_case")]
356#[derive(Clone, PartialEq, ::prost::Message)]
357pub struct GetTeamDetailedDataUsageRequest {
358    /// Date request interval
359    #[prost(message, optional, tag = "2")]
360    pub date_range: ::core::option::Option<DateRange>,
361    /// Aggregation resolution with minute precision.
362    ///
363    /// Do note that to avoid overloading the service we enforce resolution limits
364    /// that depend on the server configuration. This is configured by the server.
365    /// This means that, for instance, requests with 1 min resolution for an interval of 30 days will be rejected.
366    ///
367    /// Resolution must be between 1 min and date_range interval
368    #[prost(message, optional, tag = "3")]
369    pub resolution: ::core::option::Option<::prost_wkt_types::Duration>,
370    /// List of aggregate parameters.
371    /// i.e. if AggregateBy is \[AGGREGATE_BY_PILLAR, AGGREGATE_BY_PRIORITY\], then the response will stream data aggregated by pillar and priority.
372    #[prost(enumeration = "AggregateBy", repeated, tag = "4")]
373    pub aggregate: ::prost::alloc::vec::Vec<i32>,
374}
375#[derive(serde::Serialize, serde::Deserialize)]
376#[serde(rename_all = "snake_case")]
377#[derive(Clone, PartialEq, ::prost::Message)]
378pub struct GetTeamDetailedDataUsageResponse {
379    #[prost(message, optional, tag = "1")]
380    pub timestamp: ::core::option::Option<::prost_wkt_types::Timestamp>,
381    #[prost(message, optional, tag = "2")]
382    pub size_gb: ::core::option::Option<f32>,
383    #[prost(message, optional, tag = "3")]
384    pub units: ::core::option::Option<f32>,
385    #[prost(message, repeated, tag = "4")]
386    pub dimensions: ::prost::alloc::vec::Vec<Dimension>,
387}
388#[derive(serde::Serialize, serde::Deserialize)]
389#[serde(rename_all = "snake_case")]
390#[derive(Clone, PartialEq, ::prost::Message)]
391pub struct GetSpansCountRequest {
392    #[prost(message, optional, tag = "1")]
393    pub date_range: ::core::option::Option<DateRange>,
394    /// Aggregation resolution with second precision.
395    ///
396    /// Resolution must be between 1 second and date_range interval
397    #[prost(message, optional, tag = "2")]
398    pub resolution: ::core::option::Option<::prost_wkt_types::Duration>,
399    /// Example: (application1 OR application2) AND (subsystem1 OR subsystem2)
400    /// Match occurs on full match
401    #[prost(message, optional, tag = "3")]
402    pub filters: ::core::option::Option<ScopesFilter>,
403}
404#[derive(serde::Serialize, serde::Deserialize)]
405#[serde(rename_all = "snake_case")]
406#[derive(Clone, PartialEq, ::prost::Message)]
407pub struct ScopesFilter {
408    #[prost(string, repeated, tag = "1")]
409    pub application: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
410    #[prost(string, repeated, tag = "2")]
411    pub subsystem: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
412}
413#[derive(serde::Serialize, serde::Deserialize)]
414#[serde(rename_all = "snake_case")]
415#[derive(Clone, Copy, PartialEq, ::prost::Message)]
416pub struct SpansCount {
417    #[prost(message, optional, tag = "1")]
418    pub timestamp: ::core::option::Option<::prost_wkt_types::Timestamp>,
419    #[prost(message, optional, tag = "2")]
420    pub success_span_count: ::core::option::Option<i64>,
421    #[prost(message, optional, tag = "3")]
422    pub error_span_count: ::core::option::Option<i64>,
423    #[prost(message, optional, tag = "4")]
424    pub low_success_span_count: ::core::option::Option<i64>,
425    #[prost(message, optional, tag = "5")]
426    pub low_error_span_count: ::core::option::Option<i64>,
427    #[prost(message, optional, tag = "6")]
428    pub medium_success_span_count: ::core::option::Option<i64>,
429    #[prost(message, optional, tag = "7")]
430    pub medium_error_span_count: ::core::option::Option<i64>,
431}
432#[derive(serde::Serialize, serde::Deserialize)]
433#[serde(rename_all = "snake_case")]
434#[derive(Clone, PartialEq, ::prost::Message)]
435pub struct GetSpansCountResponse {
436    #[prost(message, repeated, tag = "1")]
437    pub spans_count: ::prost::alloc::vec::Vec<SpansCount>,
438}
439#[derive(serde::Serialize, serde::Deserialize)]
440#[serde(rename_all = "snake_case")]
441#[derive(Clone, PartialEq, ::prost::Message)]
442pub struct GetLogsCountRequest {
443    #[prost(message, optional, tag = "1")]
444    pub date_range: ::core::option::Option<DateRange>,
445    /// Aggregation resolution with second precision.
446    ///
447    /// Resolution must be between 1 second and date_range interval
448    #[prost(message, optional, tag = "2")]
449    pub resolution: ::core::option::Option<::prost_wkt_types::Duration>,
450    /// Example: (application1 OR application2) AND (subsystem1 OR subsystem2)
451    /// Match occurs on full match
452    #[prost(message, optional, tag = "3")]
453    pub filters: ::core::option::Option<ScopesFilter>,
454}
455#[derive(serde::Serialize, serde::Deserialize)]
456#[serde(rename_all = "snake_case")]
457#[derive(Clone, Copy, PartialEq, ::prost::Message)]
458pub struct LogsCount {
459    #[prost(message, optional, tag = "1")]
460    pub timestamp: ::core::option::Option<::prost_wkt_types::Timestamp>,
461    #[prost(uint64, tag = "2")]
462    pub logs_count: u64,
463    #[prost(enumeration = "Severity", tag = "3")]
464    pub severity: i32,
465    #[prost(enumeration = "Priority", tag = "4")]
466    pub priority: i32,
467}
468#[derive(serde::Serialize, serde::Deserialize)]
469#[serde(rename_all = "snake_case")]
470#[derive(Clone, PartialEq, ::prost::Message)]
471pub struct GetLogsCountResponse {
472    #[prost(message, repeated, tag = "1")]
473    pub logs_count: ::prost::alloc::vec::Vec<LogsCount>,
474}
475#[derive(serde::Serialize, serde::Deserialize)]
476#[serde(rename_all = "snake_case")]
477#[derive(Clone, Copy, PartialEq, ::prost::Message)]
478pub struct GetDataUsageMetricsExportStatusRequest {}
479#[derive(serde::Serialize, serde::Deserialize)]
480#[serde(rename_all = "snake_case")]
481#[derive(Clone, Copy, PartialEq, ::prost::Message)]
482pub struct GetDataUsageMetricsExportStatusResponse {
483    #[prost(bool, tag = "1")]
484    pub enabled: bool,
485}
486#[derive(serde::Serialize, serde::Deserialize)]
487#[serde(rename_all = "snake_case")]
488#[derive(Clone, Copy, PartialEq, ::prost::Message)]
489pub struct UpdateDataUsageMetricsExportStatusRequest {
490    #[prost(bool, tag = "3")]
491    pub enabled: bool,
492}
493#[derive(serde::Serialize, serde::Deserialize)]
494#[serde(rename_all = "snake_case")]
495#[derive(Clone, Copy, PartialEq, ::prost::Message)]
496pub struct UpdateDataUsageMetricsExportStatusResponse {
497    #[prost(bool, tag = "1")]
498    pub enabled: bool,
499}
500#[derive(serde::Serialize, serde::Deserialize)]
501#[serde(rename_all = "snake_case")]
502#[derive(Clone, PartialEq, ::prost::Message)]
503pub struct GetDataUsageRequest {
504    /// Date request interval
505    #[prost(message, optional, tag = "1")]
506    pub date_range: ::core::option::Option<DateRange>,
507    /// Aggregation resolution. Minimum supported value is 1h
508    ///
509    /// Do note that to avoid overloading the service we enforce resolution limits
510    /// that depend on the server configuration. This is configured by the server.
511    /// This means that, for instance, requests with 1 hour resolution for an interval of 30 days will be rejected but accepted for 1 day interval.
512    ///
513    /// Resolution must be between 1 hour and date_range interval
514    #[prost(message, optional, tag = "2")]
515    pub resolution: ::core::option::Option<::prost_wkt_types::Duration>,
516    /// List of aggregate parameters.
517    /// i.e. if AggregateBy is \[AGGREGATE_BY_PILLAR, AGGREGATE_BY_PRIORITY\], then the response will stream data aggregated by pillar and priority.
518    #[prost(enumeration = "AggregateBy", repeated, tag = "3")]
519    pub aggregate: ::prost::alloc::vec::Vec<i32>,
520    /// Dimensions to filter by.
521    /// When used together with aggregation it is pointless to filter by dimension keys that are not aggregated.
522    /// i.e. if we filter by Dimension \[ {"subsystem", "subsystem1"}\]
523    ///       we only return entries that at least have that dimension i.e. \[{"subsystem", "subsystem1"}, {"application", "application1"}\]
524    #[prost(message, repeated, tag = "4")]
525    pub dimension_filters: ::prost::alloc::vec::Vec<Dimension>,
526}
527#[derive(serde::Serialize, serde::Deserialize)]
528#[serde(rename_all = "snake_case")]
529#[derive(Clone, PartialEq, ::prost::Message)]
530pub struct DataUsageEntry {
531    #[prost(message, optional, tag = "1")]
532    pub timestamp: ::core::option::Option<::prost_wkt_types::Timestamp>,
533    #[prost(float, tag = "2")]
534    pub size_gb: f32,
535    #[prost(float, tag = "3")]
536    pub units: f32,
537    #[prost(message, repeated, tag = "4")]
538    pub dimensions: ::prost::alloc::vec::Vec<Dimension>,
539}
540#[derive(serde::Serialize, serde::Deserialize)]
541#[serde(rename_all = "snake_case")]
542#[derive(Clone, PartialEq, ::prost::Message)]
543pub struct GetDataUsageResponse {
544    #[prost(message, repeated, tag = "1")]
545    pub entries: ::prost::alloc::vec::Vec<DataUsageEntry>,
546}
547#[derive(serde::Serialize, serde::Deserialize)]
548#[serde(rename_all = "snake_case")]
549#[derive(Clone, Copy, PartialEq, ::prost::Message)]
550pub struct GetDailyUsageUnitsRequest {
551    #[prost(oneof = "get_daily_usage_units_request::RequestTime", tags = "1, 2")]
552    pub request_time: ::core::option::Option<get_daily_usage_units_request::RequestTime>,
553}
554/// Nested message and enum types in `GetDailyUsageUnitsRequest`.
555pub mod get_daily_usage_units_request {
556    #[derive(serde::Serialize, serde::Deserialize)]
557    #[serde(rename_all = "snake_case")]
558    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
559    pub enum RequestTime {
560        #[prost(enumeration = "super::Range", tag = "1")]
561        Range(i32),
562        #[prost(message, tag = "2")]
563        DateRange(super::DateRange),
564    }
565}
566#[derive(serde::Serialize, serde::Deserialize)]
567#[serde(rename_all = "snake_case")]
568#[derive(Clone, PartialEq, ::prost::Message)]
569pub struct GetDailyUsageUnitsResponse {
570    #[prost(message, repeated, tag = "1")]
571    pub units: ::prost::alloc::vec::Vec<DetailedDailyUnits>,
572}
573#[derive(serde::Serialize, serde::Deserialize)]
574#[serde(rename_all = "snake_case")]
575#[derive(Clone, Copy, PartialEq, ::prost::Message)]
576pub struct GetDailyUsageProcessedGbsRequest {
577    #[prost(oneof = "get_daily_usage_processed_gbs_request::RequestTime", tags = "1, 2")]
578    pub request_time: ::core::option::Option<
579        get_daily_usage_processed_gbs_request::RequestTime,
580    >,
581}
582/// Nested message and enum types in `GetDailyUsageProcessedGbsRequest`.
583pub mod get_daily_usage_processed_gbs_request {
584    #[derive(serde::Serialize, serde::Deserialize)]
585    #[serde(rename_all = "snake_case")]
586    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
587    pub enum RequestTime {
588        #[prost(enumeration = "super::Range", tag = "1")]
589        Range(i32),
590        #[prost(message, tag = "2")]
591        DateRange(super::DateRange),
592    }
593}
594#[derive(serde::Serialize, serde::Deserialize)]
595#[serde(rename_all = "snake_case")]
596#[derive(Clone, PartialEq, ::prost::Message)]
597pub struct GetDailyUsageProcessedGbsResponse {
598    #[prost(message, repeated, tag = "1")]
599    pub gbs: ::prost::alloc::vec::Vec<DetailedDailyProcessedGbs>,
600}
601#[derive(serde::Serialize, serde::Deserialize)]
602#[serde(rename_all = "snake_case")]
603#[derive(Clone, Copy, PartialEq, ::prost::Message)]
604pub struct GetDailyUsageEvaluationTokensRequest {
605    #[prost(
606        oneof = "get_daily_usage_evaluation_tokens_request::RequestTime",
607        tags = "1, 2"
608    )]
609    pub request_time: ::core::option::Option<
610        get_daily_usage_evaluation_tokens_request::RequestTime,
611    >,
612}
613/// Nested message and enum types in `GetDailyUsageEvaluationTokensRequest`.
614pub mod get_daily_usage_evaluation_tokens_request {
615    #[derive(serde::Serialize, serde::Deserialize)]
616    #[serde(rename_all = "snake_case")]
617    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
618    pub enum RequestTime {
619        #[prost(enumeration = "super::Range", tag = "1")]
620        Range(i32),
621        #[prost(message, tag = "2")]
622        DateRange(super::DateRange),
623    }
624}
625#[derive(serde::Serialize, serde::Deserialize)]
626#[serde(rename_all = "snake_case")]
627#[derive(Clone, PartialEq, ::prost::Message)]
628pub struct GetDailyUsageEvaluationTokensResponse {
629    #[prost(message, repeated, tag = "1")]
630    pub tokens: ::prost::alloc::vec::Vec<DetailedDailyEvaluationTokens>,
631}
632#[derive(serde::Serialize, serde::Deserialize)]
633#[serde(rename_all = "snake_case")]
634#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
635#[repr(i32)]
636pub enum AggregateBy {
637    Unspecified = 0,
638    Application = 1,
639    Subsystem = 2,
640    Pillar = 3,
641    Priority = 4,
642}
643impl AggregateBy {
644    /// String value of the enum field names used in the ProtoBuf definition.
645    ///
646    /// The values are not transformed in any way and thus are considered stable
647    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
648    pub fn as_str_name(&self) -> &'static str {
649        match self {
650            Self::Unspecified => "AGGREGATE_BY_UNSPECIFIED",
651            Self::Application => "AGGREGATE_BY_APPLICATION",
652            Self::Subsystem => "AGGREGATE_BY_SUBSYSTEM",
653            Self::Pillar => "AGGREGATE_BY_PILLAR",
654            Self::Priority => "AGGREGATE_BY_PRIORITY",
655        }
656    }
657    /// Creates an enum from field names used in the ProtoBuf definition.
658    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
659        match value {
660            "AGGREGATE_BY_UNSPECIFIED" => Some(Self::Unspecified),
661            "AGGREGATE_BY_APPLICATION" => Some(Self::Application),
662            "AGGREGATE_BY_SUBSYSTEM" => Some(Self::Subsystem),
663            "AGGREGATE_BY_PILLAR" => Some(Self::Pillar),
664            "AGGREGATE_BY_PRIORITY" => Some(Self::Priority),
665            _ => None,
666        }
667    }
668}
669/// Generated client implementations.
670pub mod data_usage_service_client {
671    #![allow(
672        unused_variables,
673        dead_code,
674        missing_docs,
675        clippy::wildcard_imports,
676        clippy::let_unit_value,
677    )]
678    use tonic::codegen::*;
679    use tonic::codegen::http::Uri;
680    #[derive(Debug, Clone)]
681    pub struct DataUsageServiceClient<T> {
682        inner: tonic::client::Grpc<T>,
683    }
684    impl DataUsageServiceClient<tonic::transport::Channel> {
685        /// Attempt to create a new client by connecting to a given endpoint.
686        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
687        where
688            D: TryInto<tonic::transport::Endpoint>,
689            D::Error: Into<StdError>,
690        {
691            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
692            Ok(Self::new(conn))
693        }
694    }
695    impl<T> DataUsageServiceClient<T>
696    where
697        T: tonic::client::GrpcService<tonic::body::BoxBody>,
698        T::Error: Into<StdError>,
699        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
700        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
701    {
702        pub fn new(inner: T) -> Self {
703            let inner = tonic::client::Grpc::new(inner);
704            Self { inner }
705        }
706        pub fn with_origin(inner: T, origin: Uri) -> Self {
707            let inner = tonic::client::Grpc::with_origin(inner, origin);
708            Self { inner }
709        }
710        pub fn with_interceptor<F>(
711            inner: T,
712            interceptor: F,
713        ) -> DataUsageServiceClient<InterceptedService<T, F>>
714        where
715            F: tonic::service::Interceptor,
716            T::ResponseBody: Default,
717            T: tonic::codegen::Service<
718                http::Request<tonic::body::BoxBody>,
719                Response = http::Response<
720                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
721                >,
722            >,
723            <T as tonic::codegen::Service<
724                http::Request<tonic::body::BoxBody>,
725            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
726        {
727            DataUsageServiceClient::new(InterceptedService::new(inner, interceptor))
728        }
729        /// Compress requests with the given encoding.
730        ///
731        /// This requires the server to support it otherwise it might respond with an
732        /// error.
733        #[must_use]
734        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
735            self.inner = self.inner.send_compressed(encoding);
736            self
737        }
738        /// Enable decompressing responses.
739        #[must_use]
740        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
741            self.inner = self.inner.accept_compressed(encoding);
742            self
743        }
744        /// Limits the maximum size of a decoded message.
745        ///
746        /// Default: `4MB`
747        #[must_use]
748        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
749            self.inner = self.inner.max_decoding_message_size(limit);
750            self
751        }
752        /// Limits the maximum size of an encoded message.
753        ///
754        /// Default: `usize::MAX`
755        #[must_use]
756        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
757            self.inner = self.inner.max_encoding_message_size(limit);
758            self
759        }
760        /// Deprecated. Please use GetDataUsage instead.
761        #[deprecated]
762        pub async fn get_team_detailed_data_usage(
763            &mut self,
764            request: impl tonic::IntoRequest<super::GetTeamDetailedDataUsageRequest>,
765        ) -> std::result::Result<
766            tonic::Response<
767                tonic::codec::Streaming<super::GetTeamDetailedDataUsageResponse>,
768            >,
769            tonic::Status,
770        > {
771            self.inner
772                .ready()
773                .await
774                .map_err(|e| {
775                    tonic::Status::unknown(
776                        format!("Service was not ready: {}", e.into()),
777                    )
778                })?;
779            let codec = tonic::codec::ProstCodec::default();
780            let path = http::uri::PathAndQuery::from_static(
781                "/com.coralogix.datausage.v2.DataUsageService/GetTeamDetailedDataUsage",
782            );
783            let mut req = request.into_request();
784            req.extensions_mut()
785                .insert(
786                    GrpcMethod::new(
787                        "com.coralogix.datausage.v2.DataUsageService",
788                        "GetTeamDetailedDataUsage",
789                    ),
790                );
791            self.inner.server_streaming(req, path, codec).await
792        }
793        pub async fn get_spans_count(
794            &mut self,
795            request: impl tonic::IntoRequest<super::GetSpansCountRequest>,
796        ) -> std::result::Result<
797            tonic::Response<tonic::codec::Streaming<super::GetSpansCountResponse>>,
798            tonic::Status,
799        > {
800            self.inner
801                .ready()
802                .await
803                .map_err(|e| {
804                    tonic::Status::unknown(
805                        format!("Service was not ready: {}", e.into()),
806                    )
807                })?;
808            let codec = tonic::codec::ProstCodec::default();
809            let path = http::uri::PathAndQuery::from_static(
810                "/com.coralogix.datausage.v2.DataUsageService/GetSpansCount",
811            );
812            let mut req = request.into_request();
813            req.extensions_mut()
814                .insert(
815                    GrpcMethod::new(
816                        "com.coralogix.datausage.v2.DataUsageService",
817                        "GetSpansCount",
818                    ),
819                );
820            self.inner.server_streaming(req, path, codec).await
821        }
822        pub async fn get_logs_count(
823            &mut self,
824            request: impl tonic::IntoRequest<super::GetLogsCountRequest>,
825        ) -> std::result::Result<
826            tonic::Response<tonic::codec::Streaming<super::GetLogsCountResponse>>,
827            tonic::Status,
828        > {
829            self.inner
830                .ready()
831                .await
832                .map_err(|e| {
833                    tonic::Status::unknown(
834                        format!("Service was not ready: {}", e.into()),
835                    )
836                })?;
837            let codec = tonic::codec::ProstCodec::default();
838            let path = http::uri::PathAndQuery::from_static(
839                "/com.coralogix.datausage.v2.DataUsageService/GetLogsCount",
840            );
841            let mut req = request.into_request();
842            req.extensions_mut()
843                .insert(
844                    GrpcMethod::new(
845                        "com.coralogix.datausage.v2.DataUsageService",
846                        "GetLogsCount",
847                    ),
848                );
849            self.inner.server_streaming(req, path, codec).await
850        }
851        pub async fn get_data_usage_metrics_export_status(
852            &mut self,
853            request: impl tonic::IntoRequest<
854                super::GetDataUsageMetricsExportStatusRequest,
855            >,
856        ) -> std::result::Result<
857            tonic::Response<super::GetDataUsageMetricsExportStatusResponse>,
858            tonic::Status,
859        > {
860            self.inner
861                .ready()
862                .await
863                .map_err(|e| {
864                    tonic::Status::unknown(
865                        format!("Service was not ready: {}", e.into()),
866                    )
867                })?;
868            let codec = tonic::codec::ProstCodec::default();
869            let path = http::uri::PathAndQuery::from_static(
870                "/com.coralogix.datausage.v2.DataUsageService/GetDataUsageMetricsExportStatus",
871            );
872            let mut req = request.into_request();
873            req.extensions_mut()
874                .insert(
875                    GrpcMethod::new(
876                        "com.coralogix.datausage.v2.DataUsageService",
877                        "GetDataUsageMetricsExportStatus",
878                    ),
879                );
880            self.inner.unary(req, path, codec).await
881        }
882        pub async fn update_data_usage_metrics_export_status(
883            &mut self,
884            request: impl tonic::IntoRequest<
885                super::UpdateDataUsageMetricsExportStatusRequest,
886            >,
887        ) -> std::result::Result<
888            tonic::Response<super::UpdateDataUsageMetricsExportStatusResponse>,
889            tonic::Status,
890        > {
891            self.inner
892                .ready()
893                .await
894                .map_err(|e| {
895                    tonic::Status::unknown(
896                        format!("Service was not ready: {}", e.into()),
897                    )
898                })?;
899            let codec = tonic::codec::ProstCodec::default();
900            let path = http::uri::PathAndQuery::from_static(
901                "/com.coralogix.datausage.v2.DataUsageService/UpdateDataUsageMetricsExportStatus",
902            );
903            let mut req = request.into_request();
904            req.extensions_mut()
905                .insert(
906                    GrpcMethod::new(
907                        "com.coralogix.datausage.v2.DataUsageService",
908                        "UpdateDataUsageMetricsExportStatus",
909                    ),
910                );
911            self.inner.unary(req, path, codec).await
912        }
913        pub async fn get_data_usage(
914            &mut self,
915            request: impl tonic::IntoRequest<super::GetDataUsageRequest>,
916        ) -> std::result::Result<
917            tonic::Response<tonic::codec::Streaming<super::GetDataUsageResponse>>,
918            tonic::Status,
919        > {
920            self.inner
921                .ready()
922                .await
923                .map_err(|e| {
924                    tonic::Status::unknown(
925                        format!("Service was not ready: {}", e.into()),
926                    )
927                })?;
928            let codec = tonic::codec::ProstCodec::default();
929            let path = http::uri::PathAndQuery::from_static(
930                "/com.coralogix.datausage.v2.DataUsageService/GetDataUsage",
931            );
932            let mut req = request.into_request();
933            req.extensions_mut()
934                .insert(
935                    GrpcMethod::new(
936                        "com.coralogix.datausage.v2.DataUsageService",
937                        "GetDataUsage",
938                    ),
939                );
940            self.inner.server_streaming(req, path, codec).await
941        }
942        /// /Endpoint to fetch daily usage in units
943        pub async fn get_daily_usage_units(
944            &mut self,
945            request: impl tonic::IntoRequest<super::GetDailyUsageUnitsRequest>,
946        ) -> std::result::Result<
947            tonic::Response<super::GetDailyUsageUnitsResponse>,
948            tonic::Status,
949        > {
950            self.inner
951                .ready()
952                .await
953                .map_err(|e| {
954                    tonic::Status::unknown(
955                        format!("Service was not ready: {}", e.into()),
956                    )
957                })?;
958            let codec = tonic::codec::ProstCodec::default();
959            let path = http::uri::PathAndQuery::from_static(
960                "/com.coralogix.datausage.v2.DataUsageService/GetDailyUsageUnits",
961            );
962            let mut req = request.into_request();
963            req.extensions_mut()
964                .insert(
965                    GrpcMethod::new(
966                        "com.coralogix.datausage.v2.DataUsageService",
967                        "GetDailyUsageUnits",
968                    ),
969                );
970            self.inner.unary(req, path, codec).await
971        }
972        /// /Endpoint to fetch daily usage in GBs
973        pub async fn get_daily_usage_processed_gbs(
974            &mut self,
975            request: impl tonic::IntoRequest<super::GetDailyUsageProcessedGbsRequest>,
976        ) -> std::result::Result<
977            tonic::Response<super::GetDailyUsageProcessedGbsResponse>,
978            tonic::Status,
979        > {
980            self.inner
981                .ready()
982                .await
983                .map_err(|e| {
984                    tonic::Status::unknown(
985                        format!("Service was not ready: {}", e.into()),
986                    )
987                })?;
988            let codec = tonic::codec::ProstCodec::default();
989            let path = http::uri::PathAndQuery::from_static(
990                "/com.coralogix.datausage.v2.DataUsageService/GetDailyUsageProcessedGbs",
991            );
992            let mut req = request.into_request();
993            req.extensions_mut()
994                .insert(
995                    GrpcMethod::new(
996                        "com.coralogix.datausage.v2.DataUsageService",
997                        "GetDailyUsageProcessedGbs",
998                    ),
999                );
1000            self.inner.unary(req, path, codec).await
1001        }
1002        /// /Endpoint to fetch daily usage in evaluation tokens
1003        pub async fn get_daily_usage_evaluation_tokens(
1004            &mut self,
1005            request: impl tonic::IntoRequest<super::GetDailyUsageEvaluationTokensRequest>,
1006        ) -> std::result::Result<
1007            tonic::Response<super::GetDailyUsageEvaluationTokensResponse>,
1008            tonic::Status,
1009        > {
1010            self.inner
1011                .ready()
1012                .await
1013                .map_err(|e| {
1014                    tonic::Status::unknown(
1015                        format!("Service was not ready: {}", e.into()),
1016                    )
1017                })?;
1018            let codec = tonic::codec::ProstCodec::default();
1019            let path = http::uri::PathAndQuery::from_static(
1020                "/com.coralogix.datausage.v2.DataUsageService/GetDailyUsageEvaluationTokens",
1021            );
1022            let mut req = request.into_request();
1023            req.extensions_mut()
1024                .insert(
1025                    GrpcMethod::new(
1026                        "com.coralogix.datausage.v2.DataUsageService",
1027                        "GetDailyUsageEvaluationTokens",
1028                    ),
1029                );
1030            self.inner.unary(req, path, codec).await
1031        }
1032    }
1033}