cx_api/generated/
com.coralogixapis.dashboards.v1.ast.widgets.common.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 ColorsBy {
6    #[prost(oneof = "colors_by::Value", tags = "1, 2, 3")]
7    pub value: ::core::option::Option<colors_by::Value>,
8}
9/// Nested message and enum types in `ColorsBy`.
10pub mod colors_by {
11    #[derive(serde::Serialize, serde::Deserialize)]
12    #[serde(rename_all = "snake_case")]
13    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
14    pub struct ColorsByStack {}
15    #[derive(serde::Serialize, serde::Deserialize)]
16    #[serde(rename_all = "snake_case")]
17    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
18    pub struct ColorsByGroupBy {}
19    #[derive(serde::Serialize, serde::Deserialize)]
20    #[serde(rename_all = "snake_case")]
21    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
22    pub struct ColorsByAggregation {}
23    #[derive(serde::Serialize, serde::Deserialize)]
24    #[serde(rename_all = "snake_case")]
25    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
26    pub enum Value {
27        #[prost(message, tag = "1")]
28        Stack(ColorsByStack),
29        #[prost(message, tag = "2")]
30        GroupBy(ColorsByGroupBy),
31        #[prost(message, tag = "3")]
32        Aggregation(ColorsByAggregation),
33    }
34}
35#[derive(serde::Serialize, serde::Deserialize)]
36#[serde(rename_all = "snake_case")]
37#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
38#[repr(i32)]
39pub enum DataModeType {
40    HighUnspecified = 0,
41    Archive = 1,
42}
43impl DataModeType {
44    /// String value of the enum field names used in the ProtoBuf definition.
45    ///
46    /// The values are not transformed in any way and thus are considered stable
47    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
48    pub fn as_str_name(&self) -> &'static str {
49        match self {
50            Self::HighUnspecified => "DATA_MODE_TYPE_HIGH_UNSPECIFIED",
51            Self::Archive => "DATA_MODE_TYPE_ARCHIVE",
52        }
53    }
54    /// Creates an enum from field names used in the ProtoBuf definition.
55    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
56        match value {
57            "DATA_MODE_TYPE_HIGH_UNSPECIFIED" => Some(Self::HighUnspecified),
58            "DATA_MODE_TYPE_ARCHIVE" => Some(Self::Archive),
59            _ => None,
60        }
61    }
62}
63#[derive(serde::Serialize, serde::Deserialize)]
64#[serde(rename_all = "snake_case")]
65#[derive(Clone, PartialEq, ::prost::Message)]
66pub struct Legend {
67    #[prost(message, optional, tag = "1")]
68    pub is_visible: ::core::option::Option<bool>,
69    #[prost(enumeration = "legend::LegendColumn", repeated, packed = "false", tag = "2")]
70    pub columns: ::prost::alloc::vec::Vec<i32>,
71    #[prost(message, optional, tag = "3")]
72    pub group_by_query: ::core::option::Option<bool>,
73    #[prost(enumeration = "legend::LegendPlacement", tag = "4")]
74    pub placement: i32,
75}
76/// Nested message and enum types in `Legend`.
77pub mod legend {
78    #[derive(serde::Serialize, serde::Deserialize)]
79    #[serde(rename_all = "snake_case")]
80    #[derive(
81        Clone,
82        Copy,
83        Debug,
84        PartialEq,
85        Eq,
86        Hash,
87        PartialOrd,
88        Ord,
89        ::prost::Enumeration
90    )]
91    #[repr(i32)]
92    pub enum LegendColumn {
93        Unspecified = 0,
94        Min = 1,
95        Max = 2,
96        Sum = 3,
97        Avg = 4,
98        Last = 5,
99        Name = 6,
100    }
101    impl LegendColumn {
102        /// String value of the enum field names used in the ProtoBuf definition.
103        ///
104        /// The values are not transformed in any way and thus are considered stable
105        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
106        pub fn as_str_name(&self) -> &'static str {
107            match self {
108                Self::Unspecified => "LEGEND_COLUMN_UNSPECIFIED",
109                Self::Min => "LEGEND_COLUMN_MIN",
110                Self::Max => "LEGEND_COLUMN_MAX",
111                Self::Sum => "LEGEND_COLUMN_SUM",
112                Self::Avg => "LEGEND_COLUMN_AVG",
113                Self::Last => "LEGEND_COLUMN_LAST",
114                Self::Name => "LEGEND_COLUMN_NAME",
115            }
116        }
117        /// Creates an enum from field names used in the ProtoBuf definition.
118        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
119            match value {
120                "LEGEND_COLUMN_UNSPECIFIED" => Some(Self::Unspecified),
121                "LEGEND_COLUMN_MIN" => Some(Self::Min),
122                "LEGEND_COLUMN_MAX" => Some(Self::Max),
123                "LEGEND_COLUMN_SUM" => Some(Self::Sum),
124                "LEGEND_COLUMN_AVG" => Some(Self::Avg),
125                "LEGEND_COLUMN_LAST" => Some(Self::Last),
126                "LEGEND_COLUMN_NAME" => Some(Self::Name),
127                _ => None,
128            }
129        }
130    }
131    #[derive(serde::Serialize, serde::Deserialize)]
132    #[serde(rename_all = "snake_case")]
133    #[derive(
134        Clone,
135        Copy,
136        Debug,
137        PartialEq,
138        Eq,
139        Hash,
140        PartialOrd,
141        Ord,
142        ::prost::Enumeration
143    )]
144    #[repr(i32)]
145    pub enum LegendPlacement {
146        Unspecified = 0,
147        Auto = 1,
148        Bottom = 2,
149        Side = 3,
150        Hidden = 4,
151    }
152    impl LegendPlacement {
153        /// String value of the enum field names used in the ProtoBuf definition.
154        ///
155        /// The values are not transformed in any way and thus are considered stable
156        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
157        pub fn as_str_name(&self) -> &'static str {
158            match self {
159                Self::Unspecified => "LEGEND_PLACEMENT_UNSPECIFIED",
160                Self::Auto => "LEGEND_PLACEMENT_AUTO",
161                Self::Bottom => "LEGEND_PLACEMENT_BOTTOM",
162                Self::Side => "LEGEND_PLACEMENT_SIDE",
163                Self::Hidden => "LEGEND_PLACEMENT_HIDDEN",
164            }
165        }
166        /// Creates an enum from field names used in the ProtoBuf definition.
167        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
168            match value {
169                "LEGEND_PLACEMENT_UNSPECIFIED" => Some(Self::Unspecified),
170                "LEGEND_PLACEMENT_AUTO" => Some(Self::Auto),
171                "LEGEND_PLACEMENT_BOTTOM" => Some(Self::Bottom),
172                "LEGEND_PLACEMENT_SIDE" => Some(Self::Side),
173                "LEGEND_PLACEMENT_HIDDEN" => Some(Self::Hidden),
174                _ => None,
175            }
176        }
177    }
178}
179#[derive(serde::Serialize, serde::Deserialize)]
180#[serde(rename_all = "snake_case")]
181#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
182#[repr(i32)]
183pub enum LegendBy {
184    Unspecified = 0,
185    Thresholds = 1,
186    Groups = 2,
187}
188impl LegendBy {
189    /// String value of the enum field names used in the ProtoBuf definition.
190    ///
191    /// The values are not transformed in any way and thus are considered stable
192    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
193    pub fn as_str_name(&self) -> &'static str {
194        match self {
195            Self::Unspecified => "LEGEND_BY_UNSPECIFIED",
196            Self::Thresholds => "LEGEND_BY_THRESHOLDS",
197            Self::Groups => "LEGEND_BY_GROUPS",
198        }
199    }
200    /// Creates an enum from field names used in the ProtoBuf definition.
201    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
202        match value {
203            "LEGEND_BY_UNSPECIFIED" => Some(Self::Unspecified),
204            "LEGEND_BY_THRESHOLDS" => Some(Self::Thresholds),
205            "LEGEND_BY_GROUPS" => Some(Self::Groups),
206            _ => None,
207        }
208    }
209}
210#[derive(serde::Serialize, serde::Deserialize)]
211#[serde(rename_all = "snake_case")]
212#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
213#[repr(i32)]
214pub enum Aggregation {
215    Unspecified = 0,
216    Last = 1,
217    Min = 2,
218    Max = 3,
219    Avg = 4,
220    Sum = 5,
221}
222impl Aggregation {
223    /// String value of the enum field names used in the ProtoBuf definition.
224    ///
225    /// The values are not transformed in any way and thus are considered stable
226    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
227    pub fn as_str_name(&self) -> &'static str {
228        match self {
229            Self::Unspecified => "AGGREGATION_UNSPECIFIED",
230            Self::Last => "AGGREGATION_LAST",
231            Self::Min => "AGGREGATION_MIN",
232            Self::Max => "AGGREGATION_MAX",
233            Self::Avg => "AGGREGATION_AVG",
234            Self::Sum => "AGGREGATION_SUM",
235        }
236    }
237    /// Creates an enum from field names used in the ProtoBuf definition.
238    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
239        match value {
240            "AGGREGATION_UNSPECIFIED" => Some(Self::Unspecified),
241            "AGGREGATION_LAST" => Some(Self::Last),
242            "AGGREGATION_MIN" => Some(Self::Min),
243            "AGGREGATION_MAX" => Some(Self::Max),
244            "AGGREGATION_AVG" => Some(Self::Avg),
245            "AGGREGATION_SUM" => Some(Self::Sum),
246            _ => None,
247        }
248    }
249}
250#[derive(serde::Serialize, serde::Deserialize)]
251#[serde(rename_all = "snake_case")]
252#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
253#[repr(i32)]
254pub enum MetricsQueryEditorMode {
255    Unspecified = 0,
256    Text = 1,
257    Builder = 2,
258}
259impl MetricsQueryEditorMode {
260    /// String value of the enum field names used in the ProtoBuf definition.
261    ///
262    /// The values are not transformed in any way and thus are considered stable
263    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
264    pub fn as_str_name(&self) -> &'static str {
265        match self {
266            Self::Unspecified => "METRICS_QUERY_EDITOR_MODE_UNSPECIFIED",
267            Self::Text => "METRICS_QUERY_EDITOR_MODE_TEXT",
268            Self::Builder => "METRICS_QUERY_EDITOR_MODE_BUILDER",
269        }
270    }
271    /// Creates an enum from field names used in the ProtoBuf definition.
272    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
273        match value {
274            "METRICS_QUERY_EDITOR_MODE_UNSPECIFIED" => Some(Self::Unspecified),
275            "METRICS_QUERY_EDITOR_MODE_TEXT" => Some(Self::Text),
276            "METRICS_QUERY_EDITOR_MODE_BUILDER" => Some(Self::Builder),
277            _ => None,
278        }
279    }
280}
281#[derive(serde::Serialize, serde::Deserialize)]
282#[serde(rename_all = "snake_case")]
283#[derive(Clone, PartialEq, ::prost::Message)]
284pub struct PromQlQuery {
285    #[prost(message, optional, tag = "1")]
286    pub value: ::core::option::Option<::prost::alloc::string::String>,
287}
288#[derive(serde::Serialize, serde::Deserialize)]
289#[serde(rename_all = "snake_case")]
290#[derive(Clone, PartialEq, ::prost::Message)]
291pub struct LuceneQuery {
292    #[prost(message, optional, tag = "1")]
293    pub value: ::core::option::Option<::prost::alloc::string::String>,
294}
295#[derive(serde::Serialize, serde::Deserialize)]
296#[serde(rename_all = "snake_case")]
297#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
298#[repr(i32)]
299pub enum ScaleType {
300    Unspecified = 0,
301    Linear = 1,
302    Logarithmic = 2,
303}
304impl ScaleType {
305    /// String value of the enum field names used in the ProtoBuf definition.
306    ///
307    /// The values are not transformed in any way and thus are considered stable
308    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
309    pub fn as_str_name(&self) -> &'static str {
310        match self {
311            Self::Unspecified => "SCALE_TYPE_UNSPECIFIED",
312            Self::Linear => "SCALE_TYPE_LINEAR",
313            Self::Logarithmic => "SCALE_TYPE_LOGARITHMIC",
314        }
315    }
316    /// Creates an enum from field names used in the ProtoBuf definition.
317    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
318        match value {
319            "SCALE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
320            "SCALE_TYPE_LINEAR" => Some(Self::Linear),
321            "SCALE_TYPE_LOGARITHMIC" => Some(Self::Logarithmic),
322            _ => None,
323        }
324    }
325}
326#[derive(serde::Serialize, serde::Deserialize)]
327#[serde(rename_all = "snake_case")]
328#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
329#[repr(i32)]
330pub enum SortByType {
331    Unspecified = 0,
332    Value = 1,
333    Name = 2,
334}
335impl SortByType {
336    /// String value of the enum field names used in the ProtoBuf definition.
337    ///
338    /// The values are not transformed in any way and thus are considered stable
339    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
340    pub fn as_str_name(&self) -> &'static str {
341        match self {
342            Self::Unspecified => "SORT_BY_TYPE_UNSPECIFIED",
343            Self::Value => "SORT_BY_TYPE_VALUE",
344            Self::Name => "SORT_BY_TYPE_NAME",
345        }
346    }
347    /// Creates an enum from field names used in the ProtoBuf definition.
348    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
349        match value {
350            "SORT_BY_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
351            "SORT_BY_TYPE_VALUE" => Some(Self::Value),
352            "SORT_BY_TYPE_NAME" => Some(Self::Name),
353            _ => None,
354        }
355    }
356}
357#[derive(serde::Serialize, serde::Deserialize)]
358#[serde(rename_all = "snake_case")]
359#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
360#[repr(i32)]
361pub enum Unit {
362    Unspecified = 0,
363    Microseconds = 1,
364    Milliseconds = 2,
365    Seconds = 3,
366    Bytes = 4,
367    Kbytes = 5,
368    Mbytes = 6,
369    Gbytes = 7,
370    BytesIec = 8,
371    Kibytes = 9,
372    Mibytes = 10,
373    Gibytes = 11,
374    EurCents = 12,
375    Eur = 13,
376    UsdCents = 14,
377    Usd = 15,
378    Nanoseconds = 16,
379    Custom = 17,
380    PercentZeroOne = 18,
381    PercentZeroHundred = 19,
382    Percent = 20,
383}
384impl Unit {
385    /// String value of the enum field names used in the ProtoBuf definition.
386    ///
387    /// The values are not transformed in any way and thus are considered stable
388    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
389    pub fn as_str_name(&self) -> &'static str {
390        match self {
391            Self::Unspecified => "UNIT_UNSPECIFIED",
392            Self::Microseconds => "UNIT_MICROSECONDS",
393            Self::Milliseconds => "UNIT_MILLISECONDS",
394            Self::Seconds => "UNIT_SECONDS",
395            Self::Bytes => "UNIT_BYTES",
396            Self::Kbytes => "UNIT_KBYTES",
397            Self::Mbytes => "UNIT_MBYTES",
398            Self::Gbytes => "UNIT_GBYTES",
399            Self::BytesIec => "UNIT_BYTES_IEC",
400            Self::Kibytes => "UNIT_KIBYTES",
401            Self::Mibytes => "UNIT_MIBYTES",
402            Self::Gibytes => "UNIT_GIBYTES",
403            Self::EurCents => "UNIT_EUR_CENTS",
404            Self::Eur => "UNIT_EUR",
405            Self::UsdCents => "UNIT_USD_CENTS",
406            Self::Usd => "UNIT_USD",
407            Self::Nanoseconds => "UNIT_NANOSECONDS",
408            Self::Custom => "UNIT_CUSTOM",
409            Self::PercentZeroOne => "UNIT_PERCENT_ZERO_ONE",
410            Self::PercentZeroHundred => "UNIT_PERCENT_ZERO_HUNDRED",
411            Self::Percent => "UNIT_PERCENT",
412        }
413    }
414    /// Creates an enum from field names used in the ProtoBuf definition.
415    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
416        match value {
417            "UNIT_UNSPECIFIED" => Some(Self::Unspecified),
418            "UNIT_MICROSECONDS" => Some(Self::Microseconds),
419            "UNIT_MILLISECONDS" => Some(Self::Milliseconds),
420            "UNIT_SECONDS" => Some(Self::Seconds),
421            "UNIT_BYTES" => Some(Self::Bytes),
422            "UNIT_KBYTES" => Some(Self::Kbytes),
423            "UNIT_MBYTES" => Some(Self::Mbytes),
424            "UNIT_GBYTES" => Some(Self::Gbytes),
425            "UNIT_BYTES_IEC" => Some(Self::BytesIec),
426            "UNIT_KIBYTES" => Some(Self::Kibytes),
427            "UNIT_MIBYTES" => Some(Self::Mibytes),
428            "UNIT_GIBYTES" => Some(Self::Gibytes),
429            "UNIT_EUR_CENTS" => Some(Self::EurCents),
430            "UNIT_EUR" => Some(Self::Eur),
431            "UNIT_USD_CENTS" => Some(Self::UsdCents),
432            "UNIT_USD" => Some(Self::Usd),
433            "UNIT_NANOSECONDS" => Some(Self::Nanoseconds),
434            "UNIT_CUSTOM" => Some(Self::Custom),
435            "UNIT_PERCENT_ZERO_ONE" => Some(Self::PercentZeroOne),
436            "UNIT_PERCENT_ZERO_HUNDRED" => Some(Self::PercentZeroHundred),
437            "UNIT_PERCENT" => Some(Self::Percent),
438            _ => None,
439        }
440    }
441}
442#[derive(serde::Serialize, serde::Deserialize)]
443#[serde(rename_all = "snake_case")]
444#[derive(Clone, PartialEq, ::prost::Message)]
445pub struct Threshold {
446    #[prost(message, optional, tag = "1")]
447    pub from: ::core::option::Option<f64>,
448    #[prost(message, optional, tag = "2")]
449    pub color: ::core::option::Option<::prost::alloc::string::String>,
450    #[prost(message, optional, tag = "3")]
451    pub label: ::core::option::Option<::prost::alloc::string::String>,
452}
453#[derive(serde::Serialize, serde::Deserialize)]
454#[serde(rename_all = "snake_case")]
455#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
456#[repr(i32)]
457pub enum ThresholdType {
458    Unspecified = 0,
459    Relative = 1,
460    Absolute = 2,
461}
462impl ThresholdType {
463    /// String value of the enum field names used in the ProtoBuf definition.
464    ///
465    /// The values are not transformed in any way and thus are considered stable
466    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
467    pub fn as_str_name(&self) -> &'static str {
468        match self {
469            Self::Unspecified => "THRESHOLD_TYPE_UNSPECIFIED",
470            Self::Relative => "THRESHOLD_TYPE_RELATIVE",
471            Self::Absolute => "THRESHOLD_TYPE_ABSOLUTE",
472        }
473    }
474    /// Creates an enum from field names used in the ProtoBuf definition.
475    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
476        match value {
477            "THRESHOLD_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
478            "THRESHOLD_TYPE_RELATIVE" => Some(Self::Relative),
479            "THRESHOLD_TYPE_ABSOLUTE" => Some(Self::Absolute),
480            _ => None,
481        }
482    }
483}
484#[derive(serde::Serialize, serde::Deserialize)]
485#[serde(rename_all = "snake_case")]
486#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
487#[repr(i32)]
488pub enum ThresholdBy {
489    Unspecified = 0,
490    Value = 1,
491    Background = 2,
492}
493impl ThresholdBy {
494    /// String value of the enum field names used in the ProtoBuf definition.
495    ///
496    /// The values are not transformed in any way and thus are considered stable
497    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
498    pub fn as_str_name(&self) -> &'static str {
499        match self {
500            Self::Unspecified => "THRESHOLD_BY_UNSPECIFIED",
501            Self::Value => "THRESHOLD_BY_VALUE",
502            Self::Background => "THRESHOLD_BY_BACKGROUND",
503        }
504    }
505    /// Creates an enum from field names used in the ProtoBuf definition.
506    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
507        match value {
508            "THRESHOLD_BY_UNSPECIFIED" => Some(Self::Unspecified),
509            "THRESHOLD_BY_VALUE" => Some(Self::Value),
510            "THRESHOLD_BY_BACKGROUND" => Some(Self::Background),
511            _ => None,
512        }
513    }
514}