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 a 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    PolicyName = 5,
643    Severity = 6,
644}
645impl AggregateBy {
646    /// String value of the enum field names used in the ProtoBuf definition.
647    ///
648    /// The values are not transformed in any way and thus are considered stable
649    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
650    pub fn as_str_name(&self) -> &'static str {
651        match self {
652            Self::Unspecified => "AGGREGATE_BY_UNSPECIFIED",
653            Self::Application => "AGGREGATE_BY_APPLICATION",
654            Self::Subsystem => "AGGREGATE_BY_SUBSYSTEM",
655            Self::Pillar => "AGGREGATE_BY_PILLAR",
656            Self::Priority => "AGGREGATE_BY_PRIORITY",
657            Self::PolicyName => "AGGREGATE_BY_POLICY_NAME",
658            Self::Severity => "AGGREGATE_BY_SEVERITY",
659        }
660    }
661    /// Creates an enum from field names used in the ProtoBuf definition.
662    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
663        match value {
664            "AGGREGATE_BY_UNSPECIFIED" => Some(Self::Unspecified),
665            "AGGREGATE_BY_APPLICATION" => Some(Self::Application),
666            "AGGREGATE_BY_SUBSYSTEM" => Some(Self::Subsystem),
667            "AGGREGATE_BY_PILLAR" => Some(Self::Pillar),
668            "AGGREGATE_BY_PRIORITY" => Some(Self::Priority),
669            "AGGREGATE_BY_POLICY_NAME" => Some(Self::PolicyName),
670            "AGGREGATE_BY_SEVERITY" => Some(Self::Severity),
671            _ => None,
672        }
673    }
674}
675/// Generated client implementations.
676pub mod data_usage_service_client {
677    #![allow(
678        unused_variables,
679        dead_code,
680        missing_docs,
681        clippy::wildcard_imports,
682        clippy::let_unit_value,
683    )]
684    use tonic::codegen::*;
685    use tonic::codegen::http::Uri;
686    #[derive(Debug, Clone)]
687    pub struct DataUsageServiceClient<T> {
688        inner: tonic::client::Grpc<T>,
689    }
690    impl DataUsageServiceClient<tonic::transport::Channel> {
691        /// Attempt to create a new client by connecting to a given endpoint.
692        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
693        where
694            D: TryInto<tonic::transport::Endpoint>,
695            D::Error: Into<StdError>,
696        {
697            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
698            Ok(Self::new(conn))
699        }
700    }
701    impl<T> DataUsageServiceClient<T>
702    where
703        T: tonic::client::GrpcService<tonic::body::BoxBody>,
704        T::Error: Into<StdError>,
705        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
706        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
707    {
708        pub fn new(inner: T) -> Self {
709            let inner = tonic::client::Grpc::new(inner);
710            Self { inner }
711        }
712        pub fn with_origin(inner: T, origin: Uri) -> Self {
713            let inner = tonic::client::Grpc::with_origin(inner, origin);
714            Self { inner }
715        }
716        pub fn with_interceptor<F>(
717            inner: T,
718            interceptor: F,
719        ) -> DataUsageServiceClient<InterceptedService<T, F>>
720        where
721            F: tonic::service::Interceptor,
722            T::ResponseBody: Default,
723            T: tonic::codegen::Service<
724                http::Request<tonic::body::BoxBody>,
725                Response = http::Response<
726                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
727                >,
728            >,
729            <T as tonic::codegen::Service<
730                http::Request<tonic::body::BoxBody>,
731            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
732        {
733            DataUsageServiceClient::new(InterceptedService::new(inner, interceptor))
734        }
735        /// Compress requests with the given encoding.
736        ///
737        /// This requires the server to support it otherwise it might respond with an
738        /// error.
739        #[must_use]
740        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
741            self.inner = self.inner.send_compressed(encoding);
742            self
743        }
744        /// Enable decompressing responses.
745        #[must_use]
746        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
747            self.inner = self.inner.accept_compressed(encoding);
748            self
749        }
750        /// Limits the maximum size of a decoded message.
751        ///
752        /// Default: `4MB`
753        #[must_use]
754        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
755            self.inner = self.inner.max_decoding_message_size(limit);
756            self
757        }
758        /// Limits the maximum size of an encoded message.
759        ///
760        /// Default: `usize::MAX`
761        #[must_use]
762        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
763            self.inner = self.inner.max_encoding_message_size(limit);
764            self
765        }
766        /// Deprecated. Please use GetDataUsage instead.
767        #[deprecated]
768        pub async fn get_team_detailed_data_usage(
769            &mut self,
770            request: impl tonic::IntoRequest<super::GetTeamDetailedDataUsageRequest>,
771        ) -> std::result::Result<
772            tonic::Response<
773                tonic::codec::Streaming<super::GetTeamDetailedDataUsageResponse>,
774            >,
775            tonic::Status,
776        > {
777            self.inner
778                .ready()
779                .await
780                .map_err(|e| {
781                    tonic::Status::unknown(
782                        format!("Service was not ready: {}", e.into()),
783                    )
784                })?;
785            let codec = tonic::codec::ProstCodec::default();
786            let path = http::uri::PathAndQuery::from_static(
787                "/com.coralogix.datausage.v2.DataUsageService/GetTeamDetailedDataUsage",
788            );
789            let mut req = request.into_request();
790            req.extensions_mut()
791                .insert(
792                    GrpcMethod::new(
793                        "com.coralogix.datausage.v2.DataUsageService",
794                        "GetTeamDetailedDataUsage",
795                    ),
796                );
797            self.inner.server_streaming(req, path, codec).await
798        }
799        pub async fn get_spans_count(
800            &mut self,
801            request: impl tonic::IntoRequest<super::GetSpansCountRequest>,
802        ) -> std::result::Result<
803            tonic::Response<tonic::codec::Streaming<super::GetSpansCountResponse>>,
804            tonic::Status,
805        > {
806            self.inner
807                .ready()
808                .await
809                .map_err(|e| {
810                    tonic::Status::unknown(
811                        format!("Service was not ready: {}", e.into()),
812                    )
813                })?;
814            let codec = tonic::codec::ProstCodec::default();
815            let path = http::uri::PathAndQuery::from_static(
816                "/com.coralogix.datausage.v2.DataUsageService/GetSpansCount",
817            );
818            let mut req = request.into_request();
819            req.extensions_mut()
820                .insert(
821                    GrpcMethod::new(
822                        "com.coralogix.datausage.v2.DataUsageService",
823                        "GetSpansCount",
824                    ),
825                );
826            self.inner.server_streaming(req, path, codec).await
827        }
828        pub async fn get_logs_count(
829            &mut self,
830            request: impl tonic::IntoRequest<super::GetLogsCountRequest>,
831        ) -> std::result::Result<
832            tonic::Response<tonic::codec::Streaming<super::GetLogsCountResponse>>,
833            tonic::Status,
834        > {
835            self.inner
836                .ready()
837                .await
838                .map_err(|e| {
839                    tonic::Status::unknown(
840                        format!("Service was not ready: {}", e.into()),
841                    )
842                })?;
843            let codec = tonic::codec::ProstCodec::default();
844            let path = http::uri::PathAndQuery::from_static(
845                "/com.coralogix.datausage.v2.DataUsageService/GetLogsCount",
846            );
847            let mut req = request.into_request();
848            req.extensions_mut()
849                .insert(
850                    GrpcMethod::new(
851                        "com.coralogix.datausage.v2.DataUsageService",
852                        "GetLogsCount",
853                    ),
854                );
855            self.inner.server_streaming(req, path, codec).await
856        }
857        pub async fn get_data_usage_metrics_export_status(
858            &mut self,
859            request: impl tonic::IntoRequest<
860                super::GetDataUsageMetricsExportStatusRequest,
861            >,
862        ) -> std::result::Result<
863            tonic::Response<super::GetDataUsageMetricsExportStatusResponse>,
864            tonic::Status,
865        > {
866            self.inner
867                .ready()
868                .await
869                .map_err(|e| {
870                    tonic::Status::unknown(
871                        format!("Service was not ready: {}", e.into()),
872                    )
873                })?;
874            let codec = tonic::codec::ProstCodec::default();
875            let path = http::uri::PathAndQuery::from_static(
876                "/com.coralogix.datausage.v2.DataUsageService/GetDataUsageMetricsExportStatus",
877            );
878            let mut req = request.into_request();
879            req.extensions_mut()
880                .insert(
881                    GrpcMethod::new(
882                        "com.coralogix.datausage.v2.DataUsageService",
883                        "GetDataUsageMetricsExportStatus",
884                    ),
885                );
886            self.inner.unary(req, path, codec).await
887        }
888        pub async fn update_data_usage_metrics_export_status(
889            &mut self,
890            request: impl tonic::IntoRequest<
891                super::UpdateDataUsageMetricsExportStatusRequest,
892            >,
893        ) -> std::result::Result<
894            tonic::Response<super::UpdateDataUsageMetricsExportStatusResponse>,
895            tonic::Status,
896        > {
897            self.inner
898                .ready()
899                .await
900                .map_err(|e| {
901                    tonic::Status::unknown(
902                        format!("Service was not ready: {}", e.into()),
903                    )
904                })?;
905            let codec = tonic::codec::ProstCodec::default();
906            let path = http::uri::PathAndQuery::from_static(
907                "/com.coralogix.datausage.v2.DataUsageService/UpdateDataUsageMetricsExportStatus",
908            );
909            let mut req = request.into_request();
910            req.extensions_mut()
911                .insert(
912                    GrpcMethod::new(
913                        "com.coralogix.datausage.v2.DataUsageService",
914                        "UpdateDataUsageMetricsExportStatus",
915                    ),
916                );
917            self.inner.unary(req, path, codec).await
918        }
919        pub async fn get_data_usage(
920            &mut self,
921            request: impl tonic::IntoRequest<super::GetDataUsageRequest>,
922        ) -> std::result::Result<
923            tonic::Response<tonic::codec::Streaming<super::GetDataUsageResponse>>,
924            tonic::Status,
925        > {
926            self.inner
927                .ready()
928                .await
929                .map_err(|e| {
930                    tonic::Status::unknown(
931                        format!("Service was not ready: {}", e.into()),
932                    )
933                })?;
934            let codec = tonic::codec::ProstCodec::default();
935            let path = http::uri::PathAndQuery::from_static(
936                "/com.coralogix.datausage.v2.DataUsageService/GetDataUsage",
937            );
938            let mut req = request.into_request();
939            req.extensions_mut()
940                .insert(
941                    GrpcMethod::new(
942                        "com.coralogix.datausage.v2.DataUsageService",
943                        "GetDataUsage",
944                    ),
945                );
946            self.inner.server_streaming(req, path, codec).await
947        }
948        /// /Endpoint to fetch daily usage in units
949        pub async fn get_daily_usage_units(
950            &mut self,
951            request: impl tonic::IntoRequest<super::GetDailyUsageUnitsRequest>,
952        ) -> std::result::Result<
953            tonic::Response<super::GetDailyUsageUnitsResponse>,
954            tonic::Status,
955        > {
956            self.inner
957                .ready()
958                .await
959                .map_err(|e| {
960                    tonic::Status::unknown(
961                        format!("Service was not ready: {}", e.into()),
962                    )
963                })?;
964            let codec = tonic::codec::ProstCodec::default();
965            let path = http::uri::PathAndQuery::from_static(
966                "/com.coralogix.datausage.v2.DataUsageService/GetDailyUsageUnits",
967            );
968            let mut req = request.into_request();
969            req.extensions_mut()
970                .insert(
971                    GrpcMethod::new(
972                        "com.coralogix.datausage.v2.DataUsageService",
973                        "GetDailyUsageUnits",
974                    ),
975                );
976            self.inner.unary(req, path, codec).await
977        }
978        /// /Endpoint to fetch daily usage in GBs
979        pub async fn get_daily_usage_processed_gbs(
980            &mut self,
981            request: impl tonic::IntoRequest<super::GetDailyUsageProcessedGbsRequest>,
982        ) -> std::result::Result<
983            tonic::Response<super::GetDailyUsageProcessedGbsResponse>,
984            tonic::Status,
985        > {
986            self.inner
987                .ready()
988                .await
989                .map_err(|e| {
990                    tonic::Status::unknown(
991                        format!("Service was not ready: {}", e.into()),
992                    )
993                })?;
994            let codec = tonic::codec::ProstCodec::default();
995            let path = http::uri::PathAndQuery::from_static(
996                "/com.coralogix.datausage.v2.DataUsageService/GetDailyUsageProcessedGbs",
997            );
998            let mut req = request.into_request();
999            req.extensions_mut()
1000                .insert(
1001                    GrpcMethod::new(
1002                        "com.coralogix.datausage.v2.DataUsageService",
1003                        "GetDailyUsageProcessedGbs",
1004                    ),
1005                );
1006            self.inner.unary(req, path, codec).await
1007        }
1008        /// /Endpoint to fetch daily usage in evaluation tokens
1009        pub async fn get_daily_usage_evaluation_tokens(
1010            &mut self,
1011            request: impl tonic::IntoRequest<super::GetDailyUsageEvaluationTokensRequest>,
1012        ) -> std::result::Result<
1013            tonic::Response<super::GetDailyUsageEvaluationTokensResponse>,
1014            tonic::Status,
1015        > {
1016            self.inner
1017                .ready()
1018                .await
1019                .map_err(|e| {
1020                    tonic::Status::unknown(
1021                        format!("Service was not ready: {}", e.into()),
1022                    )
1023                })?;
1024            let codec = tonic::codec::ProstCodec::default();
1025            let path = http::uri::PathAndQuery::from_static(
1026                "/com.coralogix.datausage.v2.DataUsageService/GetDailyUsageEvaluationTokens",
1027            );
1028            let mut req = request.into_request();
1029            req.extensions_mut()
1030                .insert(
1031                    GrpcMethod::new(
1032                        "com.coralogix.datausage.v2.DataUsageService",
1033                        "GetDailyUsageEvaluationTokens",
1034                    ),
1035                );
1036            self.inner.unary(req, path, codec).await
1037        }
1038    }
1039}