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