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, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
284#[repr(i32)]
285pub enum ScaleType {
286    Unspecified = 0,
287    Linear = 1,
288    Logarithmic = 2,
289}
290impl ScaleType {
291    /// String value of the enum field names used in the ProtoBuf definition.
292    ///
293    /// The values are not transformed in any way and thus are considered stable
294    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
295    pub fn as_str_name(&self) -> &'static str {
296        match self {
297            Self::Unspecified => "SCALE_TYPE_UNSPECIFIED",
298            Self::Linear => "SCALE_TYPE_LINEAR",
299            Self::Logarithmic => "SCALE_TYPE_LOGARITHMIC",
300        }
301    }
302    /// Creates an enum from field names used in the ProtoBuf definition.
303    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
304        match value {
305            "SCALE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
306            "SCALE_TYPE_LINEAR" => Some(Self::Linear),
307            "SCALE_TYPE_LOGARITHMIC" => Some(Self::Logarithmic),
308            _ => None,
309        }
310    }
311}
312#[derive(serde::Serialize, serde::Deserialize)]
313#[serde(rename_all = "snake_case")]
314#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
315#[repr(i32)]
316pub enum SortByType {
317    Unspecified = 0,
318    Value = 1,
319    Name = 2,
320}
321impl SortByType {
322    /// String value of the enum field names used in the ProtoBuf definition.
323    ///
324    /// The values are not transformed in any way and thus are considered stable
325    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
326    pub fn as_str_name(&self) -> &'static str {
327        match self {
328            Self::Unspecified => "SORT_BY_TYPE_UNSPECIFIED",
329            Self::Value => "SORT_BY_TYPE_VALUE",
330            Self::Name => "SORT_BY_TYPE_NAME",
331        }
332    }
333    /// Creates an enum from field names used in the ProtoBuf definition.
334    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
335        match value {
336            "SORT_BY_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
337            "SORT_BY_TYPE_VALUE" => Some(Self::Value),
338            "SORT_BY_TYPE_NAME" => Some(Self::Name),
339            _ => None,
340        }
341    }
342}
343#[derive(serde::Serialize, serde::Deserialize)]
344#[serde(rename_all = "snake_case")]
345#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
346#[repr(i32)]
347pub enum Unit {
348    Unspecified = 0,
349    Microseconds = 1,
350    Milliseconds = 2,
351    Seconds = 3,
352    Bytes = 4,
353    Kbytes = 5,
354    Mbytes = 6,
355    Gbytes = 7,
356    BytesIec = 8,
357    Kibytes = 9,
358    Mibytes = 10,
359    Gibytes = 11,
360    EurCents = 12,
361    Eur = 13,
362    UsdCents = 14,
363    Usd = 15,
364    Nanoseconds = 16,
365    Custom = 17,
366    PercentZeroOne = 18,
367    PercentZeroHundred = 19,
368    Percent = 20,
369}
370impl Unit {
371    /// String value of the enum field names used in the ProtoBuf definition.
372    ///
373    /// The values are not transformed in any way and thus are considered stable
374    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
375    pub fn as_str_name(&self) -> &'static str {
376        match self {
377            Self::Unspecified => "UNIT_UNSPECIFIED",
378            Self::Microseconds => "UNIT_MICROSECONDS",
379            Self::Milliseconds => "UNIT_MILLISECONDS",
380            Self::Seconds => "UNIT_SECONDS",
381            Self::Bytes => "UNIT_BYTES",
382            Self::Kbytes => "UNIT_KBYTES",
383            Self::Mbytes => "UNIT_MBYTES",
384            Self::Gbytes => "UNIT_GBYTES",
385            Self::BytesIec => "UNIT_BYTES_IEC",
386            Self::Kibytes => "UNIT_KIBYTES",
387            Self::Mibytes => "UNIT_MIBYTES",
388            Self::Gibytes => "UNIT_GIBYTES",
389            Self::EurCents => "UNIT_EUR_CENTS",
390            Self::Eur => "UNIT_EUR",
391            Self::UsdCents => "UNIT_USD_CENTS",
392            Self::Usd => "UNIT_USD",
393            Self::Nanoseconds => "UNIT_NANOSECONDS",
394            Self::Custom => "UNIT_CUSTOM",
395            Self::PercentZeroOne => "UNIT_PERCENT_ZERO_ONE",
396            Self::PercentZeroHundred => "UNIT_PERCENT_ZERO_HUNDRED",
397            Self::Percent => "UNIT_PERCENT",
398        }
399    }
400    /// Creates an enum from field names used in the ProtoBuf definition.
401    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
402        match value {
403            "UNIT_UNSPECIFIED" => Some(Self::Unspecified),
404            "UNIT_MICROSECONDS" => Some(Self::Microseconds),
405            "UNIT_MILLISECONDS" => Some(Self::Milliseconds),
406            "UNIT_SECONDS" => Some(Self::Seconds),
407            "UNIT_BYTES" => Some(Self::Bytes),
408            "UNIT_KBYTES" => Some(Self::Kbytes),
409            "UNIT_MBYTES" => Some(Self::Mbytes),
410            "UNIT_GBYTES" => Some(Self::Gbytes),
411            "UNIT_BYTES_IEC" => Some(Self::BytesIec),
412            "UNIT_KIBYTES" => Some(Self::Kibytes),
413            "UNIT_MIBYTES" => Some(Self::Mibytes),
414            "UNIT_GIBYTES" => Some(Self::Gibytes),
415            "UNIT_EUR_CENTS" => Some(Self::EurCents),
416            "UNIT_EUR" => Some(Self::Eur),
417            "UNIT_USD_CENTS" => Some(Self::UsdCents),
418            "UNIT_USD" => Some(Self::Usd),
419            "UNIT_NANOSECONDS" => Some(Self::Nanoseconds),
420            "UNIT_CUSTOM" => Some(Self::Custom),
421            "UNIT_PERCENT_ZERO_ONE" => Some(Self::PercentZeroOne),
422            "UNIT_PERCENT_ZERO_HUNDRED" => Some(Self::PercentZeroHundred),
423            "UNIT_PERCENT" => Some(Self::Percent),
424            _ => None,
425        }
426    }
427}
428#[derive(serde::Serialize, serde::Deserialize)]
429#[serde(rename_all = "snake_case")]
430#[derive(Clone, PartialEq, ::prost::Message)]
431pub struct Threshold {
432    #[prost(message, optional, tag = "1")]
433    pub from: ::core::option::Option<f64>,
434    #[prost(message, optional, tag = "2")]
435    pub color: ::core::option::Option<::prost::alloc::string::String>,
436    #[prost(message, optional, tag = "3")]
437    pub label: ::core::option::Option<::prost::alloc::string::String>,
438}
439#[derive(serde::Serialize, serde::Deserialize)]
440#[serde(rename_all = "snake_case")]
441#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
442#[repr(i32)]
443pub enum ThresholdType {
444    Unspecified = 0,
445    Relative = 1,
446    Absolute = 2,
447}
448impl ThresholdType {
449    /// String value of the enum field names used in the ProtoBuf definition.
450    ///
451    /// The values are not transformed in any way and thus are considered stable
452    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
453    pub fn as_str_name(&self) -> &'static str {
454        match self {
455            Self::Unspecified => "THRESHOLD_TYPE_UNSPECIFIED",
456            Self::Relative => "THRESHOLD_TYPE_RELATIVE",
457            Self::Absolute => "THRESHOLD_TYPE_ABSOLUTE",
458        }
459    }
460    /// Creates an enum from field names used in the ProtoBuf definition.
461    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
462        match value {
463            "THRESHOLD_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
464            "THRESHOLD_TYPE_RELATIVE" => Some(Self::Relative),
465            "THRESHOLD_TYPE_ABSOLUTE" => Some(Self::Absolute),
466            _ => None,
467        }
468    }
469}
470#[derive(serde::Serialize, serde::Deserialize)]
471#[serde(rename_all = "snake_case")]
472#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
473#[repr(i32)]
474pub enum ThresholdBy {
475    Unspecified = 0,
476    Value = 1,
477    Background = 2,
478}
479impl ThresholdBy {
480    /// String value of the enum field names used in the ProtoBuf definition.
481    ///
482    /// The values are not transformed in any way and thus are considered stable
483    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
484    pub fn as_str_name(&self) -> &'static str {
485        match self {
486            Self::Unspecified => "THRESHOLD_BY_UNSPECIFIED",
487            Self::Value => "THRESHOLD_BY_VALUE",
488            Self::Background => "THRESHOLD_BY_BACKGROUND",
489        }
490    }
491    /// Creates an enum from field names used in the ProtoBuf definition.
492    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
493        match value {
494            "THRESHOLD_BY_UNSPECIFIED" => Some(Self::Unspecified),
495            "THRESHOLD_BY_VALUE" => Some(Self::Value),
496            "THRESHOLD_BY_BACKGROUND" => Some(Self::Background),
497            _ => None,
498        }
499    }
500}