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