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        SimpleValue = 7,
101    }
102    impl LegendColumn {
103        /// String value of the enum field names used in the ProtoBuf definition.
104        ///
105        /// The values are not transformed in any way and thus are considered stable
106        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
107        pub fn as_str_name(&self) -> &'static str {
108            match self {
109                Self::Unspecified => "LEGEND_COLUMN_UNSPECIFIED",
110                Self::Min => "LEGEND_COLUMN_MIN",
111                Self::Max => "LEGEND_COLUMN_MAX",
112                Self::Sum => "LEGEND_COLUMN_SUM",
113                Self::Avg => "LEGEND_COLUMN_AVG",
114                Self::Last => "LEGEND_COLUMN_LAST",
115                Self::Name => "LEGEND_COLUMN_NAME",
116                Self::SimpleValue => "LEGEND_COLUMN_SIMPLE_VALUE",
117            }
118        }
119        /// Creates an enum from field names used in the ProtoBuf definition.
120        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
121            match value {
122                "LEGEND_COLUMN_UNSPECIFIED" => Some(Self::Unspecified),
123                "LEGEND_COLUMN_MIN" => Some(Self::Min),
124                "LEGEND_COLUMN_MAX" => Some(Self::Max),
125                "LEGEND_COLUMN_SUM" => Some(Self::Sum),
126                "LEGEND_COLUMN_AVG" => Some(Self::Avg),
127                "LEGEND_COLUMN_LAST" => Some(Self::Last),
128                "LEGEND_COLUMN_NAME" => Some(Self::Name),
129                "LEGEND_COLUMN_SIMPLE_VALUE" => Some(Self::SimpleValue),
130                _ => None,
131            }
132        }
133    }
134    #[derive(serde::Serialize, serde::Deserialize)]
135    #[serde(rename_all = "snake_case")]
136    #[derive(
137        Clone,
138        Copy,
139        Debug,
140        PartialEq,
141        Eq,
142        Hash,
143        PartialOrd,
144        Ord,
145        ::prost::Enumeration
146    )]
147    #[repr(i32)]
148    pub enum LegendPlacement {
149        Unspecified = 0,
150        Auto = 1,
151        Bottom = 2,
152        Side = 3,
153        Hidden = 4,
154    }
155    impl LegendPlacement {
156        /// String value of the enum field names used in the ProtoBuf definition.
157        ///
158        /// The values are not transformed in any way and thus are considered stable
159        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
160        pub fn as_str_name(&self) -> &'static str {
161            match self {
162                Self::Unspecified => "LEGEND_PLACEMENT_UNSPECIFIED",
163                Self::Auto => "LEGEND_PLACEMENT_AUTO",
164                Self::Bottom => "LEGEND_PLACEMENT_BOTTOM",
165                Self::Side => "LEGEND_PLACEMENT_SIDE",
166                Self::Hidden => "LEGEND_PLACEMENT_HIDDEN",
167            }
168        }
169        /// Creates an enum from field names used in the ProtoBuf definition.
170        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
171            match value {
172                "LEGEND_PLACEMENT_UNSPECIFIED" => Some(Self::Unspecified),
173                "LEGEND_PLACEMENT_AUTO" => Some(Self::Auto),
174                "LEGEND_PLACEMENT_BOTTOM" => Some(Self::Bottom),
175                "LEGEND_PLACEMENT_SIDE" => Some(Self::Side),
176                "LEGEND_PLACEMENT_HIDDEN" => Some(Self::Hidden),
177                _ => None,
178            }
179        }
180    }
181}
182#[derive(serde::Serialize, serde::Deserialize)]
183#[serde(rename_all = "snake_case")]
184#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
185#[repr(i32)]
186pub enum LegendBy {
187    Unspecified = 0,
188    Thresholds = 1,
189    Groups = 2,
190}
191impl LegendBy {
192    /// String value of the enum field names used in the ProtoBuf definition.
193    ///
194    /// The values are not transformed in any way and thus are considered stable
195    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
196    pub fn as_str_name(&self) -> &'static str {
197        match self {
198            Self::Unspecified => "LEGEND_BY_UNSPECIFIED",
199            Self::Thresholds => "LEGEND_BY_THRESHOLDS",
200            Self::Groups => "LEGEND_BY_GROUPS",
201        }
202    }
203    /// Creates an enum from field names used in the ProtoBuf definition.
204    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
205        match value {
206            "LEGEND_BY_UNSPECIFIED" => Some(Self::Unspecified),
207            "LEGEND_BY_THRESHOLDS" => Some(Self::Thresholds),
208            "LEGEND_BY_GROUPS" => Some(Self::Groups),
209            _ => None,
210        }
211    }
212}
213#[derive(serde::Serialize, serde::Deserialize)]
214#[serde(rename_all = "snake_case")]
215#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
216#[repr(i32)]
217pub enum Aggregation {
218    Unspecified = 0,
219    Last = 1,
220    Min = 2,
221    Max = 3,
222    Avg = 4,
223    Sum = 5,
224}
225impl Aggregation {
226    /// String value of the enum field names used in the ProtoBuf definition.
227    ///
228    /// The values are not transformed in any way and thus are considered stable
229    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
230    pub fn as_str_name(&self) -> &'static str {
231        match self {
232            Self::Unspecified => "AGGREGATION_UNSPECIFIED",
233            Self::Last => "AGGREGATION_LAST",
234            Self::Min => "AGGREGATION_MIN",
235            Self::Max => "AGGREGATION_MAX",
236            Self::Avg => "AGGREGATION_AVG",
237            Self::Sum => "AGGREGATION_SUM",
238        }
239    }
240    /// Creates an enum from field names used in the ProtoBuf definition.
241    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
242        match value {
243            "AGGREGATION_UNSPECIFIED" => Some(Self::Unspecified),
244            "AGGREGATION_LAST" => Some(Self::Last),
245            "AGGREGATION_MIN" => Some(Self::Min),
246            "AGGREGATION_MAX" => Some(Self::Max),
247            "AGGREGATION_AVG" => Some(Self::Avg),
248            "AGGREGATION_SUM" => Some(Self::Sum),
249            _ => None,
250        }
251    }
252}
253#[derive(serde::Serialize, serde::Deserialize)]
254#[serde(rename_all = "snake_case")]
255#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
256#[repr(i32)]
257pub enum MetricsQueryEditorMode {
258    Unspecified = 0,
259    Text = 1,
260    Builder = 2,
261}
262impl MetricsQueryEditorMode {
263    /// String value of the enum field names used in the ProtoBuf definition.
264    ///
265    /// The values are not transformed in any way and thus are considered stable
266    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
267    pub fn as_str_name(&self) -> &'static str {
268        match self {
269            Self::Unspecified => "METRICS_QUERY_EDITOR_MODE_UNSPECIFIED",
270            Self::Text => "METRICS_QUERY_EDITOR_MODE_TEXT",
271            Self::Builder => "METRICS_QUERY_EDITOR_MODE_BUILDER",
272        }
273    }
274    /// Creates an enum from field names used in the ProtoBuf definition.
275    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
276        match value {
277            "METRICS_QUERY_EDITOR_MODE_UNSPECIFIED" => Some(Self::Unspecified),
278            "METRICS_QUERY_EDITOR_MODE_TEXT" => Some(Self::Text),
279            "METRICS_QUERY_EDITOR_MODE_BUILDER" => Some(Self::Builder),
280            _ => None,
281        }
282    }
283}
284#[derive(serde::Serialize, serde::Deserialize)]
285#[serde(rename_all = "snake_case")]
286#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
287#[repr(i32)]
288pub enum ScaleType {
289    Unspecified = 0,
290    Linear = 1,
291    Logarithmic = 2,
292}
293impl ScaleType {
294    /// String value of the enum field names used in the ProtoBuf definition.
295    ///
296    /// The values are not transformed in any way and thus are considered stable
297    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
298    pub fn as_str_name(&self) -> &'static str {
299        match self {
300            Self::Unspecified => "SCALE_TYPE_UNSPECIFIED",
301            Self::Linear => "SCALE_TYPE_LINEAR",
302            Self::Logarithmic => "SCALE_TYPE_LOGARITHMIC",
303        }
304    }
305    /// Creates an enum from field names used in the ProtoBuf definition.
306    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
307        match value {
308            "SCALE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
309            "SCALE_TYPE_LINEAR" => Some(Self::Linear),
310            "SCALE_TYPE_LOGARITHMIC" => Some(Self::Logarithmic),
311            _ => None,
312        }
313    }
314}
315#[derive(serde::Serialize, serde::Deserialize)]
316#[serde(rename_all = "snake_case")]
317#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
318#[repr(i32)]
319pub enum SortByType {
320    Unspecified = 0,
321    Value = 1,
322    Name = 2,
323}
324impl SortByType {
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 => "SORT_BY_TYPE_UNSPECIFIED",
332            Self::Value => "SORT_BY_TYPE_VALUE",
333            Self::Name => "SORT_BY_TYPE_NAME",
334        }
335    }
336    /// Creates an enum from field names used in the ProtoBuf definition.
337    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
338        match value {
339            "SORT_BY_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
340            "SORT_BY_TYPE_VALUE" => Some(Self::Value),
341            "SORT_BY_TYPE_NAME" => Some(Self::Name),
342            _ => None,
343        }
344    }
345}
346#[derive(serde::Serialize, serde::Deserialize)]
347#[serde(rename_all = "snake_case")]
348#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
349#[repr(i32)]
350pub enum Unit {
351    Unspecified = 0,
352    Microseconds = 1,
353    Milliseconds = 2,
354    Seconds = 3,
355    Bytes = 4,
356    Kbytes = 5,
357    Mbytes = 6,
358    Gbytes = 7,
359    BytesIec = 8,
360    Kibytes = 9,
361    Mibytes = 10,
362    Gibytes = 11,
363    EurCents = 12,
364    Eur = 13,
365    UsdCents = 14,
366    Usd = 15,
367    Nanoseconds = 16,
368    Custom = 17,
369    PercentZeroOne = 18,
370    PercentZeroHundred = 19,
371    Percent = 20,
372}
373impl Unit {
374    /// String value of the enum field names used in the ProtoBuf definition.
375    ///
376    /// The values are not transformed in any way and thus are considered stable
377    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
378    pub fn as_str_name(&self) -> &'static str {
379        match self {
380            Self::Unspecified => "UNIT_UNSPECIFIED",
381            Self::Microseconds => "UNIT_MICROSECONDS",
382            Self::Milliseconds => "UNIT_MILLISECONDS",
383            Self::Seconds => "UNIT_SECONDS",
384            Self::Bytes => "UNIT_BYTES",
385            Self::Kbytes => "UNIT_KBYTES",
386            Self::Mbytes => "UNIT_MBYTES",
387            Self::Gbytes => "UNIT_GBYTES",
388            Self::BytesIec => "UNIT_BYTES_IEC",
389            Self::Kibytes => "UNIT_KIBYTES",
390            Self::Mibytes => "UNIT_MIBYTES",
391            Self::Gibytes => "UNIT_GIBYTES",
392            Self::EurCents => "UNIT_EUR_CENTS",
393            Self::Eur => "UNIT_EUR",
394            Self::UsdCents => "UNIT_USD_CENTS",
395            Self::Usd => "UNIT_USD",
396            Self::Nanoseconds => "UNIT_NANOSECONDS",
397            Self::Custom => "UNIT_CUSTOM",
398            Self::PercentZeroOne => "UNIT_PERCENT_ZERO_ONE",
399            Self::PercentZeroHundred => "UNIT_PERCENT_ZERO_HUNDRED",
400            Self::Percent => "UNIT_PERCENT",
401        }
402    }
403    /// Creates an enum from field names used in the ProtoBuf definition.
404    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
405        match value {
406            "UNIT_UNSPECIFIED" => Some(Self::Unspecified),
407            "UNIT_MICROSECONDS" => Some(Self::Microseconds),
408            "UNIT_MILLISECONDS" => Some(Self::Milliseconds),
409            "UNIT_SECONDS" => Some(Self::Seconds),
410            "UNIT_BYTES" => Some(Self::Bytes),
411            "UNIT_KBYTES" => Some(Self::Kbytes),
412            "UNIT_MBYTES" => Some(Self::Mbytes),
413            "UNIT_GBYTES" => Some(Self::Gbytes),
414            "UNIT_BYTES_IEC" => Some(Self::BytesIec),
415            "UNIT_KIBYTES" => Some(Self::Kibytes),
416            "UNIT_MIBYTES" => Some(Self::Mibytes),
417            "UNIT_GIBYTES" => Some(Self::Gibytes),
418            "UNIT_EUR_CENTS" => Some(Self::EurCents),
419            "UNIT_EUR" => Some(Self::Eur),
420            "UNIT_USD_CENTS" => Some(Self::UsdCents),
421            "UNIT_USD" => Some(Self::Usd),
422            "UNIT_NANOSECONDS" => Some(Self::Nanoseconds),
423            "UNIT_CUSTOM" => Some(Self::Custom),
424            "UNIT_PERCENT_ZERO_ONE" => Some(Self::PercentZeroOne),
425            "UNIT_PERCENT_ZERO_HUNDRED" => Some(Self::PercentZeroHundred),
426            "UNIT_PERCENT" => Some(Self::Percent),
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}