cx_api/generated/
com.coralogixapis.alerts.v3.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 NotifyOn {
7    TriggeredOnlyUnspecified = 0,
8    TriggeredAndResolved = 1,
9}
10impl NotifyOn {
11    /// String value of the enum field names used in the ProtoBuf definition.
12    ///
13    /// The values are not transformed in any way and thus are considered stable
14    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
15    pub fn as_str_name(&self) -> &'static str {
16        match self {
17            Self::TriggeredOnlyUnspecified => "NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED",
18            Self::TriggeredAndResolved => "NOTIFY_ON_TRIGGERED_AND_RESOLVED",
19        }
20    }
21    /// Creates an enum from field names used in the ProtoBuf definition.
22    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
23        match value {
24            "NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED" => {
25                Some(Self::TriggeredOnlyUnspecified)
26            }
27            "NOTIFY_ON_TRIGGERED_AND_RESOLVED" => Some(Self::TriggeredAndResolved),
28            _ => None,
29        }
30    }
31}
32#[derive(serde::Serialize, serde::Deserialize)]
33#[serde(rename_all = "snake_case")]
34#[derive(Clone, PartialEq, ::prost::Message)]
35pub struct NotificationDestination {
36    #[prost(string, tag = "1")]
37    pub connector_id: ::prost::alloc::string::String,
38    #[prost(string, optional, tag = "2")]
39    pub preset_id: ::core::option::Option<::prost::alloc::string::String>,
40    #[prost(enumeration = "NotifyOn", tag = "3")]
41    pub notify_on: i32,
42    #[prost(message, optional, tag = "4")]
43    pub triggered_routing_overrides: ::core::option::Option<NotificationRouting>,
44    #[prost(message, optional, tag = "5")]
45    pub resolved_route_overrides: ::core::option::Option<NotificationRouting>,
46}
47#[derive(serde::Serialize, serde::Deserialize)]
48#[serde(rename_all = "snake_case")]
49#[derive(Clone, PartialEq, ::prost::Message)]
50pub struct NotificationRouting {
51    #[prost(message, optional, tag = "1")]
52    pub config_overrides: ::core::option::Option<SourceOverrides>,
53}
54#[derive(serde::Serialize, serde::Deserialize)]
55#[serde(rename_all = "snake_case")]
56#[derive(Clone, PartialEq, ::prost::Message)]
57pub struct SourceOverrides {
58    #[prost(string, tag = "1")]
59    pub output_schema_id: ::prost::alloc::string::String,
60    #[prost(message, repeated, tag = "2")]
61    pub message_config_fields: ::prost::alloc::vec::Vec<MessageConfigField>,
62    #[prost(message, repeated, tag = "3")]
63    pub connector_config_fields: ::prost::alloc::vec::Vec<ConnectorConfigField>,
64}
65#[derive(serde::Serialize, serde::Deserialize)]
66#[serde(rename_all = "snake_case")]
67#[derive(Clone, PartialEq, ::prost::Message)]
68pub struct ConnectorConfigField {
69    #[prost(string, tag = "1")]
70    pub field_name: ::prost::alloc::string::String,
71    #[prost(string, tag = "2")]
72    pub template: ::prost::alloc::string::String,
73}
74#[derive(serde::Serialize, serde::Deserialize)]
75#[serde(rename_all = "snake_case")]
76#[derive(Clone, PartialEq, ::prost::Message)]
77pub struct MessageConfigField {
78    #[prost(string, tag = "1")]
79    pub field_name: ::prost::alloc::string::String,
80    #[prost(string, tag = "2")]
81    pub template: ::prost::alloc::string::String,
82}
83#[derive(serde::Serialize, serde::Deserialize)]
84#[serde(rename_all = "snake_case")]
85#[derive(Clone, PartialEq, ::prost::Message)]
86pub struct NotificationRouter {
87    #[prost(string, tag = "1")]
88    pub id: ::prost::alloc::string::String,
89    #[prost(enumeration = "NotifyOn", optional, tag = "2")]
90    pub notify_on: ::core::option::Option<i32>,
91}
92#[derive(serde::Serialize, serde::Deserialize)]
93#[serde(rename_all = "snake_case")]
94#[derive(Clone, Copy, PartialEq, ::prost::Message)]
95pub struct AlertDefIncidentSettings {
96    #[prost(enumeration = "NotifyOn", tag = "2")]
97    pub notify_on: i32,
98    #[prost(oneof = "alert_def_incident_settings::RetriggeringPeriod", tags = "100")]
99    pub retriggering_period: ::core::option::Option<
100        alert_def_incident_settings::RetriggeringPeriod,
101    >,
102}
103/// Nested message and enum types in `AlertDefIncidentSettings`.
104pub mod alert_def_incident_settings {
105    #[derive(serde::Serialize, serde::Deserialize)]
106    #[serde(rename_all = "snake_case")]
107    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
108    pub enum RetriggeringPeriod {
109        #[prost(message, tag = "100")]
110        Minutes(u32),
111    }
112}
113#[derive(serde::Serialize, serde::Deserialize)]
114#[serde(rename_all = "snake_case")]
115#[derive(Clone, PartialEq, ::prost::Message)]
116pub struct AlertDefNotificationGroup {
117    #[prost(message, repeated, tag = "1")]
118    pub group_by_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
119    #[prost(message, repeated, tag = "2")]
120    pub webhooks: ::prost::alloc::vec::Vec<AlertDefWebhooksSettings>,
121    #[prost(message, repeated, tag = "3")]
122    pub destinations: ::prost::alloc::vec::Vec<NotificationDestination>,
123    #[prost(message, optional, tag = "4")]
124    pub router: ::core::option::Option<NotificationRouter>,
125}
126#[derive(serde::Serialize, serde::Deserialize)]
127#[serde(rename_all = "snake_case")]
128#[derive(Clone, PartialEq, ::prost::Message)]
129pub struct AlertDefWebhooksSettings {
130    #[prost(enumeration = "NotifyOn", optional, tag = "1")]
131    pub notify_on: ::core::option::Option<i32>,
132    #[prost(message, optional, tag = "2")]
133    pub integration: ::core::option::Option<IntegrationType>,
134    #[prost(oneof = "alert_def_webhooks_settings::RetriggeringPeriod", tags = "100")]
135    pub retriggering_period: ::core::option::Option<
136        alert_def_webhooks_settings::RetriggeringPeriod,
137    >,
138}
139/// Nested message and enum types in `AlertDefWebhooksSettings`.
140pub mod alert_def_webhooks_settings {
141    #[derive(serde::Serialize, serde::Deserialize)]
142    #[serde(rename_all = "snake_case")]
143    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
144    pub enum RetriggeringPeriod {
145        #[prost(message, tag = "100")]
146        Minutes(u32),
147    }
148}
149#[derive(serde::Serialize, serde::Deserialize)]
150#[serde(rename_all = "snake_case")]
151#[derive(Clone, PartialEq, ::prost::Message)]
152pub struct IntegrationType {
153    #[prost(oneof = "integration_type::IntegrationType", tags = "2, 3")]
154    pub integration_type: ::core::option::Option<integration_type::IntegrationType>,
155}
156/// Nested message and enum types in `IntegrationType`.
157pub mod integration_type {
158    #[derive(serde::Serialize, serde::Deserialize)]
159    #[serde(rename_all = "snake_case")]
160    #[derive(Clone, PartialEq, ::prost::Oneof)]
161    pub enum IntegrationType {
162        #[prost(message, tag = "2")]
163        IntegrationId(u32),
164        #[prost(message, tag = "3")]
165        Recipients(super::Recipients),
166    }
167}
168#[derive(serde::Serialize, serde::Deserialize)]
169#[serde(rename_all = "snake_case")]
170#[derive(Clone, PartialEq, ::prost::Message)]
171pub struct Recipients {
172    #[prost(message, repeated, tag = "1")]
173    pub emails: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
174}
175#[derive(serde::Serialize, serde::Deserialize)]
176#[serde(rename_all = "snake_case")]
177#[derive(Clone, PartialEq, ::prost::Message)]
178pub struct Priority {
179    #[prost(enumeration = "AlertDefPriority", tag = "1")]
180    pub value: i32,
181    #[prost(message, optional, tag = "2")]
182    pub name: ::core::option::Option<::prost::alloc::string::String>,
183}
184#[derive(serde::Serialize, serde::Deserialize)]
185#[serde(rename_all = "snake_case")]
186#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
187#[repr(i32)]
188pub enum AlertDefPriority {
189    P5OrUnspecified = 0,
190    P4 = 1,
191    P3 = 2,
192    P2 = 3,
193    P1 = 4,
194}
195impl AlertDefPriority {
196    /// String value of the enum field names used in the ProtoBuf definition.
197    ///
198    /// The values are not transformed in any way and thus are considered stable
199    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
200    pub fn as_str_name(&self) -> &'static str {
201        match self {
202            Self::P5OrUnspecified => "ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED",
203            Self::P4 => "ALERT_DEF_PRIORITY_P4",
204            Self::P3 => "ALERT_DEF_PRIORITY_P3",
205            Self::P2 => "ALERT_DEF_PRIORITY_P2",
206            Self::P1 => "ALERT_DEF_PRIORITY_P1",
207        }
208    }
209    /// Creates an enum from field names used in the ProtoBuf definition.
210    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
211        match value {
212            "ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED" => Some(Self::P5OrUnspecified),
213            "ALERT_DEF_PRIORITY_P4" => Some(Self::P4),
214            "ALERT_DEF_PRIORITY_P3" => Some(Self::P3),
215            "ALERT_DEF_PRIORITY_P2" => Some(Self::P2),
216            "ALERT_DEF_PRIORITY_P1" => Some(Self::P1),
217            _ => None,
218        }
219    }
220}
221#[derive(serde::Serialize, serde::Deserialize)]
222#[serde(rename_all = "snake_case")]
223#[derive(Clone, PartialEq, ::prost::Message)]
224pub struct ActivitySchedule {
225    #[prost(enumeration = "DayOfWeek", repeated, packed = "false", tag = "1")]
226    pub day_of_week: ::prost::alloc::vec::Vec<i32>,
227    #[prost(message, optional, tag = "2")]
228    pub start_time: ::core::option::Option<TimeOfDay>,
229    #[prost(message, optional, tag = "3")]
230    pub end_time: ::core::option::Option<TimeOfDay>,
231}
232#[derive(serde::Serialize, serde::Deserialize)]
233#[serde(rename_all = "snake_case")]
234#[derive(Clone, Copy, PartialEq, ::prost::Message)]
235pub struct TimeOfDay {
236    /// Hours of day in 24 hour format. Should be from 0 to 23.
237    #[prost(int32, tag = "1")]
238    pub hours: i32,
239    /// Minutes of hour of day. Must be from 0 to 59.
240    #[prost(int32, tag = "2")]
241    pub minutes: i32,
242}
243#[derive(serde::Serialize, serde::Deserialize)]
244#[serde(rename_all = "snake_case")]
245#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
246#[repr(i32)]
247pub enum DayOfWeek {
248    MondayOrUnspecified = 0,
249    Tuesday = 1,
250    Wednesday = 2,
251    Thursday = 3,
252    Friday = 4,
253    Saturday = 5,
254    Sunday = 6,
255}
256impl DayOfWeek {
257    /// String value of the enum field names used in the ProtoBuf definition.
258    ///
259    /// The values are not transformed in any way and thus are considered stable
260    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
261    pub fn as_str_name(&self) -> &'static str {
262        match self {
263            Self::MondayOrUnspecified => "DAY_OF_WEEK_MONDAY_OR_UNSPECIFIED",
264            Self::Tuesday => "DAY_OF_WEEK_TUESDAY",
265            Self::Wednesday => "DAY_OF_WEEK_WEDNESDAY",
266            Self::Thursday => "DAY_OF_WEEK_THURSDAY",
267            Self::Friday => "DAY_OF_WEEK_FRIDAY",
268            Self::Saturday => "DAY_OF_WEEK_SATURDAY",
269            Self::Sunday => "DAY_OF_WEEK_SUNDAY",
270        }
271    }
272    /// Creates an enum from field names used in the ProtoBuf definition.
273    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
274        match value {
275            "DAY_OF_WEEK_MONDAY_OR_UNSPECIFIED" => Some(Self::MondayOrUnspecified),
276            "DAY_OF_WEEK_TUESDAY" => Some(Self::Tuesday),
277            "DAY_OF_WEEK_WEDNESDAY" => Some(Self::Wednesday),
278            "DAY_OF_WEEK_THURSDAY" => Some(Self::Thursday),
279            "DAY_OF_WEEK_FRIDAY" => Some(Self::Friday),
280            "DAY_OF_WEEK_SATURDAY" => Some(Self::Saturday),
281            "DAY_OF_WEEK_SUNDAY" => Some(Self::Sunday),
282            _ => None,
283        }
284    }
285}
286#[derive(serde::Serialize, serde::Deserialize)]
287#[serde(rename_all = "snake_case")]
288#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
289#[repr(i32)]
290pub enum AlertDefType {
291    LogsImmediateOrUnspecified = 0,
292    LogsThreshold = 1,
293    LogsAnomaly = 3,
294    LogsRatioThreshold = 4,
295    LogsNewValue = 6,
296    LogsUniqueCount = 7,
297    LogsTimeRelativeThreshold = 8,
298    MetricThreshold = 10,
299    MetricAnomaly = 14,
300    TracingImmediate = 15,
301    TracingThreshold = 16,
302    Flow = 17,
303}
304impl AlertDefType {
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::LogsImmediateOrUnspecified => {
312                "ALERT_DEF_TYPE_LOGS_IMMEDIATE_OR_UNSPECIFIED"
313            }
314            Self::LogsThreshold => "ALERT_DEF_TYPE_LOGS_THRESHOLD",
315            Self::LogsAnomaly => "ALERT_DEF_TYPE_LOGS_ANOMALY",
316            Self::LogsRatioThreshold => "ALERT_DEF_TYPE_LOGS_RATIO_THRESHOLD",
317            Self::LogsNewValue => "ALERT_DEF_TYPE_LOGS_NEW_VALUE",
318            Self::LogsUniqueCount => "ALERT_DEF_TYPE_LOGS_UNIQUE_COUNT",
319            Self::LogsTimeRelativeThreshold => {
320                "ALERT_DEF_TYPE_LOGS_TIME_RELATIVE_THRESHOLD"
321            }
322            Self::MetricThreshold => "ALERT_DEF_TYPE_METRIC_THRESHOLD",
323            Self::MetricAnomaly => "ALERT_DEF_TYPE_METRIC_ANOMALY",
324            Self::TracingImmediate => "ALERT_DEF_TYPE_TRACING_IMMEDIATE",
325            Self::TracingThreshold => "ALERT_DEF_TYPE_TRACING_THRESHOLD",
326            Self::Flow => "ALERT_DEF_TYPE_FLOW",
327        }
328    }
329    /// Creates an enum from field names used in the ProtoBuf definition.
330    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
331        match value {
332            "ALERT_DEF_TYPE_LOGS_IMMEDIATE_OR_UNSPECIFIED" => {
333                Some(Self::LogsImmediateOrUnspecified)
334            }
335            "ALERT_DEF_TYPE_LOGS_THRESHOLD" => Some(Self::LogsThreshold),
336            "ALERT_DEF_TYPE_LOGS_ANOMALY" => Some(Self::LogsAnomaly),
337            "ALERT_DEF_TYPE_LOGS_RATIO_THRESHOLD" => Some(Self::LogsRatioThreshold),
338            "ALERT_DEF_TYPE_LOGS_NEW_VALUE" => Some(Self::LogsNewValue),
339            "ALERT_DEF_TYPE_LOGS_UNIQUE_COUNT" => Some(Self::LogsUniqueCount),
340            "ALERT_DEF_TYPE_LOGS_TIME_RELATIVE_THRESHOLD" => {
341                Some(Self::LogsTimeRelativeThreshold)
342            }
343            "ALERT_DEF_TYPE_METRIC_THRESHOLD" => Some(Self::MetricThreshold),
344            "ALERT_DEF_TYPE_METRIC_ANOMALY" => Some(Self::MetricAnomaly),
345            "ALERT_DEF_TYPE_TRACING_IMMEDIATE" => Some(Self::TracingImmediate),
346            "ALERT_DEF_TYPE_TRACING_THRESHOLD" => Some(Self::TracingThreshold),
347            "ALERT_DEF_TYPE_FLOW" => Some(Self::Flow),
348            _ => None,
349        }
350    }
351}
352#[derive(serde::Serialize, serde::Deserialize)]
353#[serde(rename_all = "snake_case")]
354#[derive(Clone, PartialEq, ::prost::Message)]
355pub struct FlowType {
356    #[prost(message, repeated, tag = "1")]
357    pub stages: ::prost::alloc::vec::Vec<FlowStages>,
358    #[prost(message, optional, tag = "2")]
359    pub enforce_suppression: ::core::option::Option<bool>,
360}
361#[derive(serde::Serialize, serde::Deserialize)]
362#[serde(rename_all = "snake_case")]
363#[derive(Clone, PartialEq, ::prost::Message)]
364pub struct FlowStages {
365    #[prost(message, optional, tag = "3")]
366    pub timeframe_ms: ::core::option::Option<i64>,
367    #[prost(enumeration = "TimeframeType", tag = "4")]
368    pub timeframe_type: i32,
369    #[prost(oneof = "flow_stages::FlowStages", tags = "10")]
370    pub flow_stages: ::core::option::Option<flow_stages::FlowStages>,
371}
372/// Nested message and enum types in `FlowStages`.
373pub mod flow_stages {
374    #[derive(serde::Serialize, serde::Deserialize)]
375    #[serde(rename_all = "snake_case")]
376    #[derive(Clone, PartialEq, ::prost::Oneof)]
377    pub enum FlowStages {
378        #[prost(message, tag = "10")]
379        FlowStagesGroups(super::FlowStagesGroups),
380    }
381}
382#[derive(serde::Serialize, serde::Deserialize)]
383#[serde(rename_all = "snake_case")]
384#[derive(Clone, PartialEq, ::prost::Message)]
385pub struct FlowStagesGroups {
386    #[prost(message, repeated, tag = "1")]
387    pub groups: ::prost::alloc::vec::Vec<FlowStagesGroup>,
388}
389#[derive(serde::Serialize, serde::Deserialize)]
390#[serde(rename_all = "snake_case")]
391#[derive(Clone, PartialEq, ::prost::Message)]
392pub struct FlowStagesGroup {
393    #[prost(message, repeated, tag = "1")]
394    pub alert_defs: ::prost::alloc::vec::Vec<FlowStagesGroupsAlertDefs>,
395    #[prost(enumeration = "NextOp", tag = "2")]
396    pub next_op: i32,
397    #[prost(enumeration = "AlertsOp", tag = "3")]
398    pub alerts_op: i32,
399}
400#[derive(serde::Serialize, serde::Deserialize)]
401#[serde(rename_all = "snake_case")]
402#[derive(Clone, PartialEq, ::prost::Message)]
403pub struct FlowStagesGroupsAlertDefs {
404    #[prost(message, optional, tag = "1")]
405    pub id: ::core::option::Option<::prost::alloc::string::String>,
406    #[prost(message, optional, tag = "2")]
407    pub not: ::core::option::Option<bool>,
408}
409#[derive(serde::Serialize, serde::Deserialize)]
410#[serde(rename_all = "snake_case")]
411#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
412#[repr(i32)]
413pub enum NextOp {
414    AndOrUnspecified = 0,
415    Or = 1,
416}
417impl NextOp {
418    /// String value of the enum field names used in the ProtoBuf definition.
419    ///
420    /// The values are not transformed in any way and thus are considered stable
421    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
422    pub fn as_str_name(&self) -> &'static str {
423        match self {
424            Self::AndOrUnspecified => "NEXT_OP_AND_OR_UNSPECIFIED",
425            Self::Or => "NEXT_OP_OR",
426        }
427    }
428    /// Creates an enum from field names used in the ProtoBuf definition.
429    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
430        match value {
431            "NEXT_OP_AND_OR_UNSPECIFIED" => Some(Self::AndOrUnspecified),
432            "NEXT_OP_OR" => Some(Self::Or),
433            _ => None,
434        }
435    }
436}
437#[derive(serde::Serialize, serde::Deserialize)]
438#[serde(rename_all = "snake_case")]
439#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
440#[repr(i32)]
441pub enum AlertsOp {
442    AndOrUnspecified = 0,
443    Or = 1,
444}
445impl AlertsOp {
446    /// String value of the enum field names used in the ProtoBuf definition.
447    ///
448    /// The values are not transformed in any way and thus are considered stable
449    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
450    pub fn as_str_name(&self) -> &'static str {
451        match self {
452            Self::AndOrUnspecified => "ALERTS_OP_AND_OR_UNSPECIFIED",
453            Self::Or => "ALERTS_OP_OR",
454        }
455    }
456    /// Creates an enum from field names used in the ProtoBuf definition.
457    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
458        match value {
459            "ALERTS_OP_AND_OR_UNSPECIFIED" => Some(Self::AndOrUnspecified),
460            "ALERTS_OP_OR" => Some(Self::Or),
461            _ => None,
462        }
463    }
464}
465#[derive(serde::Serialize, serde::Deserialize)]
466#[serde(rename_all = "snake_case")]
467#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
468#[repr(i32)]
469pub enum TimeframeType {
470    Unspecified = 0,
471    UpTo = 1,
472}
473impl TimeframeType {
474    /// String value of the enum field names used in the ProtoBuf definition.
475    ///
476    /// The values are not transformed in any way and thus are considered stable
477    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
478    pub fn as_str_name(&self) -> &'static str {
479        match self {
480            Self::Unspecified => "TIMEFRAME_TYPE_UNSPECIFIED",
481            Self::UpTo => "TIMEFRAME_TYPE_UP_TO",
482        }
483    }
484    /// Creates an enum from field names used in the ProtoBuf definition.
485    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
486        match value {
487            "TIMEFRAME_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
488            "TIMEFRAME_TYPE_UP_TO" => Some(Self::UpTo),
489            _ => None,
490        }
491    }
492}
493#[derive(serde::Serialize, serde::Deserialize)]
494#[serde(rename_all = "snake_case")]
495#[derive(Clone, Copy, PartialEq, ::prost::Message)]
496pub struct AnomalyAlertSettings {
497    #[prost(message, optional, tag = "1")]
498    pub percentage_of_deviation: ::core::option::Option<f32>,
499}
500#[derive(serde::Serialize, serde::Deserialize)]
501#[serde(rename_all = "snake_case")]
502#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
503#[repr(i32)]
504pub enum LogsAnomalyConditionType {
505    MoreThanUsualOrUnspecified = 0,
506}
507impl LogsAnomalyConditionType {
508    /// String value of the enum field names used in the ProtoBuf definition.
509    ///
510    /// The values are not transformed in any way and thus are considered stable
511    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
512    pub fn as_str_name(&self) -> &'static str {
513        match self {
514            Self::MoreThanUsualOrUnspecified => {
515                "LOGS_ANOMALY_CONDITION_TYPE_MORE_THAN_USUAL_OR_UNSPECIFIED"
516            }
517        }
518    }
519    /// Creates an enum from field names used in the ProtoBuf definition.
520    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
521        match value {
522            "LOGS_ANOMALY_CONDITION_TYPE_MORE_THAN_USUAL_OR_UNSPECIFIED" => {
523                Some(Self::MoreThanUsualOrUnspecified)
524            }
525            _ => None,
526        }
527    }
528}
529#[derive(serde::Serialize, serde::Deserialize)]
530#[serde(rename_all = "snake_case")]
531#[derive(Clone, PartialEq, ::prost::Message)]
532pub struct LogsFilter {
533    #[prost(oneof = "logs_filter::FilterType", tags = "1")]
534    pub filter_type: ::core::option::Option<logs_filter::FilterType>,
535}
536/// Nested message and enum types in `LogsFilter`.
537pub mod logs_filter {
538    #[derive(serde::Serialize, serde::Deserialize)]
539    #[serde(rename_all = "snake_case")]
540    #[derive(Clone, PartialEq, ::prost::Oneof)]
541    pub enum FilterType {
542        #[prost(message, tag = "1")]
543        SimpleFilter(super::LogsSimpleFilter),
544    }
545}
546#[derive(serde::Serialize, serde::Deserialize)]
547#[serde(rename_all = "snake_case")]
548#[derive(Clone, PartialEq, ::prost::Message)]
549pub struct LogsSimpleFilter {
550    #[prost(message, optional, tag = "1")]
551    pub lucene_query: ::core::option::Option<::prost::alloc::string::String>,
552    #[prost(message, optional, tag = "2")]
553    pub label_filters: ::core::option::Option<LabelFilters>,
554}
555#[derive(serde::Serialize, serde::Deserialize)]
556#[serde(rename_all = "snake_case")]
557#[derive(Clone, PartialEq, ::prost::Message)]
558pub struct LabelFilters {
559    #[prost(message, repeated, tag = "1")]
560    pub application_name: ::prost::alloc::vec::Vec<LabelFilterType>,
561    #[prost(message, repeated, tag = "2")]
562    pub subsystem_name: ::prost::alloc::vec::Vec<LabelFilterType>,
563    #[prost(enumeration = "LogSeverity", repeated, tag = "3")]
564    pub severities: ::prost::alloc::vec::Vec<i32>,
565}
566#[derive(serde::Serialize, serde::Deserialize)]
567#[serde(rename_all = "snake_case")]
568#[derive(Clone, PartialEq, ::prost::Message)]
569pub struct LabelFilterType {
570    #[prost(message, optional, tag = "1")]
571    pub value: ::core::option::Option<::prost::alloc::string::String>,
572    #[prost(enumeration = "LogFilterOperationType", tag = "2")]
573    pub operation: i32,
574}
575#[derive(serde::Serialize, serde::Deserialize)]
576#[serde(rename_all = "snake_case")]
577#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
578#[repr(i32)]
579pub enum LogFilterOperationType {
580    IsOrUnspecified = 0,
581    Includes = 1,
582    EndsWith = 2,
583    StartsWith = 3,
584}
585impl LogFilterOperationType {
586    /// String value of the enum field names used in the ProtoBuf definition.
587    ///
588    /// The values are not transformed in any way and thus are considered stable
589    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
590    pub fn as_str_name(&self) -> &'static str {
591        match self {
592            Self::IsOrUnspecified => "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED",
593            Self::Includes => "LOG_FILTER_OPERATION_TYPE_INCLUDES",
594            Self::EndsWith => "LOG_FILTER_OPERATION_TYPE_ENDS_WITH",
595            Self::StartsWith => "LOG_FILTER_OPERATION_TYPE_STARTS_WITH",
596        }
597    }
598    /// Creates an enum from field names used in the ProtoBuf definition.
599    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
600        match value {
601            "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED" => Some(Self::IsOrUnspecified),
602            "LOG_FILTER_OPERATION_TYPE_INCLUDES" => Some(Self::Includes),
603            "LOG_FILTER_OPERATION_TYPE_ENDS_WITH" => Some(Self::EndsWith),
604            "LOG_FILTER_OPERATION_TYPE_STARTS_WITH" => Some(Self::StartsWith),
605            _ => None,
606        }
607    }
608}
609#[derive(serde::Serialize, serde::Deserialize)]
610#[serde(rename_all = "snake_case")]
611#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
612#[repr(i32)]
613pub enum LogSeverity {
614    VerboseUnspecified = 0,
615    Debug = 1,
616    Info = 2,
617    Warning = 3,
618    Error = 4,
619    Critical = 5,
620}
621impl LogSeverity {
622    /// String value of the enum field names used in the ProtoBuf definition.
623    ///
624    /// The values are not transformed in any way and thus are considered stable
625    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
626    pub fn as_str_name(&self) -> &'static str {
627        match self {
628            Self::VerboseUnspecified => "LOG_SEVERITY_VERBOSE_UNSPECIFIED",
629            Self::Debug => "LOG_SEVERITY_DEBUG",
630            Self::Info => "LOG_SEVERITY_INFO",
631            Self::Warning => "LOG_SEVERITY_WARNING",
632            Self::Error => "LOG_SEVERITY_ERROR",
633            Self::Critical => "LOG_SEVERITY_CRITICAL",
634        }
635    }
636    /// Creates an enum from field names used in the ProtoBuf definition.
637    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
638        match value {
639            "LOG_SEVERITY_VERBOSE_UNSPECIFIED" => Some(Self::VerboseUnspecified),
640            "LOG_SEVERITY_DEBUG" => Some(Self::Debug),
641            "LOG_SEVERITY_INFO" => Some(Self::Info),
642            "LOG_SEVERITY_WARNING" => Some(Self::Warning),
643            "LOG_SEVERITY_ERROR" => Some(Self::Error),
644            "LOG_SEVERITY_CRITICAL" => Some(Self::Critical),
645            _ => None,
646        }
647    }
648}
649#[derive(serde::Serialize, serde::Deserialize)]
650#[serde(rename_all = "snake_case")]
651#[derive(Clone, Copy, PartialEq, ::prost::Message)]
652pub struct LogsTimeWindow {
653    #[prost(oneof = "logs_time_window::Type", tags = "1")]
654    pub r#type: ::core::option::Option<logs_time_window::Type>,
655}
656/// Nested message and enum types in `LogsTimeWindow`.
657pub mod logs_time_window {
658    #[derive(serde::Serialize, serde::Deserialize)]
659    #[serde(rename_all = "snake_case")]
660    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
661    pub enum Type {
662        #[prost(enumeration = "super::LogsTimeWindowValue", tag = "1")]
663        LogsTimeWindowSpecificValue(i32),
664    }
665}
666#[derive(serde::Serialize, serde::Deserialize)]
667#[serde(rename_all = "snake_case")]
668#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
669#[repr(i32)]
670pub enum LogsTimeWindowValue {
671    Minutes5OrUnspecified = 0,
672    Minutes10 = 1,
673    Minutes20 = 2,
674    Minutes15 = 3,
675    Minutes30 = 4,
676    Hour1 = 5,
677    Hours2 = 6,
678    Hours4 = 7,
679    Hours6 = 8,
680    Hours12 = 9,
681    Hours24 = 10,
682    Hours36 = 11,
683}
684impl LogsTimeWindowValue {
685    /// String value of the enum field names used in the ProtoBuf definition.
686    ///
687    /// The values are not transformed in any way and thus are considered stable
688    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
689    pub fn as_str_name(&self) -> &'static str {
690        match self {
691            Self::Minutes5OrUnspecified => {
692                "LOGS_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED"
693            }
694            Self::Minutes10 => "LOGS_TIME_WINDOW_VALUE_MINUTES_10",
695            Self::Minutes20 => "LOGS_TIME_WINDOW_VALUE_MINUTES_20",
696            Self::Minutes15 => "LOGS_TIME_WINDOW_VALUE_MINUTES_15",
697            Self::Minutes30 => "LOGS_TIME_WINDOW_VALUE_MINUTES_30",
698            Self::Hour1 => "LOGS_TIME_WINDOW_VALUE_HOUR_1",
699            Self::Hours2 => "LOGS_TIME_WINDOW_VALUE_HOURS_2",
700            Self::Hours4 => "LOGS_TIME_WINDOW_VALUE_HOURS_4",
701            Self::Hours6 => "LOGS_TIME_WINDOW_VALUE_HOURS_6",
702            Self::Hours12 => "LOGS_TIME_WINDOW_VALUE_HOURS_12",
703            Self::Hours24 => "LOGS_TIME_WINDOW_VALUE_HOURS_24",
704            Self::Hours36 => "LOGS_TIME_WINDOW_VALUE_HOURS_36",
705        }
706    }
707    /// Creates an enum from field names used in the ProtoBuf definition.
708    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
709        match value {
710            "LOGS_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED" => {
711                Some(Self::Minutes5OrUnspecified)
712            }
713            "LOGS_TIME_WINDOW_VALUE_MINUTES_10" => Some(Self::Minutes10),
714            "LOGS_TIME_WINDOW_VALUE_MINUTES_20" => Some(Self::Minutes20),
715            "LOGS_TIME_WINDOW_VALUE_MINUTES_15" => Some(Self::Minutes15),
716            "LOGS_TIME_WINDOW_VALUE_MINUTES_30" => Some(Self::Minutes30),
717            "LOGS_TIME_WINDOW_VALUE_HOUR_1" => Some(Self::Hour1),
718            "LOGS_TIME_WINDOW_VALUE_HOURS_2" => Some(Self::Hours2),
719            "LOGS_TIME_WINDOW_VALUE_HOURS_4" => Some(Self::Hours4),
720            "LOGS_TIME_WINDOW_VALUE_HOURS_6" => Some(Self::Hours6),
721            "LOGS_TIME_WINDOW_VALUE_HOURS_12" => Some(Self::Hours12),
722            "LOGS_TIME_WINDOW_VALUE_HOURS_24" => Some(Self::Hours24),
723            "LOGS_TIME_WINDOW_VALUE_HOURS_36" => Some(Self::Hours36),
724            _ => None,
725        }
726    }
727}
728#[derive(serde::Serialize, serde::Deserialize)]
729#[serde(rename_all = "snake_case")]
730#[derive(Clone, PartialEq, ::prost::Message)]
731pub struct LogsAnomalyType {
732    #[prost(message, optional, tag = "1")]
733    pub logs_filter: ::core::option::Option<LogsFilter>,
734    #[prost(message, repeated, tag = "2")]
735    pub rules: ::prost::alloc::vec::Vec<LogsAnomalyRule>,
736    #[prost(message, repeated, tag = "3")]
737    pub notification_payload_filter: ::prost::alloc::vec::Vec<
738        ::prost::alloc::string::String,
739    >,
740    #[prost(message, optional, tag = "4")]
741    pub evaluation_delay_ms: ::core::option::Option<i32>,
742    #[prost(message, optional, tag = "5")]
743    pub anomaly_alert_settings: ::core::option::Option<AnomalyAlertSettings>,
744}
745#[derive(serde::Serialize, serde::Deserialize)]
746#[serde(rename_all = "snake_case")]
747#[derive(Clone, Copy, PartialEq, ::prost::Message)]
748pub struct LogsAnomalyRule {
749    #[prost(message, optional, tag = "1")]
750    pub condition: ::core::option::Option<LogsAnomalyCondition>,
751}
752#[derive(serde::Serialize, serde::Deserialize)]
753#[serde(rename_all = "snake_case")]
754#[derive(Clone, Copy, PartialEq, ::prost::Message)]
755pub struct LogsAnomalyCondition {
756    #[prost(message, optional, tag = "1")]
757    pub minimum_threshold: ::core::option::Option<f64>,
758    #[prost(message, optional, tag = "2")]
759    pub time_window: ::core::option::Option<LogsTimeWindow>,
760    #[prost(enumeration = "LogsAnomalyConditionType", tag = "3")]
761    pub condition_type: i32,
762}
763#[derive(serde::Serialize, serde::Deserialize)]
764#[serde(rename_all = "snake_case")]
765#[derive(Clone, PartialEq, ::prost::Message)]
766pub struct LogsImmediateType {
767    #[prost(message, optional, tag = "1")]
768    pub logs_filter: ::core::option::Option<LogsFilter>,
769    #[prost(message, repeated, tag = "2")]
770    pub notification_payload_filter: ::prost::alloc::vec::Vec<
771        ::prost::alloc::string::String,
772    >,
773}
774#[derive(serde::Serialize, serde::Deserialize)]
775#[serde(rename_all = "snake_case")]
776#[derive(Clone, Copy, PartialEq, ::prost::Message)]
777pub struct LogsNewValueTimeWindow {
778    #[prost(oneof = "logs_new_value_time_window::Type", tags = "1")]
779    pub r#type: ::core::option::Option<logs_new_value_time_window::Type>,
780}
781/// Nested message and enum types in `LogsNewValueTimeWindow`.
782pub mod logs_new_value_time_window {
783    #[derive(serde::Serialize, serde::Deserialize)]
784    #[serde(rename_all = "snake_case")]
785    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
786    pub enum Type {
787        #[prost(enumeration = "super::LogsNewValueTimeWindowValue", tag = "1")]
788        LogsNewValueTimeWindowSpecificValue(i32),
789    }
790}
791#[derive(serde::Serialize, serde::Deserialize)]
792#[serde(rename_all = "snake_case")]
793#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
794#[repr(i32)]
795pub enum LogsNewValueTimeWindowValue {
796    Hours12OrUnspecified = 0,
797    Hours24 = 1,
798    Hours48 = 2,
799    Hours72 = 3,
800    Week1 = 4,
801    Month1 = 5,
802    Months2 = 6,
803    Months3 = 7,
804}
805impl LogsNewValueTimeWindowValue {
806    /// String value of the enum field names used in the ProtoBuf definition.
807    ///
808    /// The values are not transformed in any way and thus are considered stable
809    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
810    pub fn as_str_name(&self) -> &'static str {
811        match self {
812            Self::Hours12OrUnspecified => {
813                "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_12_OR_UNSPECIFIED"
814            }
815            Self::Hours24 => "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_24",
816            Self::Hours48 => "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_48",
817            Self::Hours72 => "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_72",
818            Self::Week1 => "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_WEEK_1",
819            Self::Month1 => "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_MONTH_1",
820            Self::Months2 => "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_MONTHS_2",
821            Self::Months3 => "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_MONTHS_3",
822        }
823    }
824    /// Creates an enum from field names used in the ProtoBuf definition.
825    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
826        match value {
827            "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_12_OR_UNSPECIFIED" => {
828                Some(Self::Hours12OrUnspecified)
829            }
830            "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_24" => Some(Self::Hours24),
831            "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_48" => Some(Self::Hours48),
832            "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_72" => Some(Self::Hours72),
833            "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_WEEK_1" => Some(Self::Week1),
834            "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_MONTH_1" => Some(Self::Month1),
835            "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_MONTHS_2" => Some(Self::Months2),
836            "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_MONTHS_3" => Some(Self::Months3),
837            _ => None,
838        }
839    }
840}
841#[derive(serde::Serialize, serde::Deserialize)]
842#[serde(rename_all = "snake_case")]
843#[derive(Clone, PartialEq, ::prost::Message)]
844pub struct LogsNewValueType {
845    #[prost(message, optional, tag = "1")]
846    pub logs_filter: ::core::option::Option<LogsFilter>,
847    #[prost(message, repeated, tag = "2")]
848    pub rules: ::prost::alloc::vec::Vec<LogsNewValueRule>,
849    #[prost(message, repeated, tag = "3")]
850    pub notification_payload_filter: ::prost::alloc::vec::Vec<
851        ::prost::alloc::string::String,
852    >,
853}
854#[derive(serde::Serialize, serde::Deserialize)]
855#[serde(rename_all = "snake_case")]
856#[derive(Clone, PartialEq, ::prost::Message)]
857pub struct LogsNewValueRule {
858    #[prost(message, optional, tag = "1")]
859    pub condition: ::core::option::Option<LogsNewValueCondition>,
860}
861#[derive(serde::Serialize, serde::Deserialize)]
862#[serde(rename_all = "snake_case")]
863#[derive(Clone, PartialEq, ::prost::Message)]
864pub struct LogsNewValueCondition {
865    #[prost(message, optional, tag = "1")]
866    pub keypath_to_track: ::core::option::Option<::prost::alloc::string::String>,
867    #[prost(message, optional, tag = "2")]
868    pub time_window: ::core::option::Option<LogsNewValueTimeWindow>,
869}
870#[derive(serde::Serialize, serde::Deserialize)]
871#[serde(rename_all = "snake_case")]
872#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
873#[repr(i32)]
874pub enum LogsRatioConditionType {
875    MoreThanOrUnspecified = 0,
876    LessThan = 1,
877}
878impl LogsRatioConditionType {
879    /// String value of the enum field names used in the ProtoBuf definition.
880    ///
881    /// The values are not transformed in any way and thus are considered stable
882    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
883    pub fn as_str_name(&self) -> &'static str {
884        match self {
885            Self::MoreThanOrUnspecified => {
886                "LOGS_RATIO_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"
887            }
888            Self::LessThan => "LOGS_RATIO_CONDITION_TYPE_LESS_THAN",
889        }
890    }
891    /// Creates an enum from field names used in the ProtoBuf definition.
892    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
893        match value {
894            "LOGS_RATIO_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED" => {
895                Some(Self::MoreThanOrUnspecified)
896            }
897            "LOGS_RATIO_CONDITION_TYPE_LESS_THAN" => Some(Self::LessThan),
898            _ => None,
899        }
900    }
901}
902#[derive(serde::Serialize, serde::Deserialize)]
903#[serde(rename_all = "snake_case")]
904#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
905#[repr(i32)]
906pub enum LogsRatioGroupByFor {
907    BothOrUnspecified = 0,
908    NumeratorOnly = 1,
909    DenumeratorOnly = 2,
910}
911impl LogsRatioGroupByFor {
912    /// String value of the enum field names used in the ProtoBuf definition.
913    ///
914    /// The values are not transformed in any way and thus are considered stable
915    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
916    pub fn as_str_name(&self) -> &'static str {
917        match self {
918            Self::BothOrUnspecified => "LOGS_RATIO_GROUP_BY_FOR_BOTH_OR_UNSPECIFIED",
919            Self::NumeratorOnly => "LOGS_RATIO_GROUP_BY_FOR_NUMERATOR_ONLY",
920            Self::DenumeratorOnly => "LOGS_RATIO_GROUP_BY_FOR_DENUMERATOR_ONLY",
921        }
922    }
923    /// Creates an enum from field names used in the ProtoBuf definition.
924    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
925        match value {
926            "LOGS_RATIO_GROUP_BY_FOR_BOTH_OR_UNSPECIFIED" => {
927                Some(Self::BothOrUnspecified)
928            }
929            "LOGS_RATIO_GROUP_BY_FOR_NUMERATOR_ONLY" => Some(Self::NumeratorOnly),
930            "LOGS_RATIO_GROUP_BY_FOR_DENUMERATOR_ONLY" => Some(Self::DenumeratorOnly),
931            _ => None,
932        }
933    }
934}
935#[derive(serde::Serialize, serde::Deserialize)]
936#[serde(rename_all = "snake_case")]
937#[derive(Clone, Copy, PartialEq, ::prost::Message)]
938pub struct LogsRatioTimeWindow {
939    #[prost(oneof = "logs_ratio_time_window::Type", tags = "1")]
940    pub r#type: ::core::option::Option<logs_ratio_time_window::Type>,
941}
942/// Nested message and enum types in `LogsRatioTimeWindow`.
943pub mod logs_ratio_time_window {
944    #[derive(serde::Serialize, serde::Deserialize)]
945    #[serde(rename_all = "snake_case")]
946    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
947    pub enum Type {
948        #[prost(enumeration = "super::LogsRatioTimeWindowValue", tag = "1")]
949        LogsRatioTimeWindowSpecificValue(i32),
950    }
951}
952#[derive(serde::Serialize, serde::Deserialize)]
953#[serde(rename_all = "snake_case")]
954#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
955#[repr(i32)]
956pub enum LogsRatioTimeWindowValue {
957    Minutes5OrUnspecified = 0,
958    Minutes10 = 1,
959    Minutes15 = 2,
960    Minutes30 = 3,
961    Hour1 = 4,
962    Hours2 = 5,
963    Hours4 = 6,
964    Hours6 = 7,
965    Hours12 = 8,
966    Hours24 = 9,
967    Hours36 = 10,
968}
969impl LogsRatioTimeWindowValue {
970    /// String value of the enum field names used in the ProtoBuf definition.
971    ///
972    /// The values are not transformed in any way and thus are considered stable
973    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
974    pub fn as_str_name(&self) -> &'static str {
975        match self {
976            Self::Minutes5OrUnspecified => {
977                "LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED"
978            }
979            Self::Minutes10 => "LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_10",
980            Self::Minutes15 => "LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_15",
981            Self::Minutes30 => "LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_30",
982            Self::Hour1 => "LOGS_RATIO_TIME_WINDOW_VALUE_HOUR_1",
983            Self::Hours2 => "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_2",
984            Self::Hours4 => "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_4",
985            Self::Hours6 => "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_6",
986            Self::Hours12 => "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_12",
987            Self::Hours24 => "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_24",
988            Self::Hours36 => "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_36",
989        }
990    }
991    /// Creates an enum from field names used in the ProtoBuf definition.
992    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
993        match value {
994            "LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED" => {
995                Some(Self::Minutes5OrUnspecified)
996            }
997            "LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_10" => Some(Self::Minutes10),
998            "LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_15" => Some(Self::Minutes15),
999            "LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_30" => Some(Self::Minutes30),
1000            "LOGS_RATIO_TIME_WINDOW_VALUE_HOUR_1" => Some(Self::Hour1),
1001            "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_2" => Some(Self::Hours2),
1002            "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_4" => Some(Self::Hours4),
1003            "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_6" => Some(Self::Hours6),
1004            "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_12" => Some(Self::Hours12),
1005            "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_24" => Some(Self::Hours24),
1006            "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_36" => Some(Self::Hours36),
1007            _ => None,
1008        }
1009    }
1010}
1011#[derive(serde::Serialize, serde::Deserialize)]
1012#[serde(rename_all = "snake_case")]
1013#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1014pub struct AlertDefOverride {
1015    #[prost(enumeration = "AlertDefPriority", tag = "1")]
1016    pub priority: i32,
1017}
1018#[derive(serde::Serialize, serde::Deserialize)]
1019#[serde(rename_all = "snake_case")]
1020#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1021pub struct UndetectedValuesManagement {
1022    #[prost(message, optional, tag = "1")]
1023    pub trigger_undetected_values: ::core::option::Option<bool>,
1024    #[prost(enumeration = "AutoRetireTimeframe", optional, tag = "2")]
1025    pub auto_retire_timeframe: ::core::option::Option<i32>,
1026}
1027#[derive(serde::Serialize, serde::Deserialize)]
1028#[serde(rename_all = "snake_case")]
1029#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1030#[repr(i32)]
1031pub enum AutoRetireTimeframe {
1032    NeverOrUnspecified = 0,
1033    Minutes5 = 1,
1034    Minutes10 = 2,
1035    Hour1 = 3,
1036    Hours2 = 4,
1037    Hours6 = 5,
1038    Hours12 = 6,
1039    Hours24 = 7,
1040}
1041impl AutoRetireTimeframe {
1042    /// String value of the enum field names used in the ProtoBuf definition.
1043    ///
1044    /// The values are not transformed in any way and thus are considered stable
1045    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1046    pub fn as_str_name(&self) -> &'static str {
1047        match self {
1048            Self::NeverOrUnspecified => "AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED",
1049            Self::Minutes5 => "AUTO_RETIRE_TIMEFRAME_MINUTES_5",
1050            Self::Minutes10 => "AUTO_RETIRE_TIMEFRAME_MINUTES_10",
1051            Self::Hour1 => "AUTO_RETIRE_TIMEFRAME_HOUR_1",
1052            Self::Hours2 => "AUTO_RETIRE_TIMEFRAME_HOURS_2",
1053            Self::Hours6 => "AUTO_RETIRE_TIMEFRAME_HOURS_6",
1054            Self::Hours12 => "AUTO_RETIRE_TIMEFRAME_HOURS_12",
1055            Self::Hours24 => "AUTO_RETIRE_TIMEFRAME_HOURS_24",
1056        }
1057    }
1058    /// Creates an enum from field names used in the ProtoBuf definition.
1059    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1060        match value {
1061            "AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED" => {
1062                Some(Self::NeverOrUnspecified)
1063            }
1064            "AUTO_RETIRE_TIMEFRAME_MINUTES_5" => Some(Self::Minutes5),
1065            "AUTO_RETIRE_TIMEFRAME_MINUTES_10" => Some(Self::Minutes10),
1066            "AUTO_RETIRE_TIMEFRAME_HOUR_1" => Some(Self::Hour1),
1067            "AUTO_RETIRE_TIMEFRAME_HOURS_2" => Some(Self::Hours2),
1068            "AUTO_RETIRE_TIMEFRAME_HOURS_6" => Some(Self::Hours6),
1069            "AUTO_RETIRE_TIMEFRAME_HOURS_12" => Some(Self::Hours12),
1070            "AUTO_RETIRE_TIMEFRAME_HOURS_24" => Some(Self::Hours24),
1071            _ => None,
1072        }
1073    }
1074}
1075#[derive(serde::Serialize, serde::Deserialize)]
1076#[serde(rename_all = "snake_case")]
1077#[derive(Clone, PartialEq, ::prost::Message)]
1078pub struct LogsRatioThresholdType {
1079    #[prost(message, optional, tag = "1")]
1080    pub numerator: ::core::option::Option<LogsFilter>,
1081    #[prost(message, optional, tag = "2")]
1082    pub numerator_alias: ::core::option::Option<::prost::alloc::string::String>,
1083    #[prost(message, optional, tag = "3")]
1084    pub denominator: ::core::option::Option<LogsFilter>,
1085    #[prost(message, optional, tag = "4")]
1086    pub denominator_alias: ::core::option::Option<::prost::alloc::string::String>,
1087    #[prost(message, repeated, tag = "5")]
1088    pub rules: ::prost::alloc::vec::Vec<LogsRatioRules>,
1089    #[prost(message, repeated, tag = "6")]
1090    pub notification_payload_filter: ::prost::alloc::vec::Vec<
1091        ::prost::alloc::string::String,
1092    >,
1093    #[prost(enumeration = "LogsRatioGroupByFor", tag = "7")]
1094    pub group_by_for: i32,
1095    #[prost(message, optional, tag = "8")]
1096    pub undetected_values_management: ::core::option::Option<UndetectedValuesManagement>,
1097    #[prost(message, optional, tag = "9")]
1098    pub ignore_infinity: ::core::option::Option<bool>,
1099    #[prost(message, optional, tag = "10")]
1100    pub evaluation_delay_ms: ::core::option::Option<i32>,
1101}
1102#[derive(serde::Serialize, serde::Deserialize)]
1103#[serde(rename_all = "snake_case")]
1104#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1105pub struct LogsRatioRules {
1106    #[prost(message, optional, tag = "1")]
1107    pub condition: ::core::option::Option<LogsRatioCondition>,
1108    #[prost(message, optional, tag = "2")]
1109    pub r#override: ::core::option::Option<AlertDefOverride>,
1110}
1111#[derive(serde::Serialize, serde::Deserialize)]
1112#[serde(rename_all = "snake_case")]
1113#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1114pub struct LogsRatioCondition {
1115    #[prost(message, optional, tag = "1")]
1116    pub threshold: ::core::option::Option<f64>,
1117    #[prost(message, optional, tag = "2")]
1118    pub time_window: ::core::option::Option<LogsRatioTimeWindow>,
1119    #[prost(enumeration = "LogsRatioConditionType", tag = "4")]
1120    pub condition_type: i32,
1121}
1122#[derive(serde::Serialize, serde::Deserialize)]
1123#[serde(rename_all = "snake_case")]
1124#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1125#[repr(i32)]
1126pub enum LogsThresholdConditionType {
1127    MoreThanOrUnspecified = 0,
1128    LessThan = 1,
1129}
1130impl LogsThresholdConditionType {
1131    /// String value of the enum field names used in the ProtoBuf definition.
1132    ///
1133    /// The values are not transformed in any way and thus are considered stable
1134    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1135    pub fn as_str_name(&self) -> &'static str {
1136        match self {
1137            Self::MoreThanOrUnspecified => {
1138                "LOGS_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"
1139            }
1140            Self::LessThan => "LOGS_THRESHOLD_CONDITION_TYPE_LESS_THAN",
1141        }
1142    }
1143    /// Creates an enum from field names used in the ProtoBuf definition.
1144    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1145        match value {
1146            "LOGS_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED" => {
1147                Some(Self::MoreThanOrUnspecified)
1148            }
1149            "LOGS_THRESHOLD_CONDITION_TYPE_LESS_THAN" => Some(Self::LessThan),
1150            _ => None,
1151        }
1152    }
1153}
1154#[derive(serde::Serialize, serde::Deserialize)]
1155#[serde(rename_all = "snake_case")]
1156#[derive(Clone, PartialEq, ::prost::Message)]
1157pub struct LogsThresholdType {
1158    #[prost(message, optional, tag = "1")]
1159    pub logs_filter: ::core::option::Option<LogsFilter>,
1160    #[prost(message, optional, tag = "2")]
1161    pub undetected_values_management: ::core::option::Option<UndetectedValuesManagement>,
1162    #[prost(message, repeated, tag = "3")]
1163    pub rules: ::prost::alloc::vec::Vec<LogsThresholdRule>,
1164    #[prost(message, repeated, tag = "4")]
1165    pub notification_payload_filter: ::prost::alloc::vec::Vec<
1166        ::prost::alloc::string::String,
1167    >,
1168    #[prost(message, optional, tag = "5")]
1169    pub evaluation_delay_ms: ::core::option::Option<i32>,
1170}
1171#[derive(serde::Serialize, serde::Deserialize)]
1172#[serde(rename_all = "snake_case")]
1173#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1174pub struct LogsThresholdRule {
1175    #[prost(message, optional, tag = "1")]
1176    pub condition: ::core::option::Option<LogsThresholdCondition>,
1177    #[prost(message, optional, tag = "2")]
1178    pub r#override: ::core::option::Option<AlertDefOverride>,
1179}
1180#[derive(serde::Serialize, serde::Deserialize)]
1181#[serde(rename_all = "snake_case")]
1182#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1183pub struct LogsThresholdCondition {
1184    #[prost(message, optional, tag = "1")]
1185    pub threshold: ::core::option::Option<f64>,
1186    #[prost(message, optional, tag = "2")]
1187    pub time_window: ::core::option::Option<LogsTimeWindow>,
1188    #[prost(enumeration = "LogsThresholdConditionType", tag = "3")]
1189    pub condition_type: i32,
1190}
1191#[derive(serde::Serialize, serde::Deserialize)]
1192#[serde(rename_all = "snake_case")]
1193#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1194#[repr(i32)]
1195pub enum LogsTimeRelativeComparedTo {
1196    PreviousHourOrUnspecified = 0,
1197    SameHourYesterday = 1,
1198    SameHourLastWeek = 2,
1199    Yesterday = 3,
1200    SameDayLastWeek = 4,
1201    SameDayLastMonth = 5,
1202}
1203impl LogsTimeRelativeComparedTo {
1204    /// String value of the enum field names used in the ProtoBuf definition.
1205    ///
1206    /// The values are not transformed in any way and thus are considered stable
1207    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1208    pub fn as_str_name(&self) -> &'static str {
1209        match self {
1210            Self::PreviousHourOrUnspecified => {
1211                "LOGS_TIME_RELATIVE_COMPARED_TO_PREVIOUS_HOUR_OR_UNSPECIFIED"
1212            }
1213            Self::SameHourYesterday => {
1214                "LOGS_TIME_RELATIVE_COMPARED_TO_SAME_HOUR_YESTERDAY"
1215            }
1216            Self::SameHourLastWeek => {
1217                "LOGS_TIME_RELATIVE_COMPARED_TO_SAME_HOUR_LAST_WEEK"
1218            }
1219            Self::Yesterday => "LOGS_TIME_RELATIVE_COMPARED_TO_YESTERDAY",
1220            Self::SameDayLastWeek => "LOGS_TIME_RELATIVE_COMPARED_TO_SAME_DAY_LAST_WEEK",
1221            Self::SameDayLastMonth => {
1222                "LOGS_TIME_RELATIVE_COMPARED_TO_SAME_DAY_LAST_MONTH"
1223            }
1224        }
1225    }
1226    /// Creates an enum from field names used in the ProtoBuf definition.
1227    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1228        match value {
1229            "LOGS_TIME_RELATIVE_COMPARED_TO_PREVIOUS_HOUR_OR_UNSPECIFIED" => {
1230                Some(Self::PreviousHourOrUnspecified)
1231            }
1232            "LOGS_TIME_RELATIVE_COMPARED_TO_SAME_HOUR_YESTERDAY" => {
1233                Some(Self::SameHourYesterday)
1234            }
1235            "LOGS_TIME_RELATIVE_COMPARED_TO_SAME_HOUR_LAST_WEEK" => {
1236                Some(Self::SameHourLastWeek)
1237            }
1238            "LOGS_TIME_RELATIVE_COMPARED_TO_YESTERDAY" => Some(Self::Yesterday),
1239            "LOGS_TIME_RELATIVE_COMPARED_TO_SAME_DAY_LAST_WEEK" => {
1240                Some(Self::SameDayLastWeek)
1241            }
1242            "LOGS_TIME_RELATIVE_COMPARED_TO_SAME_DAY_LAST_MONTH" => {
1243                Some(Self::SameDayLastMonth)
1244            }
1245            _ => None,
1246        }
1247    }
1248}
1249#[derive(serde::Serialize, serde::Deserialize)]
1250#[serde(rename_all = "snake_case")]
1251#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1252#[repr(i32)]
1253pub enum LogsTimeRelativeConditionType {
1254    MoreThanOrUnspecified = 0,
1255    LessThan = 1,
1256}
1257impl LogsTimeRelativeConditionType {
1258    /// String value of the enum field names used in the ProtoBuf definition.
1259    ///
1260    /// The values are not transformed in any way and thus are considered stable
1261    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1262    pub fn as_str_name(&self) -> &'static str {
1263        match self {
1264            Self::MoreThanOrUnspecified => {
1265                "LOGS_TIME_RELATIVE_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"
1266            }
1267            Self::LessThan => "LOGS_TIME_RELATIVE_CONDITION_TYPE_LESS_THAN",
1268        }
1269    }
1270    /// Creates an enum from field names used in the ProtoBuf definition.
1271    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1272        match value {
1273            "LOGS_TIME_RELATIVE_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED" => {
1274                Some(Self::MoreThanOrUnspecified)
1275            }
1276            "LOGS_TIME_RELATIVE_CONDITION_TYPE_LESS_THAN" => Some(Self::LessThan),
1277            _ => None,
1278        }
1279    }
1280}
1281#[derive(serde::Serialize, serde::Deserialize)]
1282#[serde(rename_all = "snake_case")]
1283#[derive(Clone, PartialEq, ::prost::Message)]
1284pub struct LogsTimeRelativeThresholdType {
1285    #[prost(message, optional, tag = "1")]
1286    pub logs_filter: ::core::option::Option<LogsFilter>,
1287    #[prost(message, repeated, tag = "2")]
1288    pub rules: ::prost::alloc::vec::Vec<LogsTimeRelativeRule>,
1289    #[prost(message, optional, tag = "3")]
1290    pub ignore_infinity: ::core::option::Option<bool>,
1291    #[prost(message, repeated, tag = "4")]
1292    pub notification_payload_filter: ::prost::alloc::vec::Vec<
1293        ::prost::alloc::string::String,
1294    >,
1295    #[prost(message, optional, tag = "5")]
1296    pub undetected_values_management: ::core::option::Option<UndetectedValuesManagement>,
1297    #[prost(message, optional, tag = "6")]
1298    pub evaluation_delay_ms: ::core::option::Option<i32>,
1299}
1300#[derive(serde::Serialize, serde::Deserialize)]
1301#[serde(rename_all = "snake_case")]
1302#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1303pub struct LogsTimeRelativeRule {
1304    #[prost(message, optional, tag = "1")]
1305    pub condition: ::core::option::Option<LogsTimeRelativeCondition>,
1306    #[prost(message, optional, tag = "2")]
1307    pub r#override: ::core::option::Option<AlertDefOverride>,
1308}
1309#[derive(serde::Serialize, serde::Deserialize)]
1310#[serde(rename_all = "snake_case")]
1311#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1312pub struct LogsTimeRelativeCondition {
1313    #[prost(message, optional, tag = "1")]
1314    pub threshold: ::core::option::Option<f64>,
1315    #[prost(enumeration = "LogsTimeRelativeComparedTo", tag = "2")]
1316    pub compared_to: i32,
1317    #[prost(enumeration = "LogsTimeRelativeConditionType", tag = "4")]
1318    pub condition_type: i32,
1319}
1320#[derive(serde::Serialize, serde::Deserialize)]
1321#[serde(rename_all = "snake_case")]
1322#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1323pub struct LogsUniqueValueTimeWindow {
1324    #[prost(oneof = "logs_unique_value_time_window::Type", tags = "1")]
1325    pub r#type: ::core::option::Option<logs_unique_value_time_window::Type>,
1326}
1327/// Nested message and enum types in `LogsUniqueValueTimeWindow`.
1328pub mod logs_unique_value_time_window {
1329    #[derive(serde::Serialize, serde::Deserialize)]
1330    #[serde(rename_all = "snake_case")]
1331    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1332    pub enum Type {
1333        #[prost(enumeration = "super::LogsUniqueValueTimeWindowValue", tag = "1")]
1334        LogsUniqueValueTimeWindowSpecificValue(i32),
1335    }
1336}
1337#[derive(serde::Serialize, serde::Deserialize)]
1338#[serde(rename_all = "snake_case")]
1339#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1340#[repr(i32)]
1341pub enum LogsUniqueValueTimeWindowValue {
1342    Minute1OrUnspecified = 0,
1343    Minutes5 = 10,
1344    Minutes10 = 11,
1345    Minutes15 = 1,
1346    Minutes20 = 2,
1347    Minutes30 = 3,
1348    Hours1 = 4,
1349    Hours2 = 5,
1350    Hours4 = 6,
1351    Hours6 = 7,
1352    Hours12 = 8,
1353    Hours24 = 9,
1354    Hours36 = 12,
1355}
1356impl LogsUniqueValueTimeWindowValue {
1357    /// String value of the enum field names used in the ProtoBuf definition.
1358    ///
1359    /// The values are not transformed in any way and thus are considered stable
1360    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1361    pub fn as_str_name(&self) -> &'static str {
1362        match self {
1363            Self::Minute1OrUnspecified => {
1364                "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTE_1_OR_UNSPECIFIED"
1365            }
1366            Self::Minutes5 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_5",
1367            Self::Minutes10 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_10",
1368            Self::Minutes15 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_15",
1369            Self::Minutes20 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_20",
1370            Self::Minutes30 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_30",
1371            Self::Hours1 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_1",
1372            Self::Hours2 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_2",
1373            Self::Hours4 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_4",
1374            Self::Hours6 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_6",
1375            Self::Hours12 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_12",
1376            Self::Hours24 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_24",
1377            Self::Hours36 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_36",
1378        }
1379    }
1380    /// Creates an enum from field names used in the ProtoBuf definition.
1381    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1382        match value {
1383            "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTE_1_OR_UNSPECIFIED" => {
1384                Some(Self::Minute1OrUnspecified)
1385            }
1386            "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_5" => Some(Self::Minutes5),
1387            "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_10" => Some(Self::Minutes10),
1388            "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_15" => Some(Self::Minutes15),
1389            "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_20" => Some(Self::Minutes20),
1390            "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_30" => Some(Self::Minutes30),
1391            "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_1" => Some(Self::Hours1),
1392            "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_2" => Some(Self::Hours2),
1393            "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_4" => Some(Self::Hours4),
1394            "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_6" => Some(Self::Hours6),
1395            "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_12" => Some(Self::Hours12),
1396            "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_24" => Some(Self::Hours24),
1397            "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_36" => Some(Self::Hours36),
1398            _ => None,
1399        }
1400    }
1401}
1402#[derive(serde::Serialize, serde::Deserialize)]
1403#[serde(rename_all = "snake_case")]
1404#[derive(Clone, PartialEq, ::prost::Message)]
1405pub struct LogsUniqueCountType {
1406    #[prost(message, optional, tag = "1")]
1407    pub logs_filter: ::core::option::Option<LogsFilter>,
1408    #[prost(message, repeated, tag = "2")]
1409    pub rules: ::prost::alloc::vec::Vec<LogsUniqueCountRule>,
1410    #[prost(message, repeated, tag = "3")]
1411    pub notification_payload_filter: ::prost::alloc::vec::Vec<
1412        ::prost::alloc::string::String,
1413    >,
1414    #[prost(message, optional, tag = "4")]
1415    pub max_unique_count_per_group_by_key: ::core::option::Option<i64>,
1416    #[prost(message, optional, tag = "5")]
1417    pub unique_count_keypath: ::core::option::Option<::prost::alloc::string::String>,
1418}
1419#[derive(serde::Serialize, serde::Deserialize)]
1420#[serde(rename_all = "snake_case")]
1421#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1422pub struct LogsUniqueCountRule {
1423    #[prost(message, optional, tag = "1")]
1424    pub condition: ::core::option::Option<LogsUniqueCountCondition>,
1425}
1426#[derive(serde::Serialize, serde::Deserialize)]
1427#[serde(rename_all = "snake_case")]
1428#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1429pub struct LogsUniqueCountCondition {
1430    #[prost(message, optional, tag = "2")]
1431    pub max_unique_count: ::core::option::Option<i64>,
1432    #[prost(message, optional, tag = "3")]
1433    pub time_window: ::core::option::Option<LogsUniqueValueTimeWindow>,
1434}
1435#[derive(serde::Serialize, serde::Deserialize)]
1436#[serde(rename_all = "snake_case")]
1437#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1438#[repr(i32)]
1439pub enum MetricAnomalyConditionType {
1440    MoreThanUsualOrUnspecified = 0,
1441    LessThanUsual = 1,
1442}
1443impl MetricAnomalyConditionType {
1444    /// String value of the enum field names used in the ProtoBuf definition.
1445    ///
1446    /// The values are not transformed in any way and thus are considered stable
1447    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1448    pub fn as_str_name(&self) -> &'static str {
1449        match self {
1450            Self::MoreThanUsualOrUnspecified => {
1451                "METRIC_ANOMALY_CONDITION_TYPE_MORE_THAN_USUAL_OR_UNSPECIFIED"
1452            }
1453            Self::LessThanUsual => "METRIC_ANOMALY_CONDITION_TYPE_LESS_THAN_USUAL",
1454        }
1455    }
1456    /// Creates an enum from field names used in the ProtoBuf definition.
1457    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1458        match value {
1459            "METRIC_ANOMALY_CONDITION_TYPE_MORE_THAN_USUAL_OR_UNSPECIFIED" => {
1460                Some(Self::MoreThanUsualOrUnspecified)
1461            }
1462            "METRIC_ANOMALY_CONDITION_TYPE_LESS_THAN_USUAL" => Some(Self::LessThanUsual),
1463            _ => None,
1464        }
1465    }
1466}
1467#[derive(serde::Serialize, serde::Deserialize)]
1468#[serde(rename_all = "snake_case")]
1469#[derive(Clone, PartialEq, ::prost::Message)]
1470pub struct MetricTimeWindow {
1471    #[prost(oneof = "metric_time_window::Type", tags = "1, 2")]
1472    pub r#type: ::core::option::Option<metric_time_window::Type>,
1473}
1474/// Nested message and enum types in `MetricTimeWindow`.
1475pub mod metric_time_window {
1476    #[derive(serde::Serialize, serde::Deserialize)]
1477    #[serde(rename_all = "snake_case")]
1478    #[derive(Clone, PartialEq, ::prost::Oneof)]
1479    pub enum Type {
1480        #[prost(enumeration = "super::MetricTimeWindowValue", tag = "1")]
1481        MetricTimeWindowSpecificValue(i32),
1482        #[prost(message, tag = "2")]
1483        MetricTimeWindowDynamicDuration(::prost::alloc::string::String),
1484    }
1485}
1486#[derive(serde::Serialize, serde::Deserialize)]
1487#[serde(rename_all = "snake_case")]
1488#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1489#[repr(i32)]
1490pub enum MetricTimeWindowValue {
1491    Minutes1OrUnspecified = 0,
1492    Minutes5 = 1,
1493    Minutes10 = 2,
1494    Minutes15 = 3,
1495    Minutes20 = 11,
1496    Minutes30 = 4,
1497    Hour1 = 5,
1498    Hours2 = 6,
1499    Hours4 = 7,
1500    Hours6 = 8,
1501    Hours12 = 9,
1502    Hours24 = 10,
1503    Hours36 = 12,
1504}
1505impl MetricTimeWindowValue {
1506    /// String value of the enum field names used in the ProtoBuf definition.
1507    ///
1508    /// The values are not transformed in any way and thus are considered stable
1509    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1510    pub fn as_str_name(&self) -> &'static str {
1511        match self {
1512            Self::Minutes1OrUnspecified => {
1513                "METRIC_TIME_WINDOW_VALUE_MINUTES_1_OR_UNSPECIFIED"
1514            }
1515            Self::Minutes5 => "METRIC_TIME_WINDOW_VALUE_MINUTES_5",
1516            Self::Minutes10 => "METRIC_TIME_WINDOW_VALUE_MINUTES_10",
1517            Self::Minutes15 => "METRIC_TIME_WINDOW_VALUE_MINUTES_15",
1518            Self::Minutes20 => "METRIC_TIME_WINDOW_VALUE_MINUTES_20",
1519            Self::Minutes30 => "METRIC_TIME_WINDOW_VALUE_MINUTES_30",
1520            Self::Hour1 => "METRIC_TIME_WINDOW_VALUE_HOUR_1",
1521            Self::Hours2 => "METRIC_TIME_WINDOW_VALUE_HOURS_2",
1522            Self::Hours4 => "METRIC_TIME_WINDOW_VALUE_HOURS_4",
1523            Self::Hours6 => "METRIC_TIME_WINDOW_VALUE_HOURS_6",
1524            Self::Hours12 => "METRIC_TIME_WINDOW_VALUE_HOURS_12",
1525            Self::Hours24 => "METRIC_TIME_WINDOW_VALUE_HOURS_24",
1526            Self::Hours36 => "METRIC_TIME_WINDOW_VALUE_HOURS_36",
1527        }
1528    }
1529    /// Creates an enum from field names used in the ProtoBuf definition.
1530    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1531        match value {
1532            "METRIC_TIME_WINDOW_VALUE_MINUTES_1_OR_UNSPECIFIED" => {
1533                Some(Self::Minutes1OrUnspecified)
1534            }
1535            "METRIC_TIME_WINDOW_VALUE_MINUTES_5" => Some(Self::Minutes5),
1536            "METRIC_TIME_WINDOW_VALUE_MINUTES_10" => Some(Self::Minutes10),
1537            "METRIC_TIME_WINDOW_VALUE_MINUTES_15" => Some(Self::Minutes15),
1538            "METRIC_TIME_WINDOW_VALUE_MINUTES_20" => Some(Self::Minutes20),
1539            "METRIC_TIME_WINDOW_VALUE_MINUTES_30" => Some(Self::Minutes30),
1540            "METRIC_TIME_WINDOW_VALUE_HOUR_1" => Some(Self::Hour1),
1541            "METRIC_TIME_WINDOW_VALUE_HOURS_2" => Some(Self::Hours2),
1542            "METRIC_TIME_WINDOW_VALUE_HOURS_4" => Some(Self::Hours4),
1543            "METRIC_TIME_WINDOW_VALUE_HOURS_6" => Some(Self::Hours6),
1544            "METRIC_TIME_WINDOW_VALUE_HOURS_12" => Some(Self::Hours12),
1545            "METRIC_TIME_WINDOW_VALUE_HOURS_24" => Some(Self::Hours24),
1546            "METRIC_TIME_WINDOW_VALUE_HOURS_36" => Some(Self::Hours36),
1547            _ => None,
1548        }
1549    }
1550}
1551#[derive(serde::Serialize, serde::Deserialize)]
1552#[serde(rename_all = "snake_case")]
1553#[derive(Clone, PartialEq, ::prost::Message)]
1554pub struct MetricFilter {
1555    #[prost(oneof = "metric_filter::Type", tags = "1")]
1556    pub r#type: ::core::option::Option<metric_filter::Type>,
1557}
1558/// Nested message and enum types in `MetricFilter`.
1559pub mod metric_filter {
1560    #[derive(serde::Serialize, serde::Deserialize)]
1561    #[serde(rename_all = "snake_case")]
1562    #[derive(Clone, PartialEq, ::prost::Oneof)]
1563    pub enum Type {
1564        #[prost(message, tag = "1")]
1565        Promql(::prost::alloc::string::String),
1566    }
1567}
1568#[derive(serde::Serialize, serde::Deserialize)]
1569#[serde(rename_all = "snake_case")]
1570#[derive(Clone, PartialEq, ::prost::Message)]
1571pub struct MetricAnomalyType {
1572    #[prost(message, optional, tag = "1")]
1573    pub metric_filter: ::core::option::Option<MetricFilter>,
1574    #[prost(message, repeated, tag = "2")]
1575    pub rules: ::prost::alloc::vec::Vec<MetricAnomalyRule>,
1576    #[prost(message, optional, tag = "3")]
1577    pub evaluation_delay_ms: ::core::option::Option<i32>,
1578    #[prost(message, optional, tag = "4")]
1579    pub anomaly_alert_settings: ::core::option::Option<AnomalyAlertSettings>,
1580}
1581#[derive(serde::Serialize, serde::Deserialize)]
1582#[serde(rename_all = "snake_case")]
1583#[derive(Clone, PartialEq, ::prost::Message)]
1584pub struct MetricAnomalyRule {
1585    #[prost(message, optional, tag = "1")]
1586    pub condition: ::core::option::Option<MetricAnomalyCondition>,
1587}
1588#[derive(serde::Serialize, serde::Deserialize)]
1589#[serde(rename_all = "snake_case")]
1590#[derive(Clone, PartialEq, ::prost::Message)]
1591pub struct MetricAnomalyCondition {
1592    #[prost(message, optional, tag = "1")]
1593    pub threshold: ::core::option::Option<f64>,
1594    #[prost(message, optional, tag = "2")]
1595    pub for_over_pct: ::core::option::Option<u32>,
1596    #[prost(message, optional, tag = "3")]
1597    pub of_the_last: ::core::option::Option<MetricTimeWindow>,
1598    #[prost(message, optional, tag = "4")]
1599    pub min_non_null_values_pct: ::core::option::Option<u32>,
1600    #[prost(enumeration = "MetricAnomalyConditionType", tag = "5")]
1601    pub condition_type: i32,
1602}
1603#[derive(serde::Serialize, serde::Deserialize)]
1604#[serde(rename_all = "snake_case")]
1605#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1606#[repr(i32)]
1607pub enum MetricThresholdConditionType {
1608    MoreThanOrUnspecified = 0,
1609    LessThan = 1,
1610    MoreThanOrEquals = 2,
1611    LessThanOrEquals = 3,
1612}
1613impl MetricThresholdConditionType {
1614    /// String value of the enum field names used in the ProtoBuf definition.
1615    ///
1616    /// The values are not transformed in any way and thus are considered stable
1617    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1618    pub fn as_str_name(&self) -> &'static str {
1619        match self {
1620            Self::MoreThanOrUnspecified => {
1621                "METRIC_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"
1622            }
1623            Self::LessThan => "METRIC_THRESHOLD_CONDITION_TYPE_LESS_THAN",
1624            Self::MoreThanOrEquals => {
1625                "METRIC_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_EQUALS"
1626            }
1627            Self::LessThanOrEquals => {
1628                "METRIC_THRESHOLD_CONDITION_TYPE_LESS_THAN_OR_EQUALS"
1629            }
1630        }
1631    }
1632    /// Creates an enum from field names used in the ProtoBuf definition.
1633    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1634        match value {
1635            "METRIC_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED" => {
1636                Some(Self::MoreThanOrUnspecified)
1637            }
1638            "METRIC_THRESHOLD_CONDITION_TYPE_LESS_THAN" => Some(Self::LessThan),
1639            "METRIC_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_EQUALS" => {
1640                Some(Self::MoreThanOrEquals)
1641            }
1642            "METRIC_THRESHOLD_CONDITION_TYPE_LESS_THAN_OR_EQUALS" => {
1643                Some(Self::LessThanOrEquals)
1644            }
1645            _ => None,
1646        }
1647    }
1648}
1649#[derive(serde::Serialize, serde::Deserialize)]
1650#[serde(rename_all = "snake_case")]
1651#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1652pub struct MetricMissingValues {
1653    #[prost(oneof = "metric_missing_values::MissingValues", tags = "1, 2")]
1654    pub missing_values: ::core::option::Option<metric_missing_values::MissingValues>,
1655}
1656/// Nested message and enum types in `MetricMissingValues`.
1657pub mod metric_missing_values {
1658    #[derive(serde::Serialize, serde::Deserialize)]
1659    #[serde(rename_all = "snake_case")]
1660    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1661    pub enum MissingValues {
1662        #[prost(message, tag = "1")]
1663        ReplaceWithZero(bool),
1664        #[prost(message, tag = "2")]
1665        MinNonNullValuesPct(u32),
1666    }
1667}
1668#[derive(serde::Serialize, serde::Deserialize)]
1669#[serde(rename_all = "snake_case")]
1670#[derive(Clone, PartialEq, ::prost::Message)]
1671pub struct MetricThresholdType {
1672    #[prost(message, optional, tag = "1")]
1673    pub metric_filter: ::core::option::Option<MetricFilter>,
1674    #[prost(message, repeated, tag = "2")]
1675    pub rules: ::prost::alloc::vec::Vec<MetricThresholdRule>,
1676    #[prost(message, optional, tag = "3")]
1677    pub undetected_values_management: ::core::option::Option<UndetectedValuesManagement>,
1678    #[prost(message, optional, tag = "4")]
1679    pub missing_values: ::core::option::Option<MetricMissingValues>,
1680    #[prost(message, optional, tag = "5")]
1681    pub evaluation_delay_ms: ::core::option::Option<i32>,
1682}
1683#[derive(serde::Serialize, serde::Deserialize)]
1684#[serde(rename_all = "snake_case")]
1685#[derive(Clone, PartialEq, ::prost::Message)]
1686pub struct MetricThresholdRule {
1687    #[prost(message, optional, tag = "1")]
1688    pub condition: ::core::option::Option<MetricThresholdCondition>,
1689    #[prost(message, optional, tag = "2")]
1690    pub r#override: ::core::option::Option<AlertDefOverride>,
1691}
1692#[derive(serde::Serialize, serde::Deserialize)]
1693#[serde(rename_all = "snake_case")]
1694#[derive(Clone, PartialEq, ::prost::Message)]
1695pub struct MetricThresholdCondition {
1696    #[prost(message, optional, tag = "1")]
1697    pub threshold: ::core::option::Option<f64>,
1698    #[prost(message, optional, tag = "2")]
1699    pub for_over_pct: ::core::option::Option<u32>,
1700    #[prost(message, optional, tag = "3")]
1701    pub of_the_last: ::core::option::Option<MetricTimeWindow>,
1702    #[prost(enumeration = "MetricThresholdConditionType", tag = "5")]
1703    pub condition_type: i32,
1704}
1705#[derive(serde::Serialize, serde::Deserialize)]
1706#[serde(rename_all = "snake_case")]
1707#[derive(Clone, PartialEq, ::prost::Message)]
1708pub struct TracingFilter {
1709    #[prost(oneof = "tracing_filter::FilterType", tags = "1")]
1710    pub filter_type: ::core::option::Option<tracing_filter::FilterType>,
1711}
1712/// Nested message and enum types in `TracingFilter`.
1713pub mod tracing_filter {
1714    #[derive(serde::Serialize, serde::Deserialize)]
1715    #[serde(rename_all = "snake_case")]
1716    #[derive(Clone, PartialEq, ::prost::Oneof)]
1717    pub enum FilterType {
1718        #[prost(message, tag = "1")]
1719        SimpleFilter(super::TracingSimpleFilter),
1720    }
1721}
1722#[derive(serde::Serialize, serde::Deserialize)]
1723#[serde(rename_all = "snake_case")]
1724#[derive(Clone, PartialEq, ::prost::Message)]
1725pub struct TracingSimpleFilter {
1726    #[prost(message, optional, tag = "1")]
1727    pub tracing_label_filters: ::core::option::Option<TracingLabelFilters>,
1728    #[prost(message, optional, tag = "2")]
1729    pub latency_threshold_ms: ::core::option::Option<u64>,
1730}
1731#[derive(serde::Serialize, serde::Deserialize)]
1732#[serde(rename_all = "snake_case")]
1733#[derive(Clone, PartialEq, ::prost::Message)]
1734pub struct TracingLabelFilters {
1735    #[prost(message, repeated, tag = "1")]
1736    pub application_name: ::prost::alloc::vec::Vec<TracingFilterType>,
1737    #[prost(message, repeated, tag = "2")]
1738    pub subsystem_name: ::prost::alloc::vec::Vec<TracingFilterType>,
1739    #[prost(message, repeated, tag = "3")]
1740    pub service_name: ::prost::alloc::vec::Vec<TracingFilterType>,
1741    #[prost(message, repeated, tag = "4")]
1742    pub operation_name: ::prost::alloc::vec::Vec<TracingFilterType>,
1743    #[prost(message, repeated, tag = "5")]
1744    pub span_fields: ::prost::alloc::vec::Vec<TracingSpanFieldsFilterType>,
1745}
1746#[derive(serde::Serialize, serde::Deserialize)]
1747#[serde(rename_all = "snake_case")]
1748#[derive(Clone, PartialEq, ::prost::Message)]
1749pub struct TracingSpanFieldsFilterType {
1750    #[prost(message, optional, tag = "1")]
1751    pub key: ::core::option::Option<::prost::alloc::string::String>,
1752    #[prost(message, optional, tag = "2")]
1753    pub filter_type: ::core::option::Option<TracingFilterType>,
1754}
1755#[derive(serde::Serialize, serde::Deserialize)]
1756#[serde(rename_all = "snake_case")]
1757#[derive(Clone, PartialEq, ::prost::Message)]
1758pub struct TracingFilterType {
1759    #[prost(message, repeated, tag = "1")]
1760    pub values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1761    #[prost(enumeration = "TracingFilterOperationType", tag = "2")]
1762    pub operation: i32,
1763}
1764#[derive(serde::Serialize, serde::Deserialize)]
1765#[serde(rename_all = "snake_case")]
1766#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1767#[repr(i32)]
1768pub enum TracingFilterOperationType {
1769    IsOrUnspecified = 0,
1770    Includes = 1,
1771    EndsWith = 2,
1772    StartsWith = 3,
1773    IsNot = 4,
1774}
1775impl TracingFilterOperationType {
1776    /// String value of the enum field names used in the ProtoBuf definition.
1777    ///
1778    /// The values are not transformed in any way and thus are considered stable
1779    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1780    pub fn as_str_name(&self) -> &'static str {
1781        match self {
1782            Self::IsOrUnspecified => "TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED",
1783            Self::Includes => "TRACING_FILTER_OPERATION_TYPE_INCLUDES",
1784            Self::EndsWith => "TRACING_FILTER_OPERATION_TYPE_ENDS_WITH",
1785            Self::StartsWith => "TRACING_FILTER_OPERATION_TYPE_STARTS_WITH",
1786            Self::IsNot => "TRACING_FILTER_OPERATION_TYPE_IS_NOT",
1787        }
1788    }
1789    /// Creates an enum from field names used in the ProtoBuf definition.
1790    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1791        match value {
1792            "TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED" => {
1793                Some(Self::IsOrUnspecified)
1794            }
1795            "TRACING_FILTER_OPERATION_TYPE_INCLUDES" => Some(Self::Includes),
1796            "TRACING_FILTER_OPERATION_TYPE_ENDS_WITH" => Some(Self::EndsWith),
1797            "TRACING_FILTER_OPERATION_TYPE_STARTS_WITH" => Some(Self::StartsWith),
1798            "TRACING_FILTER_OPERATION_TYPE_IS_NOT" => Some(Self::IsNot),
1799            _ => None,
1800        }
1801    }
1802}
1803#[derive(serde::Serialize, serde::Deserialize)]
1804#[serde(rename_all = "snake_case")]
1805#[derive(Clone, PartialEq, ::prost::Message)]
1806pub struct TracingImmediateType {
1807    #[prost(message, optional, tag = "1")]
1808    pub tracing_filter: ::core::option::Option<TracingFilter>,
1809    #[prost(message, repeated, tag = "2")]
1810    pub notification_payload_filter: ::prost::alloc::vec::Vec<
1811        ::prost::alloc::string::String,
1812    >,
1813}
1814#[derive(serde::Serialize, serde::Deserialize)]
1815#[serde(rename_all = "snake_case")]
1816#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1817#[repr(i32)]
1818pub enum TracingThresholdConditionType {
1819    MoreThanOrUnspecified = 0,
1820}
1821impl TracingThresholdConditionType {
1822    /// String value of the enum field names used in the ProtoBuf definition.
1823    ///
1824    /// The values are not transformed in any way and thus are considered stable
1825    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1826    pub fn as_str_name(&self) -> &'static str {
1827        match self {
1828            Self::MoreThanOrUnspecified => {
1829                "TRACING_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"
1830            }
1831        }
1832    }
1833    /// Creates an enum from field names used in the ProtoBuf definition.
1834    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1835        match value {
1836            "TRACING_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED" => {
1837                Some(Self::MoreThanOrUnspecified)
1838            }
1839            _ => None,
1840        }
1841    }
1842}
1843#[derive(serde::Serialize, serde::Deserialize)]
1844#[serde(rename_all = "snake_case")]
1845#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1846pub struct TracingTimeWindow {
1847    #[prost(oneof = "tracing_time_window::Type", tags = "1")]
1848    pub r#type: ::core::option::Option<tracing_time_window::Type>,
1849}
1850/// Nested message and enum types in `TracingTimeWindow`.
1851pub mod tracing_time_window {
1852    #[derive(serde::Serialize, serde::Deserialize)]
1853    #[serde(rename_all = "snake_case")]
1854    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1855    pub enum Type {
1856        #[prost(enumeration = "super::TracingTimeWindowValue", tag = "1")]
1857        TracingTimeWindowValue(i32),
1858    }
1859}
1860#[derive(serde::Serialize, serde::Deserialize)]
1861#[serde(rename_all = "snake_case")]
1862#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1863#[repr(i32)]
1864pub enum TracingTimeWindowValue {
1865    Minutes5OrUnspecified = 0,
1866    Minutes10 = 1,
1867    Minutes15 = 2,
1868    Minutes20 = 11,
1869    Minutes30 = 3,
1870    Hour1 = 4,
1871    Hours2 = 5,
1872    Hours4 = 6,
1873    Hours6 = 7,
1874    Hours12 = 8,
1875    Hours24 = 9,
1876    Hours36 = 10,
1877}
1878impl TracingTimeWindowValue {
1879    /// String value of the enum field names used in the ProtoBuf definition.
1880    ///
1881    /// The values are not transformed in any way and thus are considered stable
1882    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1883    pub fn as_str_name(&self) -> &'static str {
1884        match self {
1885            Self::Minutes5OrUnspecified => {
1886                "TRACING_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED"
1887            }
1888            Self::Minutes10 => "TRACING_TIME_WINDOW_VALUE_MINUTES_10",
1889            Self::Minutes15 => "TRACING_TIME_WINDOW_VALUE_MINUTES_15",
1890            Self::Minutes20 => "TRACING_TIME_WINDOW_VALUE_MINUTES_20",
1891            Self::Minutes30 => "TRACING_TIME_WINDOW_VALUE_MINUTES_30",
1892            Self::Hour1 => "TRACING_TIME_WINDOW_VALUE_HOUR_1",
1893            Self::Hours2 => "TRACING_TIME_WINDOW_VALUE_HOURS_2",
1894            Self::Hours4 => "TRACING_TIME_WINDOW_VALUE_HOURS_4",
1895            Self::Hours6 => "TRACING_TIME_WINDOW_VALUE_HOURS_6",
1896            Self::Hours12 => "TRACING_TIME_WINDOW_VALUE_HOURS_12",
1897            Self::Hours24 => "TRACING_TIME_WINDOW_VALUE_HOURS_24",
1898            Self::Hours36 => "TRACING_TIME_WINDOW_VALUE_HOURS_36",
1899        }
1900    }
1901    /// Creates an enum from field names used in the ProtoBuf definition.
1902    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1903        match value {
1904            "TRACING_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED" => {
1905                Some(Self::Minutes5OrUnspecified)
1906            }
1907            "TRACING_TIME_WINDOW_VALUE_MINUTES_10" => Some(Self::Minutes10),
1908            "TRACING_TIME_WINDOW_VALUE_MINUTES_15" => Some(Self::Minutes15),
1909            "TRACING_TIME_WINDOW_VALUE_MINUTES_20" => Some(Self::Minutes20),
1910            "TRACING_TIME_WINDOW_VALUE_MINUTES_30" => Some(Self::Minutes30),
1911            "TRACING_TIME_WINDOW_VALUE_HOUR_1" => Some(Self::Hour1),
1912            "TRACING_TIME_WINDOW_VALUE_HOURS_2" => Some(Self::Hours2),
1913            "TRACING_TIME_WINDOW_VALUE_HOURS_4" => Some(Self::Hours4),
1914            "TRACING_TIME_WINDOW_VALUE_HOURS_6" => Some(Self::Hours6),
1915            "TRACING_TIME_WINDOW_VALUE_HOURS_12" => Some(Self::Hours12),
1916            "TRACING_TIME_WINDOW_VALUE_HOURS_24" => Some(Self::Hours24),
1917            "TRACING_TIME_WINDOW_VALUE_HOURS_36" => Some(Self::Hours36),
1918            _ => None,
1919        }
1920    }
1921}
1922#[derive(serde::Serialize, serde::Deserialize)]
1923#[serde(rename_all = "snake_case")]
1924#[derive(Clone, PartialEq, ::prost::Message)]
1925pub struct TracingThresholdType {
1926    #[prost(message, optional, tag = "1")]
1927    pub tracing_filter: ::core::option::Option<TracingFilter>,
1928    #[prost(message, repeated, tag = "2")]
1929    pub rules: ::prost::alloc::vec::Vec<TracingThresholdRule>,
1930    #[prost(message, repeated, tag = "3")]
1931    pub notification_payload_filter: ::prost::alloc::vec::Vec<
1932        ::prost::alloc::string::String,
1933    >,
1934}
1935#[derive(serde::Serialize, serde::Deserialize)]
1936#[serde(rename_all = "snake_case")]
1937#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1938pub struct TracingThresholdRule {
1939    #[prost(message, optional, tag = "1")]
1940    pub condition: ::core::option::Option<TracingThresholdCondition>,
1941}
1942#[derive(serde::Serialize, serde::Deserialize)]
1943#[serde(rename_all = "snake_case")]
1944#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1945pub struct TracingThresholdCondition {
1946    #[prost(message, optional, tag = "1")]
1947    pub span_amount: ::core::option::Option<f64>,
1948    #[prost(message, optional, tag = "2")]
1949    pub time_window: ::core::option::Option<TracingTimeWindow>,
1950    #[prost(enumeration = "TracingThresholdConditionType", tag = "3")]
1951    pub condition_type: i32,
1952}
1953/// *
1954/// Represents an existing or created alert definition
1955#[derive(serde::Serialize, serde::Deserialize)]
1956#[serde(rename_all = "snake_case")]
1957#[derive(Clone, PartialEq, ::prost::Message)]
1958pub struct AlertDef {
1959    #[prost(message, optional, tag = "1")]
1960    pub alert_def_properties: ::core::option::Option<AlertDefProperties>,
1961    /// This is the alert definition's persistent ID (does not change on replace), AKA UniqueIdentifier
1962    #[prost(message, optional, tag = "2")]
1963    pub id: ::core::option::Option<::prost::alloc::string::String>,
1964    /// the old alertId
1965    #[prost(message, optional, tag = "20")]
1966    pub alert_version_id: ::core::option::Option<::prost::alloc::string::String>,
1967    #[prost(message, optional, tag = "3")]
1968    pub created_time: ::core::option::Option<::prost_wkt_types::Timestamp>,
1969    #[prost(message, optional, tag = "4")]
1970    pub updated_time: ::core::option::Option<::prost_wkt_types::Timestamp>,
1971}
1972/// *
1973/// Represents the non generated alert definition properties (the ones that are set by the user)
1974#[derive(serde::Serialize, serde::Deserialize)]
1975#[serde(rename_all = "snake_case")]
1976#[derive(Clone, PartialEq, ::prost::Message)]
1977pub struct AlertDefProperties {
1978    #[prost(message, optional, tag = "1")]
1979    pub name: ::core::option::Option<::prost::alloc::string::String>,
1980    #[prost(message, optional, tag = "2")]
1981    pub description: ::core::option::Option<::prost::alloc::string::String>,
1982    #[prost(message, optional, tag = "3")]
1983    pub enabled: ::core::option::Option<bool>,
1984    #[prost(enumeration = "AlertDefPriority", tag = "4")]
1985    pub priority: i32,
1986    #[prost(enumeration = "AlertDefType", tag = "6")]
1987    pub r#type: i32,
1988    #[prost(message, repeated, tag = "7")]
1989    pub group_by_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1990    #[prost(message, optional, tag = "8")]
1991    pub incidents_settings: ::core::option::Option<AlertDefIncidentSettings>,
1992    #[prost(message, optional, tag = "9")]
1993    pub notification_group: ::core::option::Option<AlertDefNotificationGroup>,
1994    #[deprecated]
1995    #[prost(message, repeated, tag = "210")]
1996    pub notification_group_excess: ::prost::alloc::vec::Vec<AlertDefNotificationGroup>,
1997    #[prost(map = "string, string", tag = "10")]
1998    pub entity_labels: ::std::collections::HashMap<
1999        ::prost::alloc::string::String,
2000        ::prost::alloc::string::String,
2001    >,
2002    #[prost(message, optional, tag = "11")]
2003    pub phantom_mode: ::core::option::Option<bool>,
2004    #[prost(message, optional, tag = "12")]
2005    pub deleted: ::core::option::Option<bool>,
2006    #[prost(oneof = "alert_def_properties::Schedule", tags = "5")]
2007    pub schedule: ::core::option::Option<alert_def_properties::Schedule>,
2008    #[prost(
2009        oneof = "alert_def_properties::TypeDefinition",
2010        tags = "101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112"
2011    )]
2012    pub type_definition: ::core::option::Option<alert_def_properties::TypeDefinition>,
2013}
2014/// Nested message and enum types in `AlertDefProperties`.
2015pub mod alert_def_properties {
2016    #[derive(serde::Serialize, serde::Deserialize)]
2017    #[serde(rename_all = "snake_case")]
2018    #[derive(Clone, PartialEq, ::prost::Oneof)]
2019    pub enum Schedule {
2020        #[prost(message, tag = "5")]
2021        ActiveOn(super::ActivitySchedule),
2022    }
2023    #[derive(serde::Serialize, serde::Deserialize)]
2024    #[serde(rename_all = "snake_case")]
2025    #[derive(Clone, PartialEq, ::prost::Oneof)]
2026    pub enum TypeDefinition {
2027        #[prost(message, tag = "101")]
2028        LogsImmediate(super::LogsImmediateType),
2029        #[prost(message, tag = "102")]
2030        TracingImmediate(super::TracingImmediateType),
2031        #[prost(message, tag = "103")]
2032        LogsThreshold(super::LogsThresholdType),
2033        #[prost(message, tag = "104")]
2034        LogsRatioThreshold(super::LogsRatioThresholdType),
2035        #[prost(message, tag = "105")]
2036        LogsTimeRelativeThreshold(super::LogsTimeRelativeThresholdType),
2037        #[prost(message, tag = "106")]
2038        MetricThreshold(super::MetricThresholdType),
2039        #[prost(message, tag = "107")]
2040        TracingThreshold(super::TracingThresholdType),
2041        #[prost(message, tag = "108")]
2042        Flow(super::FlowType),
2043        #[prost(message, tag = "109")]
2044        LogsAnomaly(super::LogsAnomalyType),
2045        #[prost(message, tag = "110")]
2046        MetricAnomaly(super::MetricAnomalyType),
2047        #[prost(message, tag = "111")]
2048        LogsNewValue(super::LogsNewValueType),
2049        #[prost(message, tag = "112")]
2050        LogsUniqueCount(super::LogsUniqueCountType),
2051    }
2052}
2053#[derive(serde::Serialize, serde::Deserialize)]
2054#[serde(rename_all = "snake_case")]
2055#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2056pub struct OrderBy {
2057    #[prost(enumeration = "OrderByFields", tag = "1")]
2058    pub field_name: i32,
2059    #[prost(enumeration = "OrderByDirection", tag = "2")]
2060    pub direction: i32,
2061}
2062#[derive(serde::Serialize, serde::Deserialize)]
2063#[serde(rename_all = "snake_case")]
2064#[derive(Clone, PartialEq, ::prost::Message)]
2065pub struct GetAlertDefRequest {
2066    /// Alert definition ID
2067    #[prost(message, optional, tag = "1")]
2068    pub id: ::core::option::Option<::prost::alloc::string::String>,
2069}
2070#[derive(serde::Serialize, serde::Deserialize)]
2071#[serde(rename_all = "snake_case")]
2072#[derive(Clone, PartialEq, ::prost::Message)]
2073pub struct GetAlertDefByVersionIdRequest {
2074    #[prost(message, optional, tag = "1")]
2075    pub alert_version_id: ::core::option::Option<::prost::alloc::string::String>,
2076}
2077#[derive(serde::Serialize, serde::Deserialize)]
2078#[serde(rename_all = "snake_case")]
2079#[derive(Clone, PartialEq, ::prost::Message)]
2080pub struct GetAlertDefResponse {
2081    #[prost(message, optional, tag = "1")]
2082    pub alert_def: ::core::option::Option<AlertDef>,
2083}
2084#[derive(serde::Serialize, serde::Deserialize)]
2085#[serde(rename_all = "snake_case")]
2086#[derive(Clone, PartialEq, ::prost::Message)]
2087pub struct GetAlertDefByVersionIdResponse {
2088    #[prost(message, optional, tag = "1")]
2089    pub alert_def: ::core::option::Option<AlertDef>,
2090}
2091#[derive(serde::Serialize, serde::Deserialize)]
2092#[serde(rename_all = "snake_case")]
2093#[derive(Clone, PartialEq, ::prost::Message)]
2094pub struct ListAlertDefsResponse {
2095    #[prost(message, repeated, tag = "1")]
2096    pub alert_defs: ::prost::alloc::vec::Vec<AlertDef>,
2097}
2098#[derive(serde::Serialize, serde::Deserialize)]
2099#[serde(rename_all = "snake_case")]
2100#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2101pub struct ListAlertDefsRequest {}
2102#[derive(serde::Serialize, serde::Deserialize)]
2103#[serde(rename_all = "snake_case")]
2104#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2105pub struct DownloadAlertsRequest {}
2106#[derive(serde::Serialize, serde::Deserialize)]
2107#[serde(rename_all = "snake_case")]
2108#[derive(Clone, PartialEq, ::prost::Message)]
2109pub struct DownloadAlertsResponse {
2110    #[prost(bytes = "vec", tag = "1")]
2111    pub content: ::prost::alloc::vec::Vec<u8>,
2112}
2113#[derive(serde::Serialize, serde::Deserialize)]
2114#[serde(rename_all = "snake_case")]
2115#[derive(Clone, PartialEq, ::prost::Message)]
2116pub struct BatchGetAlertDefRequest {
2117    #[prost(message, repeated, tag = "1")]
2118    pub ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2119}
2120#[derive(serde::Serialize, serde::Deserialize)]
2121#[serde(rename_all = "snake_case")]
2122#[derive(Clone, PartialEq, ::prost::Message)]
2123pub struct BatchGetAlertDefResponse {
2124    #[prost(map = "string, message", tag = "1")]
2125    pub alert_defs: ::std::collections::HashMap<
2126        ::prost::alloc::string::String,
2127        AlertDef,
2128    >,
2129    #[prost(message, repeated, tag = "2")]
2130    pub not_found_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2131}
2132#[derive(serde::Serialize, serde::Deserialize)]
2133#[serde(rename_all = "snake_case")]
2134#[derive(Clone, PartialEq, ::prost::Message)]
2135pub struct DeleteAlertDefRequest {
2136    /// Alert definition ID
2137    #[prost(message, optional, tag = "1")]
2138    pub id: ::core::option::Option<::prost::alloc::string::String>,
2139}
2140#[derive(serde::Serialize, serde::Deserialize)]
2141#[serde(rename_all = "snake_case")]
2142#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2143pub struct DeleteAlertDefResponse {}
2144#[derive(serde::Serialize, serde::Deserialize)]
2145#[serde(rename_all = "snake_case")]
2146#[derive(Clone, PartialEq, ::prost::Message)]
2147pub struct ReplaceAlertDefRequest {
2148    #[prost(message, optional, tag = "1")]
2149    pub alert_def_properties: ::core::option::Option<AlertDefProperties>,
2150    /// Alert definition ID
2151    #[prost(message, optional, tag = "2")]
2152    pub id: ::core::option::Option<::prost::alloc::string::String>,
2153}
2154#[derive(serde::Serialize, serde::Deserialize)]
2155#[serde(rename_all = "snake_case")]
2156#[derive(Clone, PartialEq, ::prost::Message)]
2157pub struct ReplaceAlertDefResponse {
2158    #[prost(message, optional, tag = "1")]
2159    pub alert_def: ::core::option::Option<AlertDef>,
2160}
2161#[derive(serde::Serialize, serde::Deserialize)]
2162#[serde(rename_all = "snake_case")]
2163#[derive(Clone, PartialEq, ::prost::Message)]
2164pub struct CreateAlertDefRequest {
2165    #[prost(message, optional, tag = "1")]
2166    pub alert_def_properties: ::core::option::Option<AlertDefProperties>,
2167}
2168#[derive(serde::Serialize, serde::Deserialize)]
2169#[serde(rename_all = "snake_case")]
2170#[derive(Clone, PartialEq, ::prost::Message)]
2171pub struct CreateAlertDefResponse {
2172    #[prost(message, optional, tag = "1")]
2173    pub alert_def: ::core::option::Option<AlertDef>,
2174}
2175/// message AlertExecutionRequest {
2176///   oneof request {
2177///     CreateAlertDefRequest create = 1;
2178///     ReplaceAlertDefRequest replace = 2;
2179///     DeleteAlertDefRequest delete = 3;
2180///   }
2181/// }
2182/// message AlertExecutionResponse {
2183///   oneof response {
2184///     CreateAlertDefResponse create = 1;
2185///     ReplaceAlertDefResponse replace = 2;
2186///     DeleteAlertDefResponse delete = 3;
2187///   }
2188/// }
2189/// message GetLimitsRequest {}
2190///
2191/// message GetLimitsResponse {
2192///   google.protobuf.StringValue company_id = 1;
2193///   google.protobuf.Int32Value limit = 2;
2194///   google.protobuf.Int32Value used = 3;
2195/// }
2196/// message ValidateAlertRequest {
2197///   Alert alert = 1;
2198/// }
2199/// message ValidateAlertResponse {
2200///   google.protobuf.BoolValue valid = 1;
2201/// }
2202#[derive(serde::Serialize, serde::Deserialize)]
2203#[serde(rename_all = "snake_case")]
2204#[derive(Clone, PartialEq, ::prost::Message)]
2205pub struct SetActiveRequest {
2206    /// Alert definition ID
2207    #[prost(message, optional, tag = "1")]
2208    pub id: ::core::option::Option<::prost::alloc::string::String>,
2209    #[prost(message, optional, tag = "2")]
2210    pub active: ::core::option::Option<bool>,
2211}
2212#[derive(serde::Serialize, serde::Deserialize)]
2213#[serde(rename_all = "snake_case")]
2214#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2215pub struct SetActiveResponse {}
2216#[derive(serde::Serialize, serde::Deserialize)]
2217#[serde(rename_all = "snake_case")]
2218#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2219#[repr(i32)]
2220pub enum OrderByDirection {
2221    AscOrUnspecified = 0,
2222    Desc = 1,
2223}
2224impl OrderByDirection {
2225    /// String value of the enum field names used in the ProtoBuf definition.
2226    ///
2227    /// The values are not transformed in any way and thus are considered stable
2228    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2229    pub fn as_str_name(&self) -> &'static str {
2230        match self {
2231            Self::AscOrUnspecified => "ORDER_BY_DIRECTION_ASC_OR_UNSPECIFIED",
2232            Self::Desc => "ORDER_BY_DIRECTION_DESC",
2233        }
2234    }
2235    /// Creates an enum from field names used in the ProtoBuf definition.
2236    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2237        match value {
2238            "ORDER_BY_DIRECTION_ASC_OR_UNSPECIFIED" => Some(Self::AscOrUnspecified),
2239            "ORDER_BY_DIRECTION_DESC" => Some(Self::Desc),
2240            _ => None,
2241        }
2242    }
2243}
2244#[derive(serde::Serialize, serde::Deserialize)]
2245#[serde(rename_all = "snake_case")]
2246#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2247#[repr(i32)]
2248pub enum OrderByFields {
2249    NameOrUnspecified = 0,
2250    Id = 1,
2251    Severity = 2,
2252    CreatedTime = 3,
2253    UpdatedTime = 4,
2254}
2255impl OrderByFields {
2256    /// String value of the enum field names used in the ProtoBuf definition.
2257    ///
2258    /// The values are not transformed in any way and thus are considered stable
2259    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2260    pub fn as_str_name(&self) -> &'static str {
2261        match self {
2262            Self::NameOrUnspecified => "ORDER_BY_FIELDS_NAME_OR_UNSPECIFIED",
2263            Self::Id => "ORDER_BY_FIELDS_ID",
2264            Self::Severity => "ORDER_BY_FIELDS_SEVERITY",
2265            Self::CreatedTime => "ORDER_BY_FIELDS_CREATED_TIME",
2266            Self::UpdatedTime => "ORDER_BY_FIELDS_UPDATED_TIME",
2267        }
2268    }
2269    /// Creates an enum from field names used in the ProtoBuf definition.
2270    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2271        match value {
2272            "ORDER_BY_FIELDS_NAME_OR_UNSPECIFIED" => Some(Self::NameOrUnspecified),
2273            "ORDER_BY_FIELDS_ID" => Some(Self::Id),
2274            "ORDER_BY_FIELDS_SEVERITY" => Some(Self::Severity),
2275            "ORDER_BY_FIELDS_CREATED_TIME" => Some(Self::CreatedTime),
2276            "ORDER_BY_FIELDS_UPDATED_TIME" => Some(Self::UpdatedTime),
2277            _ => None,
2278        }
2279    }
2280}
2281/// Generated client implementations.
2282pub mod alert_defs_service_client {
2283    #![allow(
2284        unused_variables,
2285        dead_code,
2286        missing_docs,
2287        clippy::wildcard_imports,
2288        clippy::let_unit_value,
2289    )]
2290    use tonic::codegen::*;
2291    use tonic::codegen::http::Uri;
2292    #[derive(Debug, Clone)]
2293    pub struct AlertDefsServiceClient<T> {
2294        inner: tonic::client::Grpc<T>,
2295    }
2296    impl AlertDefsServiceClient<tonic::transport::Channel> {
2297        /// Attempt to create a new client by connecting to a given endpoint.
2298        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2299        where
2300            D: TryInto<tonic::transport::Endpoint>,
2301            D::Error: Into<StdError>,
2302        {
2303            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2304            Ok(Self::new(conn))
2305        }
2306    }
2307    impl<T> AlertDefsServiceClient<T>
2308    where
2309        T: tonic::client::GrpcService<tonic::body::BoxBody>,
2310        T::Error: Into<StdError>,
2311        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2312        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2313    {
2314        pub fn new(inner: T) -> Self {
2315            let inner = tonic::client::Grpc::new(inner);
2316            Self { inner }
2317        }
2318        pub fn with_origin(inner: T, origin: Uri) -> Self {
2319            let inner = tonic::client::Grpc::with_origin(inner, origin);
2320            Self { inner }
2321        }
2322        pub fn with_interceptor<F>(
2323            inner: T,
2324            interceptor: F,
2325        ) -> AlertDefsServiceClient<InterceptedService<T, F>>
2326        where
2327            F: tonic::service::Interceptor,
2328            T::ResponseBody: Default,
2329            T: tonic::codegen::Service<
2330                http::Request<tonic::body::BoxBody>,
2331                Response = http::Response<
2332                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
2333                >,
2334            >,
2335            <T as tonic::codegen::Service<
2336                http::Request<tonic::body::BoxBody>,
2337            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2338        {
2339            AlertDefsServiceClient::new(InterceptedService::new(inner, interceptor))
2340        }
2341        /// Compress requests with the given encoding.
2342        ///
2343        /// This requires the server to support it otherwise it might respond with an
2344        /// error.
2345        #[must_use]
2346        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2347            self.inner = self.inner.send_compressed(encoding);
2348            self
2349        }
2350        /// Enable decompressing responses.
2351        #[must_use]
2352        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2353            self.inner = self.inner.accept_compressed(encoding);
2354            self
2355        }
2356        /// Limits the maximum size of a decoded message.
2357        ///
2358        /// Default: `4MB`
2359        #[must_use]
2360        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2361            self.inner = self.inner.max_decoding_message_size(limit);
2362            self
2363        }
2364        /// Limits the maximum size of an encoded message.
2365        ///
2366        /// Default: `usize::MAX`
2367        #[must_use]
2368        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2369            self.inner = self.inner.max_encoding_message_size(limit);
2370            self
2371        }
2372        /// Get Alert Def by non changing ID AKA UniqueIdentifier
2373        pub async fn get_alert_def(
2374            &mut self,
2375            request: impl tonic::IntoRequest<super::GetAlertDefRequest>,
2376        ) -> std::result::Result<
2377            tonic::Response<super::GetAlertDefResponse>,
2378            tonic::Status,
2379        > {
2380            self.inner
2381                .ready()
2382                .await
2383                .map_err(|e| {
2384                    tonic::Status::unknown(
2385                        format!("Service was not ready: {}", e.into()),
2386                    )
2387                })?;
2388            let codec = tonic::codec::ProstCodec::default();
2389            let path = http::uri::PathAndQuery::from_static(
2390                "/com.coralogixapis.alerts.v3.AlertDefsService/GetAlertDef",
2391            );
2392            let mut req = request.into_request();
2393            req.extensions_mut()
2394                .insert(
2395                    GrpcMethod::new(
2396                        "com.coralogixapis.alerts.v3.AlertDefsService",
2397                        "GetAlertDef",
2398                    ),
2399                );
2400            self.inner.unary(req, path, codec).await
2401        }
2402        pub async fn get_alert_def_by_version_id(
2403            &mut self,
2404            request: impl tonic::IntoRequest<super::GetAlertDefByVersionIdRequest>,
2405        ) -> std::result::Result<
2406            tonic::Response<super::GetAlertDefByVersionIdResponse>,
2407            tonic::Status,
2408        > {
2409            self.inner
2410                .ready()
2411                .await
2412                .map_err(|e| {
2413                    tonic::Status::unknown(
2414                        format!("Service was not ready: {}", e.into()),
2415                    )
2416                })?;
2417            let codec = tonic::codec::ProstCodec::default();
2418            let path = http::uri::PathAndQuery::from_static(
2419                "/com.coralogixapis.alerts.v3.AlertDefsService/GetAlertDefByVersionId",
2420            );
2421            let mut req = request.into_request();
2422            req.extensions_mut()
2423                .insert(
2424                    GrpcMethod::new(
2425                        "com.coralogixapis.alerts.v3.AlertDefsService",
2426                        "GetAlertDefByVersionId",
2427                    ),
2428                );
2429            self.inner.unary(req, path, codec).await
2430        }
2431        pub async fn create_alert_def(
2432            &mut self,
2433            request: impl tonic::IntoRequest<super::CreateAlertDefRequest>,
2434        ) -> std::result::Result<
2435            tonic::Response<super::CreateAlertDefResponse>,
2436            tonic::Status,
2437        > {
2438            self.inner
2439                .ready()
2440                .await
2441                .map_err(|e| {
2442                    tonic::Status::unknown(
2443                        format!("Service was not ready: {}", e.into()),
2444                    )
2445                })?;
2446            let codec = tonic::codec::ProstCodec::default();
2447            let path = http::uri::PathAndQuery::from_static(
2448                "/com.coralogixapis.alerts.v3.AlertDefsService/CreateAlertDef",
2449            );
2450            let mut req = request.into_request();
2451            req.extensions_mut()
2452                .insert(
2453                    GrpcMethod::new(
2454                        "com.coralogixapis.alerts.v3.AlertDefsService",
2455                        "CreateAlertDef",
2456                    ),
2457                );
2458            self.inner.unary(req, path, codec).await
2459        }
2460        pub async fn replace_alert_def(
2461            &mut self,
2462            request: impl tonic::IntoRequest<super::ReplaceAlertDefRequest>,
2463        ) -> std::result::Result<
2464            tonic::Response<super::ReplaceAlertDefResponse>,
2465            tonic::Status,
2466        > {
2467            self.inner
2468                .ready()
2469                .await
2470                .map_err(|e| {
2471                    tonic::Status::unknown(
2472                        format!("Service was not ready: {}", e.into()),
2473                    )
2474                })?;
2475            let codec = tonic::codec::ProstCodec::default();
2476            let path = http::uri::PathAndQuery::from_static(
2477                "/com.coralogixapis.alerts.v3.AlertDefsService/ReplaceAlertDef",
2478            );
2479            let mut req = request.into_request();
2480            req.extensions_mut()
2481                .insert(
2482                    GrpcMethod::new(
2483                        "com.coralogixapis.alerts.v3.AlertDefsService",
2484                        "ReplaceAlertDef",
2485                    ),
2486                );
2487            self.inner.unary(req, path, codec).await
2488        }
2489        pub async fn list_alert_defs(
2490            &mut self,
2491            request: impl tonic::IntoRequest<super::ListAlertDefsRequest>,
2492        ) -> std::result::Result<
2493            tonic::Response<super::ListAlertDefsResponse>,
2494            tonic::Status,
2495        > {
2496            self.inner
2497                .ready()
2498                .await
2499                .map_err(|e| {
2500                    tonic::Status::unknown(
2501                        format!("Service was not ready: {}", e.into()),
2502                    )
2503                })?;
2504            let codec = tonic::codec::ProstCodec::default();
2505            let path = http::uri::PathAndQuery::from_static(
2506                "/com.coralogixapis.alerts.v3.AlertDefsService/ListAlertDefs",
2507            );
2508            let mut req = request.into_request();
2509            req.extensions_mut()
2510                .insert(
2511                    GrpcMethod::new(
2512                        "com.coralogixapis.alerts.v3.AlertDefsService",
2513                        "ListAlertDefs",
2514                    ),
2515                );
2516            self.inner.unary(req, path, codec).await
2517        }
2518        pub async fn download_alerts(
2519            &mut self,
2520            request: impl tonic::IntoRequest<super::DownloadAlertsRequest>,
2521        ) -> std::result::Result<
2522            tonic::Response<tonic::codec::Streaming<super::DownloadAlertsResponse>>,
2523            tonic::Status,
2524        > {
2525            self.inner
2526                .ready()
2527                .await
2528                .map_err(|e| {
2529                    tonic::Status::unknown(
2530                        format!("Service was not ready: {}", e.into()),
2531                    )
2532                })?;
2533            let codec = tonic::codec::ProstCodec::default();
2534            let path = http::uri::PathAndQuery::from_static(
2535                "/com.coralogixapis.alerts.v3.AlertDefsService/DownloadAlerts",
2536            );
2537            let mut req = request.into_request();
2538            req.extensions_mut()
2539                .insert(
2540                    GrpcMethod::new(
2541                        "com.coralogixapis.alerts.v3.AlertDefsService",
2542                        "DownloadAlerts",
2543                    ),
2544                );
2545            self.inner.server_streaming(req, path, codec).await
2546        }
2547        pub async fn delete_alert_def(
2548            &mut self,
2549            request: impl tonic::IntoRequest<super::DeleteAlertDefRequest>,
2550        ) -> std::result::Result<
2551            tonic::Response<super::DeleteAlertDefResponse>,
2552            tonic::Status,
2553        > {
2554            self.inner
2555                .ready()
2556                .await
2557                .map_err(|e| {
2558                    tonic::Status::unknown(
2559                        format!("Service was not ready: {}", e.into()),
2560                    )
2561                })?;
2562            let codec = tonic::codec::ProstCodec::default();
2563            let path = http::uri::PathAndQuery::from_static(
2564                "/com.coralogixapis.alerts.v3.AlertDefsService/DeleteAlertDef",
2565            );
2566            let mut req = request.into_request();
2567            req.extensions_mut()
2568                .insert(
2569                    GrpcMethod::new(
2570                        "com.coralogixapis.alerts.v3.AlertDefsService",
2571                        "DeleteAlertDef",
2572                    ),
2573                );
2574            self.inner.unary(req, path, codec).await
2575        }
2576        pub async fn set_active(
2577            &mut self,
2578            request: impl tonic::IntoRequest<super::SetActiveRequest>,
2579        ) -> std::result::Result<
2580            tonic::Response<super::SetActiveResponse>,
2581            tonic::Status,
2582        > {
2583            self.inner
2584                .ready()
2585                .await
2586                .map_err(|e| {
2587                    tonic::Status::unknown(
2588                        format!("Service was not ready: {}", e.into()),
2589                    )
2590                })?;
2591            let codec = tonic::codec::ProstCodec::default();
2592            let path = http::uri::PathAndQuery::from_static(
2593                "/com.coralogixapis.alerts.v3.AlertDefsService/SetActive",
2594            );
2595            let mut req = request.into_request();
2596            req.extensions_mut()
2597                .insert(
2598                    GrpcMethod::new(
2599                        "com.coralogixapis.alerts.v3.AlertDefsService",
2600                        "SetActive",
2601                    ),
2602                );
2603            self.inner.unary(req, path, codec).await
2604        }
2605    }
2606}