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