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