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, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
187#[repr(i32)]
188pub enum AlertDefStatus {
189 Unspecified = 0,
190 Alerting = 1,
191 Ok = 2,
192 NoData = 3,
193}
194impl AlertDefStatus {
195 pub fn as_str_name(&self) -> &'static str {
200 match self {
201 Self::Unspecified => "ALERT_DEF_STATUS_UNSPECIFIED",
202 Self::Alerting => "ALERT_DEF_STATUS_ALERTING",
203 Self::Ok => "ALERT_DEF_STATUS_OK",
204 Self::NoData => "ALERT_DEF_STATUS_NO_DATA",
205 }
206 }
207 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
209 match value {
210 "ALERT_DEF_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
211 "ALERT_DEF_STATUS_ALERTING" => Some(Self::Alerting),
212 "ALERT_DEF_STATUS_OK" => Some(Self::Ok),
213 "ALERT_DEF_STATUS_NO_DATA" => Some(Self::NoData),
214 _ => None,
215 }
216 }
217}
218#[derive(serde::Serialize, serde::Deserialize)]
219#[serde(rename_all = "snake_case")]
220#[derive(Clone, PartialEq, ::prost::Message)]
221pub struct NotificationDestination {
222 #[prost(string, tag = "1")]
223 pub connector_id: ::prost::alloc::string::String,
224 #[prost(string, optional, tag = "2")]
225 pub preset_id: ::core::option::Option<::prost::alloc::string::String>,
226 #[prost(enumeration = "NotifyOn", tag = "3")]
227 pub notify_on: i32,
228 #[prost(message, optional, tag = "4")]
229 pub triggered_routing_overrides: ::core::option::Option<NotificationRouting>,
230 #[prost(message, optional, tag = "5")]
231 pub resolved_route_overrides: ::core::option::Option<NotificationRouting>,
232}
233#[derive(serde::Serialize, serde::Deserialize)]
234#[serde(rename_all = "snake_case")]
235#[derive(Clone, PartialEq, ::prost::Message)]
236pub struct NotificationRouting {
237 #[prost(message, optional, tag = "1")]
238 pub config_overrides: ::core::option::Option<SourceOverrides>,
239}
240#[derive(serde::Serialize, serde::Deserialize)]
241#[serde(rename_all = "snake_case")]
242#[derive(Clone, PartialEq, ::prost::Message)]
243pub struct SourceOverrides {
244 #[prost(string, tag = "1")]
245 pub payload_type: ::prost::alloc::string::String,
246 #[prost(message, repeated, tag = "2")]
247 pub message_config_fields: ::prost::alloc::vec::Vec<MessageConfigField>,
248 #[prost(message, repeated, tag = "3")]
249 pub connector_config_fields: ::prost::alloc::vec::Vec<ConnectorConfigField>,
250}
251#[derive(serde::Serialize, serde::Deserialize)]
252#[serde(rename_all = "snake_case")]
253#[derive(Clone, PartialEq, ::prost::Message)]
254pub struct ConnectorConfigField {
255 #[prost(string, tag = "1")]
256 pub field_name: ::prost::alloc::string::String,
257 #[prost(string, tag = "2")]
258 pub template: ::prost::alloc::string::String,
259}
260#[derive(serde::Serialize, serde::Deserialize)]
261#[serde(rename_all = "snake_case")]
262#[derive(Clone, PartialEq, ::prost::Message)]
263pub struct MessageConfigField {
264 #[prost(string, tag = "1")]
265 pub field_name: ::prost::alloc::string::String,
266 #[prost(string, tag = "2")]
267 pub template: ::prost::alloc::string::String,
268}
269#[derive(serde::Serialize, serde::Deserialize)]
270#[serde(rename_all = "snake_case")]
271#[derive(Clone, PartialEq, ::prost::Message)]
272pub struct NotificationRouter {
273 #[prost(string, tag = "1")]
274 pub id: ::prost::alloc::string::String,
275 #[prost(enumeration = "NotifyOn", optional, tag = "2")]
276 pub notify_on: ::core::option::Option<i32>,
277}
278#[derive(serde::Serialize, serde::Deserialize)]
279#[serde(rename_all = "snake_case")]
280#[derive(Clone, Copy, PartialEq, ::prost::Message)]
281pub struct AlertDefIncidentSettings {
282 #[prost(enumeration = "NotifyOn", tag = "2")]
283 pub notify_on: i32,
284 #[prost(oneof = "alert_def_incident_settings::RetriggeringPeriod", tags = "100")]
285 pub retriggering_period: ::core::option::Option<
286 alert_def_incident_settings::RetriggeringPeriod,
287 >,
288}
289pub mod alert_def_incident_settings {
291 #[derive(serde::Serialize, serde::Deserialize)]
292 #[serde(rename_all = "snake_case")]
293 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
294 pub enum RetriggeringPeriod {
295 #[prost(message, tag = "100")]
296 Minutes(u32),
297 }
298}
299#[derive(serde::Serialize, serde::Deserialize)]
300#[serde(rename_all = "snake_case")]
301#[derive(Clone, PartialEq, ::prost::Message)]
302pub struct AlertDefNotificationGroup {
303 #[prost(message, repeated, tag = "1")]
304 pub group_by_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
305 #[prost(message, repeated, tag = "2")]
306 pub webhooks: ::prost::alloc::vec::Vec<AlertDefWebhooksSettings>,
307 #[prost(message, repeated, tag = "3")]
308 pub destinations: ::prost::alloc::vec::Vec<NotificationDestination>,
309 #[prost(message, optional, tag = "4")]
310 pub router: ::core::option::Option<NotificationRouter>,
311}
312#[derive(serde::Serialize, serde::Deserialize)]
313#[serde(rename_all = "snake_case")]
314#[derive(Clone, PartialEq, ::prost::Message)]
315pub struct AlertDefWebhooksSettings {
316 #[prost(enumeration = "NotifyOn", optional, tag = "1")]
317 pub notify_on: ::core::option::Option<i32>,
318 #[prost(message, optional, tag = "2")]
319 pub integration: ::core::option::Option<IntegrationType>,
320 #[prost(oneof = "alert_def_webhooks_settings::RetriggeringPeriod", tags = "100")]
321 pub retriggering_period: ::core::option::Option<
322 alert_def_webhooks_settings::RetriggeringPeriod,
323 >,
324}
325pub mod alert_def_webhooks_settings {
327 #[derive(serde::Serialize, serde::Deserialize)]
328 #[serde(rename_all = "snake_case")]
329 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
330 pub enum RetriggeringPeriod {
331 #[prost(message, tag = "100")]
332 Minutes(u32),
333 }
334}
335#[derive(serde::Serialize, serde::Deserialize)]
336#[serde(rename_all = "snake_case")]
337#[derive(Clone, PartialEq, ::prost::Message)]
338pub struct IntegrationType {
339 #[prost(oneof = "integration_type::IntegrationType", tags = "2, 3")]
340 pub integration_type: ::core::option::Option<integration_type::IntegrationType>,
341}
342pub mod integration_type {
344 #[derive(serde::Serialize, serde::Deserialize)]
345 #[serde(rename_all = "snake_case")]
346 #[derive(Clone, PartialEq, ::prost::Oneof)]
347 pub enum IntegrationType {
348 #[prost(message, tag = "2")]
349 IntegrationId(u32),
350 #[prost(message, tag = "3")]
351 Recipients(super::Recipients),
352 }
353}
354#[derive(serde::Serialize, serde::Deserialize)]
355#[serde(rename_all = "snake_case")]
356#[derive(Clone, PartialEq, ::prost::Message)]
357pub struct Recipients {
358 #[prost(message, repeated, tag = "1")]
359 pub emails: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
360}
361#[derive(serde::Serialize, serde::Deserialize)]
362#[serde(rename_all = "snake_case")]
363#[derive(Clone, PartialEq, ::prost::Message)]
364pub struct Priority {
365 #[prost(enumeration = "AlertDefPriority", tag = "1")]
366 pub value: i32,
367 #[prost(message, optional, tag = "2")]
368 pub name: ::core::option::Option<::prost::alloc::string::String>,
369}
370#[derive(serde::Serialize, serde::Deserialize)]
371#[serde(rename_all = "snake_case")]
372#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
373#[repr(i32)]
374pub enum AlertDefPriority {
375 P5OrUnspecified = 0,
376 P4 = 1,
377 P3 = 2,
378 P2 = 3,
379 P1 = 4,
380}
381impl AlertDefPriority {
382 pub fn as_str_name(&self) -> &'static str {
387 match self {
388 Self::P5OrUnspecified => "ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED",
389 Self::P4 => "ALERT_DEF_PRIORITY_P4",
390 Self::P3 => "ALERT_DEF_PRIORITY_P3",
391 Self::P2 => "ALERT_DEF_PRIORITY_P2",
392 Self::P1 => "ALERT_DEF_PRIORITY_P1",
393 }
394 }
395 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
397 match value {
398 "ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED" => Some(Self::P5OrUnspecified),
399 "ALERT_DEF_PRIORITY_P4" => Some(Self::P4),
400 "ALERT_DEF_PRIORITY_P3" => Some(Self::P3),
401 "ALERT_DEF_PRIORITY_P2" => Some(Self::P2),
402 "ALERT_DEF_PRIORITY_P1" => Some(Self::P1),
403 _ => None,
404 }
405 }
406}
407#[derive(serde::Serialize, serde::Deserialize)]
408#[serde(rename_all = "snake_case")]
409#[derive(Clone, PartialEq, ::prost::Message)]
410pub struct ActivitySchedule {
411 #[prost(enumeration = "DayOfWeek", repeated, packed = "false", tag = "1")]
412 pub day_of_week: ::prost::alloc::vec::Vec<i32>,
413 #[prost(message, optional, tag = "2")]
414 pub start_time: ::core::option::Option<TimeOfDay>,
415 #[prost(message, optional, tag = "3")]
416 pub end_time: ::core::option::Option<TimeOfDay>,
417}
418#[derive(serde::Serialize, serde::Deserialize)]
419#[serde(rename_all = "snake_case")]
420#[derive(Clone, Copy, PartialEq, ::prost::Message)]
421pub struct TimeOfDay {
422 #[prost(int32, tag = "1")]
424 pub hours: i32,
425 #[prost(int32, tag = "2")]
427 pub minutes: i32,
428}
429#[derive(serde::Serialize, serde::Deserialize)]
430#[serde(rename_all = "snake_case")]
431#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
432#[repr(i32)]
433pub enum DayOfWeek {
434 MondayOrUnspecified = 0,
435 Tuesday = 1,
436 Wednesday = 2,
437 Thursday = 3,
438 Friday = 4,
439 Saturday = 5,
440 Sunday = 6,
441}
442impl DayOfWeek {
443 pub fn as_str_name(&self) -> &'static str {
448 match self {
449 Self::MondayOrUnspecified => "DAY_OF_WEEK_MONDAY_OR_UNSPECIFIED",
450 Self::Tuesday => "DAY_OF_WEEK_TUESDAY",
451 Self::Wednesday => "DAY_OF_WEEK_WEDNESDAY",
452 Self::Thursday => "DAY_OF_WEEK_THURSDAY",
453 Self::Friday => "DAY_OF_WEEK_FRIDAY",
454 Self::Saturday => "DAY_OF_WEEK_SATURDAY",
455 Self::Sunday => "DAY_OF_WEEK_SUNDAY",
456 }
457 }
458 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
460 match value {
461 "DAY_OF_WEEK_MONDAY_OR_UNSPECIFIED" => Some(Self::MondayOrUnspecified),
462 "DAY_OF_WEEK_TUESDAY" => Some(Self::Tuesday),
463 "DAY_OF_WEEK_WEDNESDAY" => Some(Self::Wednesday),
464 "DAY_OF_WEEK_THURSDAY" => Some(Self::Thursday),
465 "DAY_OF_WEEK_FRIDAY" => Some(Self::Friday),
466 "DAY_OF_WEEK_SATURDAY" => Some(Self::Saturday),
467 "DAY_OF_WEEK_SUNDAY" => Some(Self::Sunday),
468 _ => None,
469 }
470 }
471}
472#[derive(serde::Serialize, serde::Deserialize)]
473#[serde(rename_all = "snake_case")]
474#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
475#[repr(i32)]
476pub enum AlertDefType {
477 LogsImmediateOrUnspecified = 0,
478 LogsThreshold = 1,
479 LogsAnomaly = 3,
480 LogsRatioThreshold = 4,
481 LogsNewValue = 6,
482 LogsUniqueCount = 7,
483 LogsTimeRelativeThreshold = 8,
484 MetricThreshold = 10,
485 MetricAnomaly = 14,
486 TracingImmediate = 15,
487 TracingThreshold = 16,
488 Flow = 17,
489 SloThreshold = 18,
490}
491impl AlertDefType {
492 pub fn as_str_name(&self) -> &'static str {
497 match self {
498 Self::LogsImmediateOrUnspecified => {
499 "ALERT_DEF_TYPE_LOGS_IMMEDIATE_OR_UNSPECIFIED"
500 }
501 Self::LogsThreshold => "ALERT_DEF_TYPE_LOGS_THRESHOLD",
502 Self::LogsAnomaly => "ALERT_DEF_TYPE_LOGS_ANOMALY",
503 Self::LogsRatioThreshold => "ALERT_DEF_TYPE_LOGS_RATIO_THRESHOLD",
504 Self::LogsNewValue => "ALERT_DEF_TYPE_LOGS_NEW_VALUE",
505 Self::LogsUniqueCount => "ALERT_DEF_TYPE_LOGS_UNIQUE_COUNT",
506 Self::LogsTimeRelativeThreshold => {
507 "ALERT_DEF_TYPE_LOGS_TIME_RELATIVE_THRESHOLD"
508 }
509 Self::MetricThreshold => "ALERT_DEF_TYPE_METRIC_THRESHOLD",
510 Self::MetricAnomaly => "ALERT_DEF_TYPE_METRIC_ANOMALY",
511 Self::TracingImmediate => "ALERT_DEF_TYPE_TRACING_IMMEDIATE",
512 Self::TracingThreshold => "ALERT_DEF_TYPE_TRACING_THRESHOLD",
513 Self::Flow => "ALERT_DEF_TYPE_FLOW",
514 Self::SloThreshold => "ALERT_DEF_TYPE_SLO_THRESHOLD",
515 }
516 }
517 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
519 match value {
520 "ALERT_DEF_TYPE_LOGS_IMMEDIATE_OR_UNSPECIFIED" => {
521 Some(Self::LogsImmediateOrUnspecified)
522 }
523 "ALERT_DEF_TYPE_LOGS_THRESHOLD" => Some(Self::LogsThreshold),
524 "ALERT_DEF_TYPE_LOGS_ANOMALY" => Some(Self::LogsAnomaly),
525 "ALERT_DEF_TYPE_LOGS_RATIO_THRESHOLD" => Some(Self::LogsRatioThreshold),
526 "ALERT_DEF_TYPE_LOGS_NEW_VALUE" => Some(Self::LogsNewValue),
527 "ALERT_DEF_TYPE_LOGS_UNIQUE_COUNT" => Some(Self::LogsUniqueCount),
528 "ALERT_DEF_TYPE_LOGS_TIME_RELATIVE_THRESHOLD" => {
529 Some(Self::LogsTimeRelativeThreshold)
530 }
531 "ALERT_DEF_TYPE_METRIC_THRESHOLD" => Some(Self::MetricThreshold),
532 "ALERT_DEF_TYPE_METRIC_ANOMALY" => Some(Self::MetricAnomaly),
533 "ALERT_DEF_TYPE_TRACING_IMMEDIATE" => Some(Self::TracingImmediate),
534 "ALERT_DEF_TYPE_TRACING_THRESHOLD" => Some(Self::TracingThreshold),
535 "ALERT_DEF_TYPE_FLOW" => Some(Self::Flow),
536 "ALERT_DEF_TYPE_SLO_THRESHOLD" => Some(Self::SloThreshold),
537 _ => None,
538 }
539 }
540}
541#[derive(serde::Serialize, serde::Deserialize)]
542#[serde(rename_all = "snake_case")]
543#[derive(Clone, PartialEq, ::prost::Message)]
544pub struct FlowType {
545 #[prost(message, repeated, tag = "1")]
546 pub stages: ::prost::alloc::vec::Vec<FlowStages>,
547 #[prost(message, optional, tag = "2")]
548 pub enforce_suppression: ::core::option::Option<bool>,
549}
550#[derive(serde::Serialize, serde::Deserialize)]
551#[serde(rename_all = "snake_case")]
552#[derive(Clone, PartialEq, ::prost::Message)]
553pub struct FlowStages {
554 #[prost(message, optional, tag = "3")]
555 pub timeframe_ms: ::core::option::Option<i64>,
556 #[prost(enumeration = "TimeframeType", tag = "4")]
557 pub timeframe_type: i32,
558 #[prost(oneof = "flow_stages::FlowStages", tags = "10")]
559 pub flow_stages: ::core::option::Option<flow_stages::FlowStages>,
560}
561pub mod flow_stages {
563 #[derive(serde::Serialize, serde::Deserialize)]
564 #[serde(rename_all = "snake_case")]
565 #[derive(Clone, PartialEq, ::prost::Oneof)]
566 pub enum FlowStages {
567 #[prost(message, tag = "10")]
568 FlowStagesGroups(super::FlowStagesGroups),
569 }
570}
571#[derive(serde::Serialize, serde::Deserialize)]
572#[serde(rename_all = "snake_case")]
573#[derive(Clone, PartialEq, ::prost::Message)]
574pub struct FlowStagesGroups {
575 #[prost(message, repeated, tag = "1")]
576 pub groups: ::prost::alloc::vec::Vec<FlowStagesGroup>,
577}
578#[derive(serde::Serialize, serde::Deserialize)]
579#[serde(rename_all = "snake_case")]
580#[derive(Clone, PartialEq, ::prost::Message)]
581pub struct FlowStagesGroup {
582 #[prost(message, repeated, tag = "1")]
583 pub alert_defs: ::prost::alloc::vec::Vec<FlowStagesGroupsAlertDefs>,
584 #[prost(enumeration = "NextOp", tag = "2")]
585 pub next_op: i32,
586 #[prost(enumeration = "AlertsOp", tag = "3")]
587 pub alerts_op: i32,
588}
589#[derive(serde::Serialize, serde::Deserialize)]
590#[serde(rename_all = "snake_case")]
591#[derive(Clone, PartialEq, ::prost::Message)]
592pub struct FlowStagesGroupsAlertDefs {
593 #[prost(message, optional, tag = "1")]
594 pub id: ::core::option::Option<::prost::alloc::string::String>,
595 #[prost(message, optional, tag = "2")]
596 pub not: ::core::option::Option<bool>,
597}
598#[derive(serde::Serialize, serde::Deserialize)]
599#[serde(rename_all = "snake_case")]
600#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
601#[repr(i32)]
602pub enum NextOp {
603 AndOrUnspecified = 0,
604 Or = 1,
605}
606impl NextOp {
607 pub fn as_str_name(&self) -> &'static str {
612 match self {
613 Self::AndOrUnspecified => "NEXT_OP_AND_OR_UNSPECIFIED",
614 Self::Or => "NEXT_OP_OR",
615 }
616 }
617 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
619 match value {
620 "NEXT_OP_AND_OR_UNSPECIFIED" => Some(Self::AndOrUnspecified),
621 "NEXT_OP_OR" => Some(Self::Or),
622 _ => None,
623 }
624 }
625}
626#[derive(serde::Serialize, serde::Deserialize)]
627#[serde(rename_all = "snake_case")]
628#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
629#[repr(i32)]
630pub enum AlertsOp {
631 AndOrUnspecified = 0,
632 Or = 1,
633}
634impl AlertsOp {
635 pub fn as_str_name(&self) -> &'static str {
640 match self {
641 Self::AndOrUnspecified => "ALERTS_OP_AND_OR_UNSPECIFIED",
642 Self::Or => "ALERTS_OP_OR",
643 }
644 }
645 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
647 match value {
648 "ALERTS_OP_AND_OR_UNSPECIFIED" => Some(Self::AndOrUnspecified),
649 "ALERTS_OP_OR" => Some(Self::Or),
650 _ => None,
651 }
652 }
653}
654#[derive(serde::Serialize, serde::Deserialize)]
655#[serde(rename_all = "snake_case")]
656#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
657#[repr(i32)]
658pub enum TimeframeType {
659 Unspecified = 0,
660 UpTo = 1,
661}
662impl TimeframeType {
663 pub fn as_str_name(&self) -> &'static str {
668 match self {
669 Self::Unspecified => "TIMEFRAME_TYPE_UNSPECIFIED",
670 Self::UpTo => "TIMEFRAME_TYPE_UP_TO",
671 }
672 }
673 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
675 match value {
676 "TIMEFRAME_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
677 "TIMEFRAME_TYPE_UP_TO" => Some(Self::UpTo),
678 _ => None,
679 }
680 }
681}
682#[derive(serde::Serialize, serde::Deserialize)]
683#[serde(rename_all = "snake_case")]
684#[derive(Clone, Copy, PartialEq, ::prost::Message)]
685pub struct AnomalyAlertSettings {
686 #[prost(message, optional, tag = "1")]
687 pub percentage_of_deviation: ::core::option::Option<f32>,
688}
689#[derive(serde::Serialize, serde::Deserialize)]
690#[serde(rename_all = "snake_case")]
691#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
692#[repr(i32)]
693pub enum LogsAnomalyConditionType {
694 MoreThanUsualOrUnspecified = 0,
695}
696impl LogsAnomalyConditionType {
697 pub fn as_str_name(&self) -> &'static str {
702 match self {
703 Self::MoreThanUsualOrUnspecified => {
704 "LOGS_ANOMALY_CONDITION_TYPE_MORE_THAN_USUAL_OR_UNSPECIFIED"
705 }
706 }
707 }
708 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
710 match value {
711 "LOGS_ANOMALY_CONDITION_TYPE_MORE_THAN_USUAL_OR_UNSPECIFIED" => {
712 Some(Self::MoreThanUsualOrUnspecified)
713 }
714 _ => None,
715 }
716 }
717}
718#[derive(serde::Serialize, serde::Deserialize)]
719#[serde(rename_all = "snake_case")]
720#[derive(Clone, PartialEq, ::prost::Message)]
721pub struct LogsFilter {
722 #[prost(oneof = "logs_filter::FilterType", tags = "1")]
723 pub filter_type: ::core::option::Option<logs_filter::FilterType>,
724}
725pub mod logs_filter {
727 #[derive(serde::Serialize, serde::Deserialize)]
728 #[serde(rename_all = "snake_case")]
729 #[derive(Clone, PartialEq, ::prost::Oneof)]
730 pub enum FilterType {
731 #[prost(message, tag = "1")]
732 SimpleFilter(super::LogsSimpleFilter),
733 }
734}
735#[derive(serde::Serialize, serde::Deserialize)]
736#[serde(rename_all = "snake_case")]
737#[derive(Clone, PartialEq, ::prost::Message)]
738pub struct LogsSimpleFilter {
739 #[prost(message, optional, tag = "1")]
740 pub lucene_query: ::core::option::Option<::prost::alloc::string::String>,
741 #[prost(message, optional, tag = "2")]
742 pub label_filters: ::core::option::Option<LabelFilters>,
743}
744#[derive(serde::Serialize, serde::Deserialize)]
745#[serde(rename_all = "snake_case")]
746#[derive(Clone, PartialEq, ::prost::Message)]
747pub struct LabelFilters {
748 #[prost(message, repeated, tag = "1")]
749 pub application_name: ::prost::alloc::vec::Vec<LabelFilterType>,
750 #[prost(message, repeated, tag = "2")]
751 pub subsystem_name: ::prost::alloc::vec::Vec<LabelFilterType>,
752 #[prost(enumeration = "LogSeverity", repeated, tag = "3")]
753 pub severities: ::prost::alloc::vec::Vec<i32>,
754}
755#[derive(serde::Serialize, serde::Deserialize)]
756#[serde(rename_all = "snake_case")]
757#[derive(Clone, PartialEq, ::prost::Message)]
758pub struct LabelFilterType {
759 #[prost(message, optional, tag = "1")]
760 pub value: ::core::option::Option<::prost::alloc::string::String>,
761 #[prost(enumeration = "LogFilterOperationType", tag = "2")]
762 pub operation: i32,
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 LogFilterOperationType {
769 IsOrUnspecified = 0,
770 Includes = 1,
771 EndsWith = 2,
772 StartsWith = 3,
773}
774impl LogFilterOperationType {
775 pub fn as_str_name(&self) -> &'static str {
780 match self {
781 Self::IsOrUnspecified => "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED",
782 Self::Includes => "LOG_FILTER_OPERATION_TYPE_INCLUDES",
783 Self::EndsWith => "LOG_FILTER_OPERATION_TYPE_ENDS_WITH",
784 Self::StartsWith => "LOG_FILTER_OPERATION_TYPE_STARTS_WITH",
785 }
786 }
787 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
789 match value {
790 "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED" => Some(Self::IsOrUnspecified),
791 "LOG_FILTER_OPERATION_TYPE_INCLUDES" => Some(Self::Includes),
792 "LOG_FILTER_OPERATION_TYPE_ENDS_WITH" => Some(Self::EndsWith),
793 "LOG_FILTER_OPERATION_TYPE_STARTS_WITH" => Some(Self::StartsWith),
794 _ => None,
795 }
796 }
797}
798#[derive(serde::Serialize, serde::Deserialize)]
799#[serde(rename_all = "snake_case")]
800#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
801#[repr(i32)]
802pub enum LogSeverity {
803 VerboseUnspecified = 0,
804 Debug = 1,
805 Info = 2,
806 Warning = 3,
807 Error = 4,
808 Critical = 5,
809}
810impl LogSeverity {
811 pub fn as_str_name(&self) -> &'static str {
816 match self {
817 Self::VerboseUnspecified => "LOG_SEVERITY_VERBOSE_UNSPECIFIED",
818 Self::Debug => "LOG_SEVERITY_DEBUG",
819 Self::Info => "LOG_SEVERITY_INFO",
820 Self::Warning => "LOG_SEVERITY_WARNING",
821 Self::Error => "LOG_SEVERITY_ERROR",
822 Self::Critical => "LOG_SEVERITY_CRITICAL",
823 }
824 }
825 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
827 match value {
828 "LOG_SEVERITY_VERBOSE_UNSPECIFIED" => Some(Self::VerboseUnspecified),
829 "LOG_SEVERITY_DEBUG" => Some(Self::Debug),
830 "LOG_SEVERITY_INFO" => Some(Self::Info),
831 "LOG_SEVERITY_WARNING" => Some(Self::Warning),
832 "LOG_SEVERITY_ERROR" => Some(Self::Error),
833 "LOG_SEVERITY_CRITICAL" => Some(Self::Critical),
834 _ => None,
835 }
836 }
837}
838#[derive(serde::Serialize, serde::Deserialize)]
839#[serde(rename_all = "snake_case")]
840#[derive(Clone, Copy, PartialEq, ::prost::Message)]
841pub struct LogsTimeWindow {
842 #[prost(oneof = "logs_time_window::Type", tags = "1")]
843 pub r#type: ::core::option::Option<logs_time_window::Type>,
844}
845pub mod logs_time_window {
847 #[derive(serde::Serialize, serde::Deserialize)]
848 #[serde(rename_all = "snake_case")]
849 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
850 pub enum Type {
851 #[prost(enumeration = "super::LogsTimeWindowValue", tag = "1")]
852 LogsTimeWindowSpecificValue(i32),
853 }
854}
855#[derive(serde::Serialize, serde::Deserialize)]
856#[serde(rename_all = "snake_case")]
857#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
858#[repr(i32)]
859pub enum LogsTimeWindowValue {
860 Minutes5OrUnspecified = 0,
861 Minutes10 = 1,
862 Minutes20 = 2,
863 Minutes15 = 3,
864 Minutes30 = 4,
865 Hour1 = 5,
866 Hours2 = 6,
867 Hours4 = 7,
868 Hours6 = 8,
869 Hours12 = 9,
870 Hours24 = 10,
871 Hours36 = 11,
872}
873impl LogsTimeWindowValue {
874 pub fn as_str_name(&self) -> &'static str {
879 match self {
880 Self::Minutes5OrUnspecified => {
881 "LOGS_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED"
882 }
883 Self::Minutes10 => "LOGS_TIME_WINDOW_VALUE_MINUTES_10",
884 Self::Minutes20 => "LOGS_TIME_WINDOW_VALUE_MINUTES_20",
885 Self::Minutes15 => "LOGS_TIME_WINDOW_VALUE_MINUTES_15",
886 Self::Minutes30 => "LOGS_TIME_WINDOW_VALUE_MINUTES_30",
887 Self::Hour1 => "LOGS_TIME_WINDOW_VALUE_HOUR_1",
888 Self::Hours2 => "LOGS_TIME_WINDOW_VALUE_HOURS_2",
889 Self::Hours4 => "LOGS_TIME_WINDOW_VALUE_HOURS_4",
890 Self::Hours6 => "LOGS_TIME_WINDOW_VALUE_HOURS_6",
891 Self::Hours12 => "LOGS_TIME_WINDOW_VALUE_HOURS_12",
892 Self::Hours24 => "LOGS_TIME_WINDOW_VALUE_HOURS_24",
893 Self::Hours36 => "LOGS_TIME_WINDOW_VALUE_HOURS_36",
894 }
895 }
896 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
898 match value {
899 "LOGS_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED" => {
900 Some(Self::Minutes5OrUnspecified)
901 }
902 "LOGS_TIME_WINDOW_VALUE_MINUTES_10" => Some(Self::Minutes10),
903 "LOGS_TIME_WINDOW_VALUE_MINUTES_20" => Some(Self::Minutes20),
904 "LOGS_TIME_WINDOW_VALUE_MINUTES_15" => Some(Self::Minutes15),
905 "LOGS_TIME_WINDOW_VALUE_MINUTES_30" => Some(Self::Minutes30),
906 "LOGS_TIME_WINDOW_VALUE_HOUR_1" => Some(Self::Hour1),
907 "LOGS_TIME_WINDOW_VALUE_HOURS_2" => Some(Self::Hours2),
908 "LOGS_TIME_WINDOW_VALUE_HOURS_4" => Some(Self::Hours4),
909 "LOGS_TIME_WINDOW_VALUE_HOURS_6" => Some(Self::Hours6),
910 "LOGS_TIME_WINDOW_VALUE_HOURS_12" => Some(Self::Hours12),
911 "LOGS_TIME_WINDOW_VALUE_HOURS_24" => Some(Self::Hours24),
912 "LOGS_TIME_WINDOW_VALUE_HOURS_36" => Some(Self::Hours36),
913 _ => None,
914 }
915 }
916}
917#[derive(serde::Serialize, serde::Deserialize)]
918#[serde(rename_all = "snake_case")]
919#[derive(Clone, PartialEq, ::prost::Message)]
920pub struct LogsAnomalyType {
921 #[prost(message, optional, tag = "1")]
922 pub logs_filter: ::core::option::Option<LogsFilter>,
923 #[prost(message, repeated, tag = "2")]
924 pub rules: ::prost::alloc::vec::Vec<LogsAnomalyRule>,
925 #[prost(message, repeated, tag = "3")]
926 pub notification_payload_filter: ::prost::alloc::vec::Vec<
927 ::prost::alloc::string::String,
928 >,
929 #[prost(message, optional, tag = "4")]
930 pub evaluation_delay_ms: ::core::option::Option<i32>,
931 #[prost(message, optional, tag = "5")]
932 pub anomaly_alert_settings: ::core::option::Option<AnomalyAlertSettings>,
933}
934#[derive(serde::Serialize, serde::Deserialize)]
935#[serde(rename_all = "snake_case")]
936#[derive(Clone, Copy, PartialEq, ::prost::Message)]
937pub struct LogsAnomalyRule {
938 #[prost(message, optional, tag = "1")]
939 pub condition: ::core::option::Option<LogsAnomalyCondition>,
940}
941#[derive(serde::Serialize, serde::Deserialize)]
942#[serde(rename_all = "snake_case")]
943#[derive(Clone, Copy, PartialEq, ::prost::Message)]
944pub struct LogsAnomalyCondition {
945 #[prost(message, optional, tag = "1")]
946 pub minimum_threshold: ::core::option::Option<f64>,
947 #[prost(message, optional, tag = "2")]
948 pub time_window: ::core::option::Option<LogsTimeWindow>,
949 #[prost(enumeration = "LogsAnomalyConditionType", tag = "3")]
950 pub condition_type: i32,
951}
952#[derive(serde::Serialize, serde::Deserialize)]
953#[serde(rename_all = "snake_case")]
954#[derive(Clone, PartialEq, ::prost::Message)]
955pub struct LogsImmediateType {
956 #[prost(message, optional, tag = "1")]
957 pub logs_filter: ::core::option::Option<LogsFilter>,
958 #[prost(message, repeated, tag = "2")]
959 pub notification_payload_filter: ::prost::alloc::vec::Vec<
960 ::prost::alloc::string::String,
961 >,
962}
963#[derive(serde::Serialize, serde::Deserialize)]
964#[serde(rename_all = "snake_case")]
965#[derive(Clone, Copy, PartialEq, ::prost::Message)]
966pub struct LogsNewValueTimeWindow {
967 #[prost(oneof = "logs_new_value_time_window::Type", tags = "1")]
968 pub r#type: ::core::option::Option<logs_new_value_time_window::Type>,
969}
970pub mod logs_new_value_time_window {
972 #[derive(serde::Serialize, serde::Deserialize)]
973 #[serde(rename_all = "snake_case")]
974 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
975 pub enum Type {
976 #[prost(enumeration = "super::LogsNewValueTimeWindowValue", tag = "1")]
977 LogsNewValueTimeWindowSpecificValue(i32),
978 }
979}
980#[derive(serde::Serialize, serde::Deserialize)]
981#[serde(rename_all = "snake_case")]
982#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
983#[repr(i32)]
984pub enum LogsNewValueTimeWindowValue {
985 Hours12OrUnspecified = 0,
986 Hours24 = 1,
987 Hours48 = 2,
988 Hours72 = 3,
989 Week1 = 4,
990 Month1 = 5,
991 Months2 = 6,
992 Months3 = 7,
993}
994impl LogsNewValueTimeWindowValue {
995 pub fn as_str_name(&self) -> &'static str {
1000 match self {
1001 Self::Hours12OrUnspecified => {
1002 "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_12_OR_UNSPECIFIED"
1003 }
1004 Self::Hours24 => "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_24",
1005 Self::Hours48 => "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_48",
1006 Self::Hours72 => "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_72",
1007 Self::Week1 => "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_WEEK_1",
1008 Self::Month1 => "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_MONTH_1",
1009 Self::Months2 => "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_MONTHS_2",
1010 Self::Months3 => "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_MONTHS_3",
1011 }
1012 }
1013 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1015 match value {
1016 "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_12_OR_UNSPECIFIED" => {
1017 Some(Self::Hours12OrUnspecified)
1018 }
1019 "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_24" => Some(Self::Hours24),
1020 "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_48" => Some(Self::Hours48),
1021 "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_72" => Some(Self::Hours72),
1022 "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_WEEK_1" => Some(Self::Week1),
1023 "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_MONTH_1" => Some(Self::Month1),
1024 "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_MONTHS_2" => Some(Self::Months2),
1025 "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_MONTHS_3" => Some(Self::Months3),
1026 _ => None,
1027 }
1028 }
1029}
1030#[derive(serde::Serialize, serde::Deserialize)]
1031#[serde(rename_all = "snake_case")]
1032#[derive(Clone, PartialEq, ::prost::Message)]
1033pub struct LogsNewValueType {
1034 #[prost(message, optional, tag = "1")]
1035 pub logs_filter: ::core::option::Option<LogsFilter>,
1036 #[prost(message, repeated, tag = "2")]
1037 pub rules: ::prost::alloc::vec::Vec<LogsNewValueRule>,
1038 #[prost(message, repeated, tag = "3")]
1039 pub notification_payload_filter: ::prost::alloc::vec::Vec<
1040 ::prost::alloc::string::String,
1041 >,
1042}
1043#[derive(serde::Serialize, serde::Deserialize)]
1044#[serde(rename_all = "snake_case")]
1045#[derive(Clone, PartialEq, ::prost::Message)]
1046pub struct LogsNewValueRule {
1047 #[prost(message, optional, tag = "1")]
1048 pub condition: ::core::option::Option<LogsNewValueCondition>,
1049}
1050#[derive(serde::Serialize, serde::Deserialize)]
1051#[serde(rename_all = "snake_case")]
1052#[derive(Clone, PartialEq, ::prost::Message)]
1053pub struct LogsNewValueCondition {
1054 #[prost(message, optional, tag = "1")]
1055 pub keypath_to_track: ::core::option::Option<::prost::alloc::string::String>,
1056 #[prost(message, optional, tag = "2")]
1057 pub time_window: ::core::option::Option<LogsNewValueTimeWindow>,
1058}
1059#[derive(serde::Serialize, serde::Deserialize)]
1060#[serde(rename_all = "snake_case")]
1061#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1062#[repr(i32)]
1063pub enum LogsRatioConditionType {
1064 MoreThanOrUnspecified = 0,
1065 LessThan = 1,
1066}
1067impl LogsRatioConditionType {
1068 pub fn as_str_name(&self) -> &'static str {
1073 match self {
1074 Self::MoreThanOrUnspecified => {
1075 "LOGS_RATIO_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"
1076 }
1077 Self::LessThan => "LOGS_RATIO_CONDITION_TYPE_LESS_THAN",
1078 }
1079 }
1080 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1082 match value {
1083 "LOGS_RATIO_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED" => {
1084 Some(Self::MoreThanOrUnspecified)
1085 }
1086 "LOGS_RATIO_CONDITION_TYPE_LESS_THAN" => Some(Self::LessThan),
1087 _ => None,
1088 }
1089 }
1090}
1091#[derive(serde::Serialize, serde::Deserialize)]
1092#[serde(rename_all = "snake_case")]
1093#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1094#[repr(i32)]
1095pub enum LogsRatioGroupByFor {
1096 BothOrUnspecified = 0,
1097 NumeratorOnly = 1,
1098 DenumeratorOnly = 2,
1099}
1100impl LogsRatioGroupByFor {
1101 pub fn as_str_name(&self) -> &'static str {
1106 match self {
1107 Self::BothOrUnspecified => "LOGS_RATIO_GROUP_BY_FOR_BOTH_OR_UNSPECIFIED",
1108 Self::NumeratorOnly => "LOGS_RATIO_GROUP_BY_FOR_NUMERATOR_ONLY",
1109 Self::DenumeratorOnly => "LOGS_RATIO_GROUP_BY_FOR_DENUMERATOR_ONLY",
1110 }
1111 }
1112 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1114 match value {
1115 "LOGS_RATIO_GROUP_BY_FOR_BOTH_OR_UNSPECIFIED" => {
1116 Some(Self::BothOrUnspecified)
1117 }
1118 "LOGS_RATIO_GROUP_BY_FOR_NUMERATOR_ONLY" => Some(Self::NumeratorOnly),
1119 "LOGS_RATIO_GROUP_BY_FOR_DENUMERATOR_ONLY" => Some(Self::DenumeratorOnly),
1120 _ => None,
1121 }
1122 }
1123}
1124#[derive(serde::Serialize, serde::Deserialize)]
1125#[serde(rename_all = "snake_case")]
1126#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1127pub struct LogsRatioTimeWindow {
1128 #[prost(oneof = "logs_ratio_time_window::Type", tags = "1")]
1129 pub r#type: ::core::option::Option<logs_ratio_time_window::Type>,
1130}
1131pub mod logs_ratio_time_window {
1133 #[derive(serde::Serialize, serde::Deserialize)]
1134 #[serde(rename_all = "snake_case")]
1135 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1136 pub enum Type {
1137 #[prost(enumeration = "super::LogsRatioTimeWindowValue", tag = "1")]
1138 LogsRatioTimeWindowSpecificValue(i32),
1139 }
1140}
1141#[derive(serde::Serialize, serde::Deserialize)]
1142#[serde(rename_all = "snake_case")]
1143#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1144#[repr(i32)]
1145pub enum LogsRatioTimeWindowValue {
1146 Minutes5OrUnspecified = 0,
1147 Minutes10 = 1,
1148 Minutes15 = 2,
1149 Minutes30 = 3,
1150 Hour1 = 4,
1151 Hours2 = 5,
1152 Hours4 = 6,
1153 Hours6 = 7,
1154 Hours12 = 8,
1155 Hours24 = 9,
1156 Hours36 = 10,
1157}
1158impl LogsRatioTimeWindowValue {
1159 pub fn as_str_name(&self) -> &'static str {
1164 match self {
1165 Self::Minutes5OrUnspecified => {
1166 "LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED"
1167 }
1168 Self::Minutes10 => "LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_10",
1169 Self::Minutes15 => "LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_15",
1170 Self::Minutes30 => "LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_30",
1171 Self::Hour1 => "LOGS_RATIO_TIME_WINDOW_VALUE_HOUR_1",
1172 Self::Hours2 => "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_2",
1173 Self::Hours4 => "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_4",
1174 Self::Hours6 => "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_6",
1175 Self::Hours12 => "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_12",
1176 Self::Hours24 => "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_24",
1177 Self::Hours36 => "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_36",
1178 }
1179 }
1180 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1182 match value {
1183 "LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED" => {
1184 Some(Self::Minutes5OrUnspecified)
1185 }
1186 "LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_10" => Some(Self::Minutes10),
1187 "LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_15" => Some(Self::Minutes15),
1188 "LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_30" => Some(Self::Minutes30),
1189 "LOGS_RATIO_TIME_WINDOW_VALUE_HOUR_1" => Some(Self::Hour1),
1190 "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_2" => Some(Self::Hours2),
1191 "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_4" => Some(Self::Hours4),
1192 "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_6" => Some(Self::Hours6),
1193 "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_12" => Some(Self::Hours12),
1194 "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_24" => Some(Self::Hours24),
1195 "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_36" => Some(Self::Hours36),
1196 _ => None,
1197 }
1198 }
1199}
1200#[derive(serde::Serialize, serde::Deserialize)]
1201#[serde(rename_all = "snake_case")]
1202#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1203pub struct AlertDefOverride {
1204 #[prost(enumeration = "AlertDefPriority", tag = "1")]
1205 pub priority: i32,
1206}
1207#[derive(serde::Serialize, serde::Deserialize)]
1208#[serde(rename_all = "snake_case")]
1209#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1210pub struct UndetectedValuesManagement {
1211 #[prost(message, optional, tag = "1")]
1212 pub trigger_undetected_values: ::core::option::Option<bool>,
1213 #[prost(enumeration = "AutoRetireTimeframe", optional, tag = "2")]
1214 pub auto_retire_timeframe: ::core::option::Option<i32>,
1215}
1216#[derive(serde::Serialize, serde::Deserialize)]
1217#[serde(rename_all = "snake_case")]
1218#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1219#[repr(i32)]
1220pub enum AutoRetireTimeframe {
1221 NeverOrUnspecified = 0,
1222 Minutes5 = 1,
1223 Minutes10 = 2,
1224 Hour1 = 3,
1225 Hours2 = 4,
1226 Hours6 = 5,
1227 Hours12 = 6,
1228 Hours24 = 7,
1229}
1230impl AutoRetireTimeframe {
1231 pub fn as_str_name(&self) -> &'static str {
1236 match self {
1237 Self::NeverOrUnspecified => "AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED",
1238 Self::Minutes5 => "AUTO_RETIRE_TIMEFRAME_MINUTES_5",
1239 Self::Minutes10 => "AUTO_RETIRE_TIMEFRAME_MINUTES_10",
1240 Self::Hour1 => "AUTO_RETIRE_TIMEFRAME_HOUR_1",
1241 Self::Hours2 => "AUTO_RETIRE_TIMEFRAME_HOURS_2",
1242 Self::Hours6 => "AUTO_RETIRE_TIMEFRAME_HOURS_6",
1243 Self::Hours12 => "AUTO_RETIRE_TIMEFRAME_HOURS_12",
1244 Self::Hours24 => "AUTO_RETIRE_TIMEFRAME_HOURS_24",
1245 }
1246 }
1247 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1249 match value {
1250 "AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED" => {
1251 Some(Self::NeverOrUnspecified)
1252 }
1253 "AUTO_RETIRE_TIMEFRAME_MINUTES_5" => Some(Self::Minutes5),
1254 "AUTO_RETIRE_TIMEFRAME_MINUTES_10" => Some(Self::Minutes10),
1255 "AUTO_RETIRE_TIMEFRAME_HOUR_1" => Some(Self::Hour1),
1256 "AUTO_RETIRE_TIMEFRAME_HOURS_2" => Some(Self::Hours2),
1257 "AUTO_RETIRE_TIMEFRAME_HOURS_6" => Some(Self::Hours6),
1258 "AUTO_RETIRE_TIMEFRAME_HOURS_12" => Some(Self::Hours12),
1259 "AUTO_RETIRE_TIMEFRAME_HOURS_24" => Some(Self::Hours24),
1260 _ => None,
1261 }
1262 }
1263}
1264#[derive(serde::Serialize, serde::Deserialize)]
1265#[serde(rename_all = "snake_case")]
1266#[derive(Clone, PartialEq, ::prost::Message)]
1267pub struct LogsRatioThresholdType {
1268 #[prost(message, optional, tag = "1")]
1269 pub numerator: ::core::option::Option<LogsFilter>,
1270 #[prost(message, optional, tag = "2")]
1271 pub numerator_alias: ::core::option::Option<::prost::alloc::string::String>,
1272 #[prost(message, optional, tag = "3")]
1273 pub denominator: ::core::option::Option<LogsFilter>,
1274 #[prost(message, optional, tag = "4")]
1275 pub denominator_alias: ::core::option::Option<::prost::alloc::string::String>,
1276 #[prost(message, repeated, tag = "5")]
1277 pub rules: ::prost::alloc::vec::Vec<LogsRatioRules>,
1278 #[prost(message, repeated, tag = "6")]
1279 pub notification_payload_filter: ::prost::alloc::vec::Vec<
1280 ::prost::alloc::string::String,
1281 >,
1282 #[prost(enumeration = "LogsRatioGroupByFor", tag = "7")]
1283 pub group_by_for: i32,
1284 #[prost(message, optional, tag = "8")]
1285 pub undetected_values_management: ::core::option::Option<UndetectedValuesManagement>,
1286 #[prost(message, optional, tag = "9")]
1287 pub ignore_infinity: ::core::option::Option<bool>,
1288 #[prost(message, optional, tag = "10")]
1289 pub evaluation_delay_ms: ::core::option::Option<i32>,
1290}
1291#[derive(serde::Serialize, serde::Deserialize)]
1292#[serde(rename_all = "snake_case")]
1293#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1294pub struct LogsRatioRules {
1295 #[prost(message, optional, tag = "1")]
1296 pub condition: ::core::option::Option<LogsRatioCondition>,
1297 #[prost(message, optional, tag = "2")]
1298 pub r#override: ::core::option::Option<AlertDefOverride>,
1299}
1300#[derive(serde::Serialize, serde::Deserialize)]
1301#[serde(rename_all = "snake_case")]
1302#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1303pub struct LogsRatioCondition {
1304 #[prost(message, optional, tag = "1")]
1305 pub threshold: ::core::option::Option<f64>,
1306 #[prost(message, optional, tag = "2")]
1307 pub time_window: ::core::option::Option<LogsRatioTimeWindow>,
1308 #[prost(enumeration = "LogsRatioConditionType", tag = "4")]
1309 pub condition_type: i32,
1310}
1311#[derive(serde::Serialize, serde::Deserialize)]
1312#[serde(rename_all = "snake_case")]
1313#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1314#[repr(i32)]
1315pub enum LogsThresholdConditionType {
1316 MoreThanOrUnspecified = 0,
1317 LessThan = 1,
1318}
1319impl LogsThresholdConditionType {
1320 pub fn as_str_name(&self) -> &'static str {
1325 match self {
1326 Self::MoreThanOrUnspecified => {
1327 "LOGS_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"
1328 }
1329 Self::LessThan => "LOGS_THRESHOLD_CONDITION_TYPE_LESS_THAN",
1330 }
1331 }
1332 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1334 match value {
1335 "LOGS_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED" => {
1336 Some(Self::MoreThanOrUnspecified)
1337 }
1338 "LOGS_THRESHOLD_CONDITION_TYPE_LESS_THAN" => Some(Self::LessThan),
1339 _ => None,
1340 }
1341 }
1342}
1343#[derive(serde::Serialize, serde::Deserialize)]
1344#[serde(rename_all = "snake_case")]
1345#[derive(Clone, PartialEq, ::prost::Message)]
1346pub struct LogsThresholdType {
1347 #[prost(message, optional, tag = "1")]
1348 pub logs_filter: ::core::option::Option<LogsFilter>,
1349 #[prost(message, optional, tag = "2")]
1350 pub undetected_values_management: ::core::option::Option<UndetectedValuesManagement>,
1351 #[prost(message, repeated, tag = "3")]
1352 pub rules: ::prost::alloc::vec::Vec<LogsThresholdRule>,
1353 #[prost(message, repeated, tag = "4")]
1354 pub notification_payload_filter: ::prost::alloc::vec::Vec<
1355 ::prost::alloc::string::String,
1356 >,
1357 #[prost(message, optional, tag = "5")]
1358 pub evaluation_delay_ms: ::core::option::Option<i32>,
1359}
1360#[derive(serde::Serialize, serde::Deserialize)]
1361#[serde(rename_all = "snake_case")]
1362#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1363pub struct LogsThresholdRule {
1364 #[prost(message, optional, tag = "1")]
1365 pub condition: ::core::option::Option<LogsThresholdCondition>,
1366 #[prost(message, optional, tag = "2")]
1367 pub r#override: ::core::option::Option<AlertDefOverride>,
1368}
1369#[derive(serde::Serialize, serde::Deserialize)]
1370#[serde(rename_all = "snake_case")]
1371#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1372pub struct LogsThresholdCondition {
1373 #[prost(message, optional, tag = "1")]
1374 pub threshold: ::core::option::Option<f64>,
1375 #[prost(message, optional, tag = "2")]
1376 pub time_window: ::core::option::Option<LogsTimeWindow>,
1377 #[prost(enumeration = "LogsThresholdConditionType", tag = "3")]
1378 pub condition_type: i32,
1379}
1380#[derive(serde::Serialize, serde::Deserialize)]
1381#[serde(rename_all = "snake_case")]
1382#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1383#[repr(i32)]
1384pub enum LogsTimeRelativeComparedTo {
1385 PreviousHourOrUnspecified = 0,
1386 SameHourYesterday = 1,
1387 SameHourLastWeek = 2,
1388 Yesterday = 3,
1389 SameDayLastWeek = 4,
1390 SameDayLastMonth = 5,
1391}
1392impl LogsTimeRelativeComparedTo {
1393 pub fn as_str_name(&self) -> &'static str {
1398 match self {
1399 Self::PreviousHourOrUnspecified => {
1400 "LOGS_TIME_RELATIVE_COMPARED_TO_PREVIOUS_HOUR_OR_UNSPECIFIED"
1401 }
1402 Self::SameHourYesterday => {
1403 "LOGS_TIME_RELATIVE_COMPARED_TO_SAME_HOUR_YESTERDAY"
1404 }
1405 Self::SameHourLastWeek => {
1406 "LOGS_TIME_RELATIVE_COMPARED_TO_SAME_HOUR_LAST_WEEK"
1407 }
1408 Self::Yesterday => "LOGS_TIME_RELATIVE_COMPARED_TO_YESTERDAY",
1409 Self::SameDayLastWeek => "LOGS_TIME_RELATIVE_COMPARED_TO_SAME_DAY_LAST_WEEK",
1410 Self::SameDayLastMonth => {
1411 "LOGS_TIME_RELATIVE_COMPARED_TO_SAME_DAY_LAST_MONTH"
1412 }
1413 }
1414 }
1415 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1417 match value {
1418 "LOGS_TIME_RELATIVE_COMPARED_TO_PREVIOUS_HOUR_OR_UNSPECIFIED" => {
1419 Some(Self::PreviousHourOrUnspecified)
1420 }
1421 "LOGS_TIME_RELATIVE_COMPARED_TO_SAME_HOUR_YESTERDAY" => {
1422 Some(Self::SameHourYesterday)
1423 }
1424 "LOGS_TIME_RELATIVE_COMPARED_TO_SAME_HOUR_LAST_WEEK" => {
1425 Some(Self::SameHourLastWeek)
1426 }
1427 "LOGS_TIME_RELATIVE_COMPARED_TO_YESTERDAY" => Some(Self::Yesterday),
1428 "LOGS_TIME_RELATIVE_COMPARED_TO_SAME_DAY_LAST_WEEK" => {
1429 Some(Self::SameDayLastWeek)
1430 }
1431 "LOGS_TIME_RELATIVE_COMPARED_TO_SAME_DAY_LAST_MONTH" => {
1432 Some(Self::SameDayLastMonth)
1433 }
1434 _ => None,
1435 }
1436 }
1437}
1438#[derive(serde::Serialize, serde::Deserialize)]
1439#[serde(rename_all = "snake_case")]
1440#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1441#[repr(i32)]
1442pub enum LogsTimeRelativeConditionType {
1443 MoreThanOrUnspecified = 0,
1444 LessThan = 1,
1445}
1446impl LogsTimeRelativeConditionType {
1447 pub fn as_str_name(&self) -> &'static str {
1452 match self {
1453 Self::MoreThanOrUnspecified => {
1454 "LOGS_TIME_RELATIVE_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"
1455 }
1456 Self::LessThan => "LOGS_TIME_RELATIVE_CONDITION_TYPE_LESS_THAN",
1457 }
1458 }
1459 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1461 match value {
1462 "LOGS_TIME_RELATIVE_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED" => {
1463 Some(Self::MoreThanOrUnspecified)
1464 }
1465 "LOGS_TIME_RELATIVE_CONDITION_TYPE_LESS_THAN" => Some(Self::LessThan),
1466 _ => None,
1467 }
1468 }
1469}
1470#[derive(serde::Serialize, serde::Deserialize)]
1471#[serde(rename_all = "snake_case")]
1472#[derive(Clone, PartialEq, ::prost::Message)]
1473pub struct LogsTimeRelativeThresholdType {
1474 #[prost(message, optional, tag = "1")]
1475 pub logs_filter: ::core::option::Option<LogsFilter>,
1476 #[prost(message, repeated, tag = "2")]
1477 pub rules: ::prost::alloc::vec::Vec<LogsTimeRelativeRule>,
1478 #[prost(message, optional, tag = "3")]
1479 pub ignore_infinity: ::core::option::Option<bool>,
1480 #[prost(message, repeated, tag = "4")]
1481 pub notification_payload_filter: ::prost::alloc::vec::Vec<
1482 ::prost::alloc::string::String,
1483 >,
1484 #[prost(message, optional, tag = "5")]
1485 pub undetected_values_management: ::core::option::Option<UndetectedValuesManagement>,
1486 #[prost(message, optional, tag = "6")]
1487 pub evaluation_delay_ms: ::core::option::Option<i32>,
1488}
1489#[derive(serde::Serialize, serde::Deserialize)]
1490#[serde(rename_all = "snake_case")]
1491#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1492pub struct LogsTimeRelativeRule {
1493 #[prost(message, optional, tag = "1")]
1494 pub condition: ::core::option::Option<LogsTimeRelativeCondition>,
1495 #[prost(message, optional, tag = "2")]
1496 pub r#override: ::core::option::Option<AlertDefOverride>,
1497}
1498#[derive(serde::Serialize, serde::Deserialize)]
1499#[serde(rename_all = "snake_case")]
1500#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1501pub struct LogsTimeRelativeCondition {
1502 #[prost(message, optional, tag = "1")]
1503 pub threshold: ::core::option::Option<f64>,
1504 #[prost(enumeration = "LogsTimeRelativeComparedTo", tag = "2")]
1505 pub compared_to: i32,
1506 #[prost(enumeration = "LogsTimeRelativeConditionType", tag = "4")]
1507 pub condition_type: i32,
1508}
1509#[derive(serde::Serialize, serde::Deserialize)]
1510#[serde(rename_all = "snake_case")]
1511#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1512pub struct LogsUniqueValueTimeWindow {
1513 #[prost(oneof = "logs_unique_value_time_window::Type", tags = "1")]
1514 pub r#type: ::core::option::Option<logs_unique_value_time_window::Type>,
1515}
1516pub mod logs_unique_value_time_window {
1518 #[derive(serde::Serialize, serde::Deserialize)]
1519 #[serde(rename_all = "snake_case")]
1520 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1521 pub enum Type {
1522 #[prost(enumeration = "super::LogsUniqueValueTimeWindowValue", tag = "1")]
1523 LogsUniqueValueTimeWindowSpecificValue(i32),
1524 }
1525}
1526#[derive(serde::Serialize, serde::Deserialize)]
1527#[serde(rename_all = "snake_case")]
1528#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1529#[repr(i32)]
1530pub enum LogsUniqueValueTimeWindowValue {
1531 Minute1OrUnspecified = 0,
1532 Minutes5 = 10,
1533 Minutes10 = 11,
1534 Minutes15 = 1,
1535 Minutes20 = 2,
1536 Minutes30 = 3,
1537 Hours1 = 4,
1538 Hours2 = 5,
1539 Hours4 = 6,
1540 Hours6 = 7,
1541 Hours12 = 8,
1542 Hours24 = 9,
1543 Hours36 = 12,
1544}
1545impl LogsUniqueValueTimeWindowValue {
1546 pub fn as_str_name(&self) -> &'static str {
1551 match self {
1552 Self::Minute1OrUnspecified => {
1553 "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTE_1_OR_UNSPECIFIED"
1554 }
1555 Self::Minutes5 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_5",
1556 Self::Minutes10 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_10",
1557 Self::Minutes15 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_15",
1558 Self::Minutes20 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_20",
1559 Self::Minutes30 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_30",
1560 Self::Hours1 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_1",
1561 Self::Hours2 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_2",
1562 Self::Hours4 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_4",
1563 Self::Hours6 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_6",
1564 Self::Hours12 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_12",
1565 Self::Hours24 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_24",
1566 Self::Hours36 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_36",
1567 }
1568 }
1569 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1571 match value {
1572 "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTE_1_OR_UNSPECIFIED" => {
1573 Some(Self::Minute1OrUnspecified)
1574 }
1575 "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_5" => Some(Self::Minutes5),
1576 "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_10" => Some(Self::Minutes10),
1577 "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_15" => Some(Self::Minutes15),
1578 "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_20" => Some(Self::Minutes20),
1579 "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_30" => Some(Self::Minutes30),
1580 "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_1" => Some(Self::Hours1),
1581 "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_2" => Some(Self::Hours2),
1582 "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_4" => Some(Self::Hours4),
1583 "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_6" => Some(Self::Hours6),
1584 "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_12" => Some(Self::Hours12),
1585 "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_24" => Some(Self::Hours24),
1586 "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_36" => Some(Self::Hours36),
1587 _ => None,
1588 }
1589 }
1590}
1591#[derive(serde::Serialize, serde::Deserialize)]
1592#[serde(rename_all = "snake_case")]
1593#[derive(Clone, PartialEq, ::prost::Message)]
1594pub struct LogsUniqueCountType {
1595 #[prost(message, optional, tag = "1")]
1596 pub logs_filter: ::core::option::Option<LogsFilter>,
1597 #[prost(message, repeated, tag = "2")]
1598 pub rules: ::prost::alloc::vec::Vec<LogsUniqueCountRule>,
1599 #[prost(message, repeated, tag = "3")]
1600 pub notification_payload_filter: ::prost::alloc::vec::Vec<
1601 ::prost::alloc::string::String,
1602 >,
1603 #[prost(message, optional, tag = "4")]
1604 pub max_unique_count_per_group_by_key: ::core::option::Option<i64>,
1605 #[prost(message, optional, tag = "5")]
1606 pub unique_count_keypath: ::core::option::Option<::prost::alloc::string::String>,
1607}
1608#[derive(serde::Serialize, serde::Deserialize)]
1609#[serde(rename_all = "snake_case")]
1610#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1611pub struct LogsUniqueCountRule {
1612 #[prost(message, optional, tag = "1")]
1613 pub condition: ::core::option::Option<LogsUniqueCountCondition>,
1614}
1615#[derive(serde::Serialize, serde::Deserialize)]
1616#[serde(rename_all = "snake_case")]
1617#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1618pub struct LogsUniqueCountCondition {
1619 #[prost(message, optional, tag = "2")]
1620 pub max_unique_count: ::core::option::Option<i64>,
1621 #[prost(message, optional, tag = "3")]
1622 pub time_window: ::core::option::Option<LogsUniqueValueTimeWindow>,
1623}
1624#[derive(serde::Serialize, serde::Deserialize)]
1625#[serde(rename_all = "snake_case")]
1626#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1627#[repr(i32)]
1628pub enum MetricAnomalyConditionType {
1629 MoreThanUsualOrUnspecified = 0,
1630 LessThanUsual = 1,
1631}
1632impl MetricAnomalyConditionType {
1633 pub fn as_str_name(&self) -> &'static str {
1638 match self {
1639 Self::MoreThanUsualOrUnspecified => {
1640 "METRIC_ANOMALY_CONDITION_TYPE_MORE_THAN_USUAL_OR_UNSPECIFIED"
1641 }
1642 Self::LessThanUsual => "METRIC_ANOMALY_CONDITION_TYPE_LESS_THAN_USUAL",
1643 }
1644 }
1645 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1647 match value {
1648 "METRIC_ANOMALY_CONDITION_TYPE_MORE_THAN_USUAL_OR_UNSPECIFIED" => {
1649 Some(Self::MoreThanUsualOrUnspecified)
1650 }
1651 "METRIC_ANOMALY_CONDITION_TYPE_LESS_THAN_USUAL" => Some(Self::LessThanUsual),
1652 _ => None,
1653 }
1654 }
1655}
1656#[derive(serde::Serialize, serde::Deserialize)]
1657#[serde(rename_all = "snake_case")]
1658#[derive(Clone, PartialEq, ::prost::Message)]
1659pub struct MetricTimeWindow {
1660 #[prost(oneof = "metric_time_window::Type", tags = "1, 2")]
1661 pub r#type: ::core::option::Option<metric_time_window::Type>,
1662}
1663pub mod metric_time_window {
1665 #[derive(serde::Serialize, serde::Deserialize)]
1666 #[serde(rename_all = "snake_case")]
1667 #[derive(Clone, PartialEq, ::prost::Oneof)]
1668 pub enum Type {
1669 #[prost(enumeration = "super::MetricTimeWindowValue", tag = "1")]
1670 MetricTimeWindowSpecificValue(i32),
1671 #[prost(message, tag = "2")]
1672 MetricTimeWindowDynamicDuration(::prost::alloc::string::String),
1673 }
1674}
1675#[derive(serde::Serialize, serde::Deserialize)]
1676#[serde(rename_all = "snake_case")]
1677#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1678#[repr(i32)]
1679pub enum MetricTimeWindowValue {
1680 Minutes1OrUnspecified = 0,
1681 Minutes5 = 1,
1682 Minutes10 = 2,
1683 Minutes15 = 3,
1684 Minutes20 = 11,
1685 Minutes30 = 4,
1686 Hour1 = 5,
1687 Hours2 = 6,
1688 Hours4 = 7,
1689 Hours6 = 8,
1690 Hours12 = 9,
1691 Hours24 = 10,
1692 Hours36 = 12,
1693}
1694impl MetricTimeWindowValue {
1695 pub fn as_str_name(&self) -> &'static str {
1700 match self {
1701 Self::Minutes1OrUnspecified => {
1702 "METRIC_TIME_WINDOW_VALUE_MINUTES_1_OR_UNSPECIFIED"
1703 }
1704 Self::Minutes5 => "METRIC_TIME_WINDOW_VALUE_MINUTES_5",
1705 Self::Minutes10 => "METRIC_TIME_WINDOW_VALUE_MINUTES_10",
1706 Self::Minutes15 => "METRIC_TIME_WINDOW_VALUE_MINUTES_15",
1707 Self::Minutes20 => "METRIC_TIME_WINDOW_VALUE_MINUTES_20",
1708 Self::Minutes30 => "METRIC_TIME_WINDOW_VALUE_MINUTES_30",
1709 Self::Hour1 => "METRIC_TIME_WINDOW_VALUE_HOUR_1",
1710 Self::Hours2 => "METRIC_TIME_WINDOW_VALUE_HOURS_2",
1711 Self::Hours4 => "METRIC_TIME_WINDOW_VALUE_HOURS_4",
1712 Self::Hours6 => "METRIC_TIME_WINDOW_VALUE_HOURS_6",
1713 Self::Hours12 => "METRIC_TIME_WINDOW_VALUE_HOURS_12",
1714 Self::Hours24 => "METRIC_TIME_WINDOW_VALUE_HOURS_24",
1715 Self::Hours36 => "METRIC_TIME_WINDOW_VALUE_HOURS_36",
1716 }
1717 }
1718 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1720 match value {
1721 "METRIC_TIME_WINDOW_VALUE_MINUTES_1_OR_UNSPECIFIED" => {
1722 Some(Self::Minutes1OrUnspecified)
1723 }
1724 "METRIC_TIME_WINDOW_VALUE_MINUTES_5" => Some(Self::Minutes5),
1725 "METRIC_TIME_WINDOW_VALUE_MINUTES_10" => Some(Self::Minutes10),
1726 "METRIC_TIME_WINDOW_VALUE_MINUTES_15" => Some(Self::Minutes15),
1727 "METRIC_TIME_WINDOW_VALUE_MINUTES_20" => Some(Self::Minutes20),
1728 "METRIC_TIME_WINDOW_VALUE_MINUTES_30" => Some(Self::Minutes30),
1729 "METRIC_TIME_WINDOW_VALUE_HOUR_1" => Some(Self::Hour1),
1730 "METRIC_TIME_WINDOW_VALUE_HOURS_2" => Some(Self::Hours2),
1731 "METRIC_TIME_WINDOW_VALUE_HOURS_4" => Some(Self::Hours4),
1732 "METRIC_TIME_WINDOW_VALUE_HOURS_6" => Some(Self::Hours6),
1733 "METRIC_TIME_WINDOW_VALUE_HOURS_12" => Some(Self::Hours12),
1734 "METRIC_TIME_WINDOW_VALUE_HOURS_24" => Some(Self::Hours24),
1735 "METRIC_TIME_WINDOW_VALUE_HOURS_36" => Some(Self::Hours36),
1736 _ => None,
1737 }
1738 }
1739}
1740#[derive(serde::Serialize, serde::Deserialize)]
1741#[serde(rename_all = "snake_case")]
1742#[derive(Clone, PartialEq, ::prost::Message)]
1743pub struct MetricFilter {
1744 #[prost(oneof = "metric_filter::Type", tags = "1")]
1745 pub r#type: ::core::option::Option<metric_filter::Type>,
1746}
1747pub mod metric_filter {
1749 #[derive(serde::Serialize, serde::Deserialize)]
1750 #[serde(rename_all = "snake_case")]
1751 #[derive(Clone, PartialEq, ::prost::Oneof)]
1752 pub enum Type {
1753 #[prost(message, tag = "1")]
1754 Promql(::prost::alloc::string::String),
1755 }
1756}
1757#[derive(serde::Serialize, serde::Deserialize)]
1758#[serde(rename_all = "snake_case")]
1759#[derive(Clone, PartialEq, ::prost::Message)]
1760pub struct MetricAnomalyType {
1761 #[prost(message, optional, tag = "1")]
1762 pub metric_filter: ::core::option::Option<MetricFilter>,
1763 #[prost(message, repeated, tag = "2")]
1764 pub rules: ::prost::alloc::vec::Vec<MetricAnomalyRule>,
1765 #[prost(message, optional, tag = "3")]
1766 pub evaluation_delay_ms: ::core::option::Option<i32>,
1767 #[prost(message, optional, tag = "4")]
1768 pub anomaly_alert_settings: ::core::option::Option<AnomalyAlertSettings>,
1769}
1770#[derive(serde::Serialize, serde::Deserialize)]
1771#[serde(rename_all = "snake_case")]
1772#[derive(Clone, PartialEq, ::prost::Message)]
1773pub struct MetricAnomalyRule {
1774 #[prost(message, optional, tag = "1")]
1775 pub condition: ::core::option::Option<MetricAnomalyCondition>,
1776}
1777#[derive(serde::Serialize, serde::Deserialize)]
1778#[serde(rename_all = "snake_case")]
1779#[derive(Clone, PartialEq, ::prost::Message)]
1780pub struct MetricAnomalyCondition {
1781 #[prost(message, optional, tag = "1")]
1782 pub threshold: ::core::option::Option<f64>,
1783 #[prost(message, optional, tag = "2")]
1784 pub for_over_pct: ::core::option::Option<u32>,
1785 #[prost(message, optional, tag = "3")]
1786 pub of_the_last: ::core::option::Option<MetricTimeWindow>,
1787 #[prost(message, optional, tag = "4")]
1788 pub min_non_null_values_pct: ::core::option::Option<u32>,
1789 #[prost(enumeration = "MetricAnomalyConditionType", tag = "5")]
1790 pub condition_type: i32,
1791}
1792#[derive(serde::Serialize, serde::Deserialize)]
1793#[serde(rename_all = "snake_case")]
1794#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1795#[repr(i32)]
1796pub enum MetricThresholdConditionType {
1797 MoreThanOrUnspecified = 0,
1798 LessThan = 1,
1799 MoreThanOrEquals = 2,
1800 LessThanOrEquals = 3,
1801}
1802impl MetricThresholdConditionType {
1803 pub fn as_str_name(&self) -> &'static str {
1808 match self {
1809 Self::MoreThanOrUnspecified => {
1810 "METRIC_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"
1811 }
1812 Self::LessThan => "METRIC_THRESHOLD_CONDITION_TYPE_LESS_THAN",
1813 Self::MoreThanOrEquals => {
1814 "METRIC_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_EQUALS"
1815 }
1816 Self::LessThanOrEquals => {
1817 "METRIC_THRESHOLD_CONDITION_TYPE_LESS_THAN_OR_EQUALS"
1818 }
1819 }
1820 }
1821 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1823 match value {
1824 "METRIC_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED" => {
1825 Some(Self::MoreThanOrUnspecified)
1826 }
1827 "METRIC_THRESHOLD_CONDITION_TYPE_LESS_THAN" => Some(Self::LessThan),
1828 "METRIC_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_EQUALS" => {
1829 Some(Self::MoreThanOrEquals)
1830 }
1831 "METRIC_THRESHOLD_CONDITION_TYPE_LESS_THAN_OR_EQUALS" => {
1832 Some(Self::LessThanOrEquals)
1833 }
1834 _ => None,
1835 }
1836 }
1837}
1838#[derive(serde::Serialize, serde::Deserialize)]
1839#[serde(rename_all = "snake_case")]
1840#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1841pub struct MetricMissingValues {
1842 #[prost(oneof = "metric_missing_values::MissingValues", tags = "1, 2")]
1843 pub missing_values: ::core::option::Option<metric_missing_values::MissingValues>,
1844}
1845pub mod metric_missing_values {
1847 #[derive(serde::Serialize, serde::Deserialize)]
1848 #[serde(rename_all = "snake_case")]
1849 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1850 pub enum MissingValues {
1851 #[prost(message, tag = "1")]
1852 ReplaceWithZero(bool),
1853 #[prost(message, tag = "2")]
1854 MinNonNullValuesPct(u32),
1855 }
1856}
1857#[derive(serde::Serialize, serde::Deserialize)]
1858#[serde(rename_all = "snake_case")]
1859#[derive(Clone, PartialEq, ::prost::Message)]
1860pub struct MetricThresholdType {
1861 #[prost(message, optional, tag = "1")]
1862 pub metric_filter: ::core::option::Option<MetricFilter>,
1863 #[prost(message, repeated, tag = "2")]
1864 pub rules: ::prost::alloc::vec::Vec<MetricThresholdRule>,
1865 #[prost(message, optional, tag = "3")]
1866 pub undetected_values_management: ::core::option::Option<UndetectedValuesManagement>,
1867 #[prost(message, optional, tag = "4")]
1868 pub missing_values: ::core::option::Option<MetricMissingValues>,
1869 #[prost(message, optional, tag = "5")]
1870 pub evaluation_delay_ms: ::core::option::Option<i32>,
1871}
1872#[derive(serde::Serialize, serde::Deserialize)]
1873#[serde(rename_all = "snake_case")]
1874#[derive(Clone, PartialEq, ::prost::Message)]
1875pub struct MetricThresholdRule {
1876 #[prost(message, optional, tag = "1")]
1877 pub condition: ::core::option::Option<MetricThresholdCondition>,
1878 #[prost(message, optional, tag = "2")]
1879 pub r#override: ::core::option::Option<AlertDefOverride>,
1880}
1881#[derive(serde::Serialize, serde::Deserialize)]
1882#[serde(rename_all = "snake_case")]
1883#[derive(Clone, PartialEq, ::prost::Message)]
1884pub struct MetricThresholdCondition {
1885 #[prost(message, optional, tag = "1")]
1886 pub threshold: ::core::option::Option<f64>,
1887 #[prost(message, optional, tag = "2")]
1888 pub for_over_pct: ::core::option::Option<u32>,
1889 #[prost(message, optional, tag = "3")]
1890 pub of_the_last: ::core::option::Option<MetricTimeWindow>,
1891 #[prost(enumeration = "MetricThresholdConditionType", tag = "5")]
1892 pub condition_type: i32,
1893}
1894#[derive(serde::Serialize, serde::Deserialize)]
1895#[serde(rename_all = "snake_case")]
1896#[derive(Clone, PartialEq, ::prost::Message)]
1897pub struct SloDefinition {
1898 #[prost(message, optional, tag = "1")]
1899 pub slo_id: ::core::option::Option<::prost::alloc::string::String>,
1900}
1901#[derive(serde::Serialize, serde::Deserialize)]
1902#[serde(rename_all = "snake_case")]
1903#[derive(Clone, PartialEq, ::prost::Message)]
1904pub struct SloThresholdType {
1905 #[prost(message, optional, tag = "1")]
1906 pub slo_definition: ::core::option::Option<SloDefinition>,
1907 #[prost(oneof = "slo_threshold_type::Threshold", tags = "2, 3")]
1908 pub threshold: ::core::option::Option<slo_threshold_type::Threshold>,
1909}
1910pub mod slo_threshold_type {
1912 #[derive(serde::Serialize, serde::Deserialize)]
1913 #[serde(rename_all = "snake_case")]
1914 #[derive(Clone, PartialEq, ::prost::Oneof)]
1915 pub enum Threshold {
1916 #[prost(message, tag = "2")]
1917 ErrorBudget(super::ErrorBudgetThreshold),
1918 #[prost(message, tag = "3")]
1919 BurnRate(super::BurnRateThreshold),
1920 }
1921}
1922#[derive(serde::Serialize, serde::Deserialize)]
1923#[serde(rename_all = "snake_case")]
1924#[derive(Clone, PartialEq, ::prost::Message)]
1925pub struct ErrorBudgetThreshold {
1926 #[prost(message, repeated, tag = "1")]
1927 pub rules: ::prost::alloc::vec::Vec<SloThresholdRule>,
1928}
1929#[derive(serde::Serialize, serde::Deserialize)]
1930#[serde(rename_all = "snake_case")]
1931#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1932pub struct SloThresholdRule {
1933 #[prost(message, optional, tag = "1")]
1934 pub condition: ::core::option::Option<SloThresholdCondition>,
1935 #[prost(message, optional, tag = "2")]
1936 pub r#override: ::core::option::Option<AlertDefOverride>,
1937}
1938#[derive(serde::Serialize, serde::Deserialize)]
1939#[serde(rename_all = "snake_case")]
1940#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1941pub struct SloThresholdCondition {
1942 #[prost(message, optional, tag = "1")]
1943 pub threshold: ::core::option::Option<f64>,
1944}
1945#[derive(serde::Serialize, serde::Deserialize)]
1946#[serde(rename_all = "snake_case")]
1947#[derive(Clone, PartialEq, ::prost::Message)]
1948pub struct BurnRateThreshold {
1949 #[prost(message, repeated, tag = "1")]
1950 pub rules: ::prost::alloc::vec::Vec<SloThresholdRule>,
1951 #[prost(oneof = "burn_rate_threshold::Type", tags = "2, 3")]
1952 pub r#type: ::core::option::Option<burn_rate_threshold::Type>,
1953}
1954pub mod burn_rate_threshold {
1956 #[derive(serde::Serialize, serde::Deserialize)]
1957 #[serde(rename_all = "snake_case")]
1958 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1959 pub enum Type {
1960 #[prost(message, tag = "2")]
1961 Dual(super::BurnRateTypeDual),
1962 #[prost(message, tag = "3")]
1963 Single(super::BurnRateTypeSingle),
1964 }
1965}
1966#[derive(serde::Serialize, serde::Deserialize)]
1967#[serde(rename_all = "snake_case")]
1968#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1969pub struct BurnRateTypeSingle {
1970 #[prost(message, optional, tag = "1")]
1971 pub time_duration: ::core::option::Option<TimeDuration>,
1972}
1973#[derive(serde::Serialize, serde::Deserialize)]
1974#[serde(rename_all = "snake_case")]
1975#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1976pub struct BurnRateTypeDual {
1977 #[prost(message, optional, tag = "1")]
1978 pub time_duration: ::core::option::Option<TimeDuration>,
1979}
1980#[derive(serde::Serialize, serde::Deserialize)]
1981#[serde(rename_all = "snake_case")]
1982#[derive(Clone, PartialEq, ::prost::Message)]
1983pub struct TracingFilter {
1984 #[prost(oneof = "tracing_filter::FilterType", tags = "1")]
1985 pub filter_type: ::core::option::Option<tracing_filter::FilterType>,
1986}
1987pub mod tracing_filter {
1989 #[derive(serde::Serialize, serde::Deserialize)]
1990 #[serde(rename_all = "snake_case")]
1991 #[derive(Clone, PartialEq, ::prost::Oneof)]
1992 pub enum FilterType {
1993 #[prost(message, tag = "1")]
1994 SimpleFilter(super::TracingSimpleFilter),
1995 }
1996}
1997#[derive(serde::Serialize, serde::Deserialize)]
1998#[serde(rename_all = "snake_case")]
1999#[derive(Clone, PartialEq, ::prost::Message)]
2000pub struct TracingSimpleFilter {
2001 #[prost(message, optional, tag = "1")]
2002 pub tracing_label_filters: ::core::option::Option<TracingLabelFilters>,
2003 #[prost(message, optional, tag = "2")]
2004 pub latency_threshold_ms: ::core::option::Option<u64>,
2005}
2006#[derive(serde::Serialize, serde::Deserialize)]
2007#[serde(rename_all = "snake_case")]
2008#[derive(Clone, PartialEq, ::prost::Message)]
2009pub struct TracingLabelFilters {
2010 #[prost(message, repeated, tag = "1")]
2011 pub application_name: ::prost::alloc::vec::Vec<TracingFilterType>,
2012 #[prost(message, repeated, tag = "2")]
2013 pub subsystem_name: ::prost::alloc::vec::Vec<TracingFilterType>,
2014 #[prost(message, repeated, tag = "3")]
2015 pub service_name: ::prost::alloc::vec::Vec<TracingFilterType>,
2016 #[prost(message, repeated, tag = "4")]
2017 pub operation_name: ::prost::alloc::vec::Vec<TracingFilterType>,
2018 #[prost(message, repeated, tag = "5")]
2019 pub span_fields: ::prost::alloc::vec::Vec<TracingSpanFieldsFilterType>,
2020}
2021#[derive(serde::Serialize, serde::Deserialize)]
2022#[serde(rename_all = "snake_case")]
2023#[derive(Clone, PartialEq, ::prost::Message)]
2024pub struct TracingSpanFieldsFilterType {
2025 #[prost(message, optional, tag = "1")]
2026 pub key: ::core::option::Option<::prost::alloc::string::String>,
2027 #[prost(message, optional, tag = "2")]
2028 pub filter_type: ::core::option::Option<TracingFilterType>,
2029}
2030#[derive(serde::Serialize, serde::Deserialize)]
2031#[serde(rename_all = "snake_case")]
2032#[derive(Clone, PartialEq, ::prost::Message)]
2033pub struct TracingFilterType {
2034 #[prost(message, repeated, tag = "1")]
2035 pub values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2036 #[prost(enumeration = "TracingFilterOperationType", tag = "2")]
2037 pub operation: i32,
2038}
2039#[derive(serde::Serialize, serde::Deserialize)]
2040#[serde(rename_all = "snake_case")]
2041#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2042#[repr(i32)]
2043pub enum TracingFilterOperationType {
2044 IsOrUnspecified = 0,
2045 Includes = 1,
2046 EndsWith = 2,
2047 StartsWith = 3,
2048 IsNot = 4,
2049}
2050impl TracingFilterOperationType {
2051 pub fn as_str_name(&self) -> &'static str {
2056 match self {
2057 Self::IsOrUnspecified => "TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED",
2058 Self::Includes => "TRACING_FILTER_OPERATION_TYPE_INCLUDES",
2059 Self::EndsWith => "TRACING_FILTER_OPERATION_TYPE_ENDS_WITH",
2060 Self::StartsWith => "TRACING_FILTER_OPERATION_TYPE_STARTS_WITH",
2061 Self::IsNot => "TRACING_FILTER_OPERATION_TYPE_IS_NOT",
2062 }
2063 }
2064 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2066 match value {
2067 "TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED" => {
2068 Some(Self::IsOrUnspecified)
2069 }
2070 "TRACING_FILTER_OPERATION_TYPE_INCLUDES" => Some(Self::Includes),
2071 "TRACING_FILTER_OPERATION_TYPE_ENDS_WITH" => Some(Self::EndsWith),
2072 "TRACING_FILTER_OPERATION_TYPE_STARTS_WITH" => Some(Self::StartsWith),
2073 "TRACING_FILTER_OPERATION_TYPE_IS_NOT" => Some(Self::IsNot),
2074 _ => None,
2075 }
2076 }
2077}
2078#[derive(serde::Serialize, serde::Deserialize)]
2079#[serde(rename_all = "snake_case")]
2080#[derive(Clone, PartialEq, ::prost::Message)]
2081pub struct TracingImmediateType {
2082 #[prost(message, optional, tag = "1")]
2083 pub tracing_filter: ::core::option::Option<TracingFilter>,
2084 #[prost(message, repeated, tag = "2")]
2085 pub notification_payload_filter: ::prost::alloc::vec::Vec<
2086 ::prost::alloc::string::String,
2087 >,
2088}
2089#[derive(serde::Serialize, serde::Deserialize)]
2090#[serde(rename_all = "snake_case")]
2091#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2092#[repr(i32)]
2093pub enum TracingThresholdConditionType {
2094 MoreThanOrUnspecified = 0,
2095}
2096impl TracingThresholdConditionType {
2097 pub fn as_str_name(&self) -> &'static str {
2102 match self {
2103 Self::MoreThanOrUnspecified => {
2104 "TRACING_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"
2105 }
2106 }
2107 }
2108 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2110 match value {
2111 "TRACING_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED" => {
2112 Some(Self::MoreThanOrUnspecified)
2113 }
2114 _ => None,
2115 }
2116 }
2117}
2118#[derive(serde::Serialize, serde::Deserialize)]
2119#[serde(rename_all = "snake_case")]
2120#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2121pub struct TracingTimeWindow {
2122 #[prost(oneof = "tracing_time_window::Type", tags = "1")]
2123 pub r#type: ::core::option::Option<tracing_time_window::Type>,
2124}
2125pub mod tracing_time_window {
2127 #[derive(serde::Serialize, serde::Deserialize)]
2128 #[serde(rename_all = "snake_case")]
2129 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
2130 pub enum Type {
2131 #[prost(enumeration = "super::TracingTimeWindowValue", tag = "1")]
2132 TracingTimeWindowValue(i32),
2133 }
2134}
2135#[derive(serde::Serialize, serde::Deserialize)]
2136#[serde(rename_all = "snake_case")]
2137#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2138#[repr(i32)]
2139pub enum TracingTimeWindowValue {
2140 Minutes5OrUnspecified = 0,
2141 Minutes10 = 1,
2142 Minutes15 = 2,
2143 Minutes20 = 11,
2144 Minutes30 = 3,
2145 Hour1 = 4,
2146 Hours2 = 5,
2147 Hours4 = 6,
2148 Hours6 = 7,
2149 Hours12 = 8,
2150 Hours24 = 9,
2151 Hours36 = 10,
2152}
2153impl TracingTimeWindowValue {
2154 pub fn as_str_name(&self) -> &'static str {
2159 match self {
2160 Self::Minutes5OrUnspecified => {
2161 "TRACING_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED"
2162 }
2163 Self::Minutes10 => "TRACING_TIME_WINDOW_VALUE_MINUTES_10",
2164 Self::Minutes15 => "TRACING_TIME_WINDOW_VALUE_MINUTES_15",
2165 Self::Minutes20 => "TRACING_TIME_WINDOW_VALUE_MINUTES_20",
2166 Self::Minutes30 => "TRACING_TIME_WINDOW_VALUE_MINUTES_30",
2167 Self::Hour1 => "TRACING_TIME_WINDOW_VALUE_HOUR_1",
2168 Self::Hours2 => "TRACING_TIME_WINDOW_VALUE_HOURS_2",
2169 Self::Hours4 => "TRACING_TIME_WINDOW_VALUE_HOURS_4",
2170 Self::Hours6 => "TRACING_TIME_WINDOW_VALUE_HOURS_6",
2171 Self::Hours12 => "TRACING_TIME_WINDOW_VALUE_HOURS_12",
2172 Self::Hours24 => "TRACING_TIME_WINDOW_VALUE_HOURS_24",
2173 Self::Hours36 => "TRACING_TIME_WINDOW_VALUE_HOURS_36",
2174 }
2175 }
2176 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2178 match value {
2179 "TRACING_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED" => {
2180 Some(Self::Minutes5OrUnspecified)
2181 }
2182 "TRACING_TIME_WINDOW_VALUE_MINUTES_10" => Some(Self::Minutes10),
2183 "TRACING_TIME_WINDOW_VALUE_MINUTES_15" => Some(Self::Minutes15),
2184 "TRACING_TIME_WINDOW_VALUE_MINUTES_20" => Some(Self::Minutes20),
2185 "TRACING_TIME_WINDOW_VALUE_MINUTES_30" => Some(Self::Minutes30),
2186 "TRACING_TIME_WINDOW_VALUE_HOUR_1" => Some(Self::Hour1),
2187 "TRACING_TIME_WINDOW_VALUE_HOURS_2" => Some(Self::Hours2),
2188 "TRACING_TIME_WINDOW_VALUE_HOURS_4" => Some(Self::Hours4),
2189 "TRACING_TIME_WINDOW_VALUE_HOURS_6" => Some(Self::Hours6),
2190 "TRACING_TIME_WINDOW_VALUE_HOURS_12" => Some(Self::Hours12),
2191 "TRACING_TIME_WINDOW_VALUE_HOURS_24" => Some(Self::Hours24),
2192 "TRACING_TIME_WINDOW_VALUE_HOURS_36" => Some(Self::Hours36),
2193 _ => None,
2194 }
2195 }
2196}
2197#[derive(serde::Serialize, serde::Deserialize)]
2198#[serde(rename_all = "snake_case")]
2199#[derive(Clone, PartialEq, ::prost::Message)]
2200pub struct TracingThresholdType {
2201 #[prost(message, optional, tag = "1")]
2202 pub tracing_filter: ::core::option::Option<TracingFilter>,
2203 #[prost(message, repeated, tag = "2")]
2204 pub rules: ::prost::alloc::vec::Vec<TracingThresholdRule>,
2205 #[prost(message, repeated, tag = "3")]
2206 pub notification_payload_filter: ::prost::alloc::vec::Vec<
2207 ::prost::alloc::string::String,
2208 >,
2209}
2210#[derive(serde::Serialize, serde::Deserialize)]
2211#[serde(rename_all = "snake_case")]
2212#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2213pub struct TracingThresholdRule {
2214 #[prost(message, optional, tag = "1")]
2215 pub condition: ::core::option::Option<TracingThresholdCondition>,
2216}
2217#[derive(serde::Serialize, serde::Deserialize)]
2218#[serde(rename_all = "snake_case")]
2219#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2220pub struct TracingThresholdCondition {
2221 #[prost(message, optional, tag = "1")]
2222 pub span_amount: ::core::option::Option<f64>,
2223 #[prost(message, optional, tag = "2")]
2224 pub time_window: ::core::option::Option<TracingTimeWindow>,
2225 #[prost(enumeration = "TracingThresholdConditionType", tag = "3")]
2226 pub condition_type: i32,
2227}
2228#[derive(serde::Serialize, serde::Deserialize)]
2231#[serde(rename_all = "snake_case")]
2232#[derive(Clone, PartialEq, ::prost::Message)]
2233pub struct AlertDef {
2234 #[prost(message, optional, tag = "1")]
2235 pub alert_def_properties: ::core::option::Option<AlertDefProperties>,
2236 #[prost(message, optional, tag = "2")]
2238 pub id: ::core::option::Option<::prost::alloc::string::String>,
2239 #[prost(message, optional, tag = "20")]
2241 pub alert_version_id: ::core::option::Option<::prost::alloc::string::String>,
2242 #[prost(message, optional, tag = "3")]
2243 pub created_time: ::core::option::Option<::prost_wkt_types::Timestamp>,
2244 #[prost(message, optional, tag = "4")]
2245 pub updated_time: ::core::option::Option<::prost_wkt_types::Timestamp>,
2246 #[prost(message, optional, tag = "5")]
2247 pub last_triggered_time: ::core::option::Option<::prost_wkt_types::Timestamp>,
2248 #[prost(enumeration = "AlertDefStatus", optional, tag = "6")]
2249 pub status: ::core::option::Option<i32>,
2250}
2251#[derive(serde::Serialize, serde::Deserialize)]
2254#[serde(rename_all = "snake_case")]
2255#[derive(Clone, PartialEq, ::prost::Message)]
2256pub struct AlertDefProperties {
2257 #[prost(message, optional, tag = "1")]
2258 pub name: ::core::option::Option<::prost::alloc::string::String>,
2259 #[prost(message, optional, tag = "2")]
2260 pub description: ::core::option::Option<::prost::alloc::string::String>,
2261 #[prost(message, optional, tag = "3")]
2262 pub enabled: ::core::option::Option<bool>,
2263 #[prost(enumeration = "AlertDefPriority", tag = "4")]
2264 pub priority: i32,
2265 #[prost(enumeration = "AlertDefType", tag = "6")]
2266 pub r#type: i32,
2267 #[prost(message, repeated, tag = "7")]
2268 pub group_by_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2269 #[prost(message, optional, tag = "8")]
2270 pub incidents_settings: ::core::option::Option<AlertDefIncidentSettings>,
2271 #[prost(message, optional, tag = "9")]
2272 pub notification_group: ::core::option::Option<AlertDefNotificationGroup>,
2273 #[deprecated]
2274 #[prost(message, repeated, tag = "210")]
2275 pub notification_group_excess: ::prost::alloc::vec::Vec<AlertDefNotificationGroup>,
2276 #[prost(map = "string, string", tag = "10")]
2277 pub entity_labels: ::std::collections::HashMap<
2278 ::prost::alloc::string::String,
2279 ::prost::alloc::string::String,
2280 >,
2281 #[prost(message, optional, tag = "11")]
2282 pub phantom_mode: ::core::option::Option<bool>,
2283 #[prost(message, optional, tag = "12")]
2284 pub deleted: ::core::option::Option<bool>,
2285 #[prost(oneof = "alert_def_properties::Schedule", tags = "5")]
2286 pub schedule: ::core::option::Option<alert_def_properties::Schedule>,
2287 #[prost(
2288 oneof = "alert_def_properties::TypeDefinition",
2289 tags = "101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113"
2290 )]
2291 pub type_definition: ::core::option::Option<alert_def_properties::TypeDefinition>,
2292}
2293pub mod alert_def_properties {
2295 #[derive(serde::Serialize, serde::Deserialize)]
2296 #[serde(rename_all = "snake_case")]
2297 #[derive(Clone, PartialEq, ::prost::Oneof)]
2298 pub enum Schedule {
2299 #[prost(message, tag = "5")]
2300 ActiveOn(super::ActivitySchedule),
2301 }
2302 #[derive(serde::Serialize, serde::Deserialize)]
2303 #[serde(rename_all = "snake_case")]
2304 #[derive(Clone, PartialEq, ::prost::Oneof)]
2305 pub enum TypeDefinition {
2306 #[prost(message, tag = "101")]
2307 LogsImmediate(super::LogsImmediateType),
2308 #[prost(message, tag = "102")]
2309 TracingImmediate(super::TracingImmediateType),
2310 #[prost(message, tag = "103")]
2311 LogsThreshold(super::LogsThresholdType),
2312 #[prost(message, tag = "104")]
2313 LogsRatioThreshold(super::LogsRatioThresholdType),
2314 #[prost(message, tag = "105")]
2315 LogsTimeRelativeThreshold(super::LogsTimeRelativeThresholdType),
2316 #[prost(message, tag = "106")]
2317 MetricThreshold(super::MetricThresholdType),
2318 #[prost(message, tag = "107")]
2319 TracingThreshold(super::TracingThresholdType),
2320 #[prost(message, tag = "108")]
2321 Flow(super::FlowType),
2322 #[prost(message, tag = "109")]
2323 LogsAnomaly(super::LogsAnomalyType),
2324 #[prost(message, tag = "110")]
2325 MetricAnomaly(super::MetricAnomalyType),
2326 #[prost(message, tag = "111")]
2327 LogsNewValue(super::LogsNewValueType),
2328 #[prost(message, tag = "112")]
2329 LogsUniqueCount(super::LogsUniqueCountType),
2330 #[prost(message, tag = "113")]
2331 SloThreshold(super::SloThresholdType),
2332 }
2333}
2334#[derive(serde::Serialize, serde::Deserialize)]
2335#[serde(rename_all = "snake_case")]
2336#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2337pub struct TimeRange {
2338 #[prost(message, optional, tag = "1")]
2339 pub start_time: ::core::option::Option<::prost_wkt_types::Timestamp>,
2340 #[prost(message, optional, tag = "2")]
2341 pub end_time: ::core::option::Option<::prost_wkt_types::Timestamp>,
2342}
2343#[derive(serde::Serialize, serde::Deserialize)]
2344#[serde(rename_all = "snake_case")]
2345#[derive(Clone, PartialEq, ::prost::Message)]
2346pub struct AlertDefQueryFilter {
2347 #[prost(message, optional, tag = "1")]
2348 pub name_filter: ::core::option::Option<AlertDefNameFilter>,
2349 #[prost(message, optional, tag = "2")]
2350 pub type_filter: ::core::option::Option<AlertDefTypeFilter>,
2351 #[prost(message, optional, tag = "3")]
2352 pub entity_labels_filter: ::core::option::Option<AlertDefEntityLabelsFilter>,
2353 #[prost(message, optional, tag = "4")]
2354 pub priority_filter: ::core::option::Option<AlertDefPriorityFilter>,
2355 #[prost(message, optional, tag = "5")]
2356 pub enabled_filter: ::core::option::Option<AlertDefEnabledFilter>,
2357 #[prost(message, optional, tag = "7")]
2358 pub modified_time_range_filter: ::core::option::Option<AlertDefModifiedTimeFilter>,
2359 #[prost(message, optional, tag = "8")]
2360 pub last_triggered_time_range_filter: ::core::option::Option<
2361 AlertDefLastTriggeredTimeFilter,
2362 >,
2363 #[prost(message, optional, tag = "9")]
2364 pub type_specific_filter: ::core::option::Option<AlertDefTypeSpecificFilter>,
2365 #[prost(message, optional, tag = "10")]
2366 pub status_filter: ::core::option::Option<AlertDefStatusFilter>,
2367}
2368#[derive(serde::Serialize, serde::Deserialize)]
2369#[serde(rename_all = "snake_case")]
2370#[derive(Clone, PartialEq, ::prost::Message)]
2371pub struct AlertDefNameFilter {
2372 #[prost(message, repeated, tag = "1")]
2373 pub name: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2374 #[prost(enumeration = "FilterMatcher", tag = "2")]
2375 pub matcher: i32,
2376}
2377#[derive(serde::Serialize, serde::Deserialize)]
2378#[serde(rename_all = "snake_case")]
2379#[derive(Clone, PartialEq, ::prost::Message)]
2380pub struct AlertDefPriorityFilter {
2381 #[prost(enumeration = "AlertDefPriority", repeated, packed = "false", tag = "1")]
2382 pub priority: ::prost::alloc::vec::Vec<i32>,
2383 #[prost(enumeration = "FilterMatcher", tag = "2")]
2384 pub matcher: i32,
2385}
2386#[derive(serde::Serialize, serde::Deserialize)]
2387#[serde(rename_all = "snake_case")]
2388#[derive(Clone, PartialEq, ::prost::Message)]
2389pub struct AlertDefEntityLabelsFilter {
2390 #[prost(map = "string, string", tag = "1")]
2391 pub entity_labels: ::std::collections::HashMap<
2392 ::prost::alloc::string::String,
2393 ::prost::alloc::string::String,
2394 >,
2395 #[prost(enumeration = "FilterValuesOperator", tag = "3")]
2396 pub values_operator: i32,
2397}
2398#[derive(serde::Serialize, serde::Deserialize)]
2399#[serde(rename_all = "snake_case")]
2400#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2401pub struct AlertDefModifiedTimeFilter {
2402 #[prost(message, optional, tag = "1")]
2403 pub modified_at_range: ::core::option::Option<TimeRange>,
2404}
2405#[derive(serde::Serialize, serde::Deserialize)]
2406#[serde(rename_all = "snake_case")]
2407#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2408pub struct AlertDefLastTriggeredTimeFilter {
2409 #[prost(message, optional, tag = "1")]
2410 pub last_triggered_at_range: ::core::option::Option<TimeRange>,
2411}
2412#[derive(serde::Serialize, serde::Deserialize)]
2413#[serde(rename_all = "snake_case")]
2414#[derive(Clone, PartialEq, ::prost::Message)]
2415pub struct AlertDefTypeFilter {
2416 #[prost(enumeration = "AlertDefType", repeated, packed = "false", tag = "1")]
2417 pub r#type: ::prost::alloc::vec::Vec<i32>,
2418 #[prost(enumeration = "FilterMatcher", tag = "2")]
2419 pub matcher: i32,
2420}
2421#[derive(serde::Serialize, serde::Deserialize)]
2422#[serde(rename_all = "snake_case")]
2423#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2424pub struct AlertDefEnabledFilter {
2425 #[prost(message, optional, tag = "1")]
2426 pub enabled: ::core::option::Option<bool>,
2427}
2428#[derive(serde::Serialize, serde::Deserialize)]
2429#[serde(rename_all = "snake_case")]
2430#[derive(Clone, PartialEq, ::prost::Message)]
2431pub struct AlertDefTypeSpecificFilter {
2432 #[prost(oneof = "alert_def_type_specific_filter::TypeSpecificFilter", tags = "1")]
2433 pub type_specific_filter: ::core::option::Option<
2434 alert_def_type_specific_filter::TypeSpecificFilter,
2435 >,
2436}
2437pub mod alert_def_type_specific_filter {
2439 #[derive(serde::Serialize, serde::Deserialize)]
2440 #[serde(rename_all = "snake_case")]
2441 #[derive(Clone, PartialEq, ::prost::Oneof)]
2442 pub enum TypeSpecificFilter {
2443 #[prost(message, tag = "1")]
2444 SloFilter(super::AlertDefSloSpecificFilter),
2445 }
2446}
2447#[derive(serde::Serialize, serde::Deserialize)]
2448#[serde(rename_all = "snake_case")]
2449#[derive(Clone, PartialEq, ::prost::Message)]
2450pub struct AlertDefSloSpecificFilter {
2451 #[prost(message, repeated, tag = "1")]
2452 pub slo_id: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2453 #[prost(enumeration = "FilterMatcher", tag = "2")]
2454 pub matcher: i32,
2455}
2456#[derive(serde::Serialize, serde::Deserialize)]
2457#[serde(rename_all = "snake_case")]
2458#[derive(Clone, PartialEq, ::prost::Message)]
2459pub struct AlertDefStatusFilter {
2460 #[prost(enumeration = "AlertDefStatus", repeated, packed = "false", tag = "1")]
2461 pub status: ::prost::alloc::vec::Vec<i32>,
2462 #[prost(enumeration = "FilterMatcher", tag = "2")]
2463 pub matcher: i32,
2464}
2465#[derive(serde::Serialize, serde::Deserialize)]
2466#[serde(rename_all = "snake_case")]
2467#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2468#[repr(i32)]
2469pub enum FilterMatcher {
2470 Unspecified = 0,
2471 Equals = 1,
2472 NotEquals = 2,
2473 Contains = 3,
2474}
2475impl FilterMatcher {
2476 pub fn as_str_name(&self) -> &'static str {
2481 match self {
2482 Self::Unspecified => "FILTER_MATCHER_UNSPECIFIED",
2483 Self::Equals => "FILTER_MATCHER_EQUALS",
2484 Self::NotEquals => "FILTER_MATCHER_NOT_EQUALS",
2485 Self::Contains => "FILTER_MATCHER_CONTAINS",
2486 }
2487 }
2488 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2490 match value {
2491 "FILTER_MATCHER_UNSPECIFIED" => Some(Self::Unspecified),
2492 "FILTER_MATCHER_EQUALS" => Some(Self::Equals),
2493 "FILTER_MATCHER_NOT_EQUALS" => Some(Self::NotEquals),
2494 "FILTER_MATCHER_CONTAINS" => Some(Self::Contains),
2495 _ => None,
2496 }
2497 }
2498}
2499#[derive(serde::Serialize, serde::Deserialize)]
2500#[serde(rename_all = "snake_case")]
2501#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2502#[repr(i32)]
2503pub enum FilterValuesOperator {
2504 Unspecified = 0,
2505 Or = 1,
2506 And = 2,
2507}
2508impl FilterValuesOperator {
2509 pub fn as_str_name(&self) -> &'static str {
2514 match self {
2515 Self::Unspecified => "FILTER_VALUES_OPERATOR_UNSPECIFIED",
2516 Self::Or => "FILTER_VALUES_OPERATOR_OR",
2517 Self::And => "FILTER_VALUES_OPERATOR_AND",
2518 }
2519 }
2520 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2522 match value {
2523 "FILTER_VALUES_OPERATOR_UNSPECIFIED" => Some(Self::Unspecified),
2524 "FILTER_VALUES_OPERATOR_OR" => Some(Self::Or),
2525 "FILTER_VALUES_OPERATOR_AND" => Some(Self::And),
2526 _ => None,
2527 }
2528 }
2529}
2530#[derive(serde::Serialize, serde::Deserialize)]
2531#[serde(rename_all = "snake_case")]
2532#[derive(Clone, PartialEq, ::prost::Message)]
2533pub struct PaginationRequest {
2534 #[prost(message, optional, tag = "1")]
2535 pub page_size: ::core::option::Option<u32>,
2536 #[prost(message, optional, tag = "2")]
2537 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
2538}
2539#[derive(serde::Serialize, serde::Deserialize)]
2540#[serde(rename_all = "snake_case")]
2541#[derive(Clone, PartialEq, ::prost::Message)]
2542pub struct PaginationResponse {
2543 #[prost(message, optional, tag = "1")]
2544 pub total_size: ::core::option::Option<u32>,
2545 #[prost(message, optional, tag = "2")]
2546 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
2547}
2548#[derive(serde::Serialize, serde::Deserialize)]
2549#[serde(rename_all = "snake_case")]
2550#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2551pub struct AlertDefOrderBy {
2552 #[prost(enumeration = "AlertDefOrderByFields", tag = "1")]
2553 pub field_name: i32,
2554 #[prost(enumeration = "AlertDefOrderByDirection", tag = "2")]
2555 pub direction: i32,
2556}
2557#[derive(serde::Serialize, serde::Deserialize)]
2558#[serde(rename_all = "snake_case")]
2559#[derive(Clone, PartialEq, ::prost::Message)]
2560pub struct AlertDefOrderByList {
2561 #[prost(message, repeated, tag = "1")]
2562 pub order_bys: ::prost::alloc::vec::Vec<AlertDefOrderBy>,
2563}
2564#[derive(serde::Serialize, serde::Deserialize)]
2565#[serde(rename_all = "snake_case")]
2566#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2567#[repr(i32)]
2568pub enum AlertDefOrderByFields {
2569 Unspecified = 0,
2570 Priority = 1,
2571 LastTriggeredTime = 2,
2572 UpdatedTime = 3,
2573 Enabled = 4,
2574}
2575impl AlertDefOrderByFields {
2576 pub fn as_str_name(&self) -> &'static str {
2581 match self {
2582 Self::Unspecified => "ALERT_DEF_ORDER_BY_FIELDS_UNSPECIFIED",
2583 Self::Priority => "ALERT_DEF_ORDER_BY_FIELDS_PRIORITY",
2584 Self::LastTriggeredTime => "ALERT_DEF_ORDER_BY_FIELDS_LAST_TRIGGERED_TIME",
2585 Self::UpdatedTime => "ALERT_DEF_ORDER_BY_FIELDS_UPDATED_TIME",
2586 Self::Enabled => "ALERT_DEF_ORDER_BY_FIELDS_ENABLED",
2587 }
2588 }
2589 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2591 match value {
2592 "ALERT_DEF_ORDER_BY_FIELDS_UNSPECIFIED" => Some(Self::Unspecified),
2593 "ALERT_DEF_ORDER_BY_FIELDS_PRIORITY" => Some(Self::Priority),
2594 "ALERT_DEF_ORDER_BY_FIELDS_LAST_TRIGGERED_TIME" => {
2595 Some(Self::LastTriggeredTime)
2596 }
2597 "ALERT_DEF_ORDER_BY_FIELDS_UPDATED_TIME" => Some(Self::UpdatedTime),
2598 "ALERT_DEF_ORDER_BY_FIELDS_ENABLED" => Some(Self::Enabled),
2599 _ => None,
2600 }
2601 }
2602}
2603#[derive(serde::Serialize, serde::Deserialize)]
2604#[serde(rename_all = "snake_case")]
2605#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2606#[repr(i32)]
2607pub enum AlertDefOrderByDirection {
2608 AscOrUnspecified = 0,
2609 Desc = 1,
2610}
2611impl AlertDefOrderByDirection {
2612 pub fn as_str_name(&self) -> &'static str {
2617 match self {
2618 Self::AscOrUnspecified => "ALERT_DEF_ORDER_BY_DIRECTION_ASC_OR_UNSPECIFIED",
2619 Self::Desc => "ALERT_DEF_ORDER_BY_DIRECTION_DESC",
2620 }
2621 }
2622 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2624 match value {
2625 "ALERT_DEF_ORDER_BY_DIRECTION_ASC_OR_UNSPECIFIED" => {
2626 Some(Self::AscOrUnspecified)
2627 }
2628 "ALERT_DEF_ORDER_BY_DIRECTION_DESC" => Some(Self::Desc),
2629 _ => None,
2630 }
2631 }
2632}
2633#[derive(serde::Serialize, serde::Deserialize)]
2634#[serde(rename_all = "snake_case")]
2635#[derive(Clone, PartialEq, ::prost::Message)]
2636pub struct FilterOptionCountsRequest {
2637 #[prost(message, optional, tag = "1")]
2638 pub query_filter: ::core::option::Option<FilterOptionCountsFilter>,
2639}
2640#[derive(serde::Serialize, serde::Deserialize)]
2641#[serde(rename_all = "snake_case")]
2642#[derive(Clone, PartialEq, ::prost::Message)]
2643pub struct FilterOptionCountsResponse {
2644 #[prost(message, optional, tag = "1")]
2645 pub counts: ::core::option::Option<FilterOptionCounts>,
2646}
2647#[derive(serde::Serialize, serde::Deserialize)]
2648#[serde(rename_all = "snake_case")]
2649#[derive(Clone, PartialEq, ::prost::Message)]
2650pub struct FilterOptionCountsFilter {
2651 #[prost(message, optional, tag = "1")]
2652 pub name_filter: ::core::option::Option<FilterOptionCountsNameFilter>,
2653 #[prost(message, optional, tag = "2")]
2654 pub type_filter: ::core::option::Option<FilterOptionCountsTypeFilter>,
2655 #[prost(message, optional, tag = "3")]
2656 pub priority_filter: ::core::option::Option<FilterOptionCountsPriorityFilter>,
2657 #[prost(message, optional, tag = "4")]
2658 pub entity_labels_filter: ::core::option::Option<
2659 FilterOptionCountsEntityLabelsFilter,
2660 >,
2661 #[prost(message, optional, tag = "5")]
2662 pub status_filter: ::core::option::Option<FilterOptionCountsStatusFilter>,
2663 #[prost(message, optional, tag = "6")]
2664 pub enabled_filter: ::core::option::Option<FilterOptionCountsEnabledFilter>,
2665}
2666#[derive(serde::Serialize, serde::Deserialize)]
2667#[serde(rename_all = "snake_case")]
2668#[derive(Clone, PartialEq, ::prost::Message)]
2669pub struct FilterOptionCountsNameFilter {
2670 #[prost(message, repeated, tag = "1")]
2671 pub name: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2672 #[prost(enumeration = "FilterMatcher", tag = "2")]
2673 pub matcher: i32,
2674}
2675#[derive(serde::Serialize, serde::Deserialize)]
2676#[serde(rename_all = "snake_case")]
2677#[derive(Clone, PartialEq, ::prost::Message)]
2678pub struct FilterOptionCountsTypeFilter {
2679 #[prost(enumeration = "AlertDefType", repeated, packed = "false", tag = "1")]
2680 pub r#type: ::prost::alloc::vec::Vec<i32>,
2681}
2682#[derive(serde::Serialize, serde::Deserialize)]
2683#[serde(rename_all = "snake_case")]
2684#[derive(Clone, PartialEq, ::prost::Message)]
2685pub struct FilterOptionCountsPriorityFilter {
2686 #[prost(enumeration = "AlertDefPriority", repeated, packed = "false", tag = "1")]
2687 pub priority: ::prost::alloc::vec::Vec<i32>,
2688}
2689#[derive(serde::Serialize, serde::Deserialize)]
2690#[serde(rename_all = "snake_case")]
2691#[derive(Clone, PartialEq, ::prost::Message)]
2692pub struct FilterOptionCountsEntityLabelsFilter {
2693 #[prost(map = "string, string", tag = "1")]
2694 pub entity_labels: ::std::collections::HashMap<
2695 ::prost::alloc::string::String,
2696 ::prost::alloc::string::String,
2697 >,
2698 #[prost(enumeration = "FilterValuesOperator", tag = "2")]
2699 pub values_operator: i32,
2700}
2701#[derive(serde::Serialize, serde::Deserialize)]
2702#[serde(rename_all = "snake_case")]
2703#[derive(Clone, PartialEq, ::prost::Message)]
2704pub struct FilterOptionCountsStatusFilter {
2705 #[prost(enumeration = "AlertDefStatus", repeated, packed = "false", tag = "1")]
2706 pub status: ::prost::alloc::vec::Vec<i32>,
2707 #[prost(enumeration = "FilterMatcher", tag = "2")]
2708 pub matcher: i32,
2709}
2710#[derive(serde::Serialize, serde::Deserialize)]
2711#[serde(rename_all = "snake_case")]
2712#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2713pub struct FilterOptionCountsEnabledFilter {
2714 #[prost(message, optional, tag = "1")]
2715 pub enabled: ::core::option::Option<bool>,
2716}
2717#[derive(serde::Serialize, serde::Deserialize)]
2718#[serde(rename_all = "snake_case")]
2719#[derive(Clone, PartialEq, ::prost::Message)]
2720pub struct FilterOptionCounts {
2721 #[prost(message, repeated, tag = "1")]
2722 pub type_counts: ::prost::alloc::vec::Vec<TypeCount>,
2723 #[prost(message, repeated, tag = "2")]
2724 pub priority_counts: ::prost::alloc::vec::Vec<PriorityCount>,
2725 #[prost(message, repeated, tag = "3")]
2726 pub entity_label_counts: ::prost::alloc::vec::Vec<EntityLabelCount>,
2727 #[prost(message, repeated, tag = "4")]
2728 pub status_counts: ::prost::alloc::vec::Vec<StatusCount>,
2729 #[prost(message, repeated, tag = "5")]
2730 pub enabled_counts: ::prost::alloc::vec::Vec<EnabledCount>,
2731}
2732#[derive(serde::Serialize, serde::Deserialize)]
2733#[serde(rename_all = "snake_case")]
2734#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2735pub struct TypeCount {
2736 #[prost(enumeration = "AlertDefType", tag = "1")]
2737 pub r#type: i32,
2738 #[prost(message, optional, tag = "2")]
2739 pub count: ::core::option::Option<u32>,
2740}
2741#[derive(serde::Serialize, serde::Deserialize)]
2742#[serde(rename_all = "snake_case")]
2743#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2744pub struct PriorityCount {
2745 #[prost(enumeration = "AlertDefPriority", tag = "1")]
2746 pub priority: i32,
2747 #[prost(message, optional, tag = "2")]
2748 pub count: ::core::option::Option<u32>,
2749}
2750#[derive(serde::Serialize, serde::Deserialize)]
2751#[serde(rename_all = "snake_case")]
2752#[derive(Clone, PartialEq, ::prost::Message)]
2753pub struct EntityLabelCount {
2754 #[prost(message, optional, tag = "1")]
2755 pub label_key: ::core::option::Option<::prost::alloc::string::String>,
2756 #[prost(message, optional, tag = "2")]
2757 pub label_value: ::core::option::Option<::prost::alloc::string::String>,
2758 #[prost(message, optional, tag = "3")]
2759 pub count: ::core::option::Option<u32>,
2760}
2761#[derive(serde::Serialize, serde::Deserialize)]
2762#[serde(rename_all = "snake_case")]
2763#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2764pub struct StatusCount {
2765 #[prost(enumeration = "AlertDefStatus", tag = "1")]
2766 pub status: i32,
2767 #[prost(message, optional, tag = "2")]
2768 pub count: ::core::option::Option<u32>,
2769}
2770#[derive(serde::Serialize, serde::Deserialize)]
2771#[serde(rename_all = "snake_case")]
2772#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2773pub struct EnabledCount {
2774 #[prost(message, optional, tag = "1")]
2775 pub enabled: ::core::option::Option<bool>,
2776 #[prost(message, optional, tag = "2")]
2777 pub count: ::core::option::Option<u32>,
2778}
2779#[derive(serde::Serialize, serde::Deserialize)]
2780#[serde(rename_all = "snake_case")]
2781#[derive(Clone, PartialEq, ::prost::Message)]
2782pub struct GetAlertDefRequest {
2783 #[prost(message, optional, tag = "1")]
2785 pub id: ::core::option::Option<::prost::alloc::string::String>,
2786}
2787#[derive(serde::Serialize, serde::Deserialize)]
2788#[serde(rename_all = "snake_case")]
2789#[derive(Clone, PartialEq, ::prost::Message)]
2790pub struct GetAlertDefByVersionIdRequest {
2791 #[prost(message, optional, tag = "1")]
2792 pub alert_version_id: ::core::option::Option<::prost::alloc::string::String>,
2793}
2794#[derive(serde::Serialize, serde::Deserialize)]
2795#[serde(rename_all = "snake_case")]
2796#[derive(Clone, PartialEq, ::prost::Message)]
2797pub struct GetAlertDefResponse {
2798 #[prost(message, optional, tag = "1")]
2799 pub alert_def: ::core::option::Option<AlertDef>,
2800}
2801#[derive(serde::Serialize, serde::Deserialize)]
2802#[serde(rename_all = "snake_case")]
2803#[derive(Clone, PartialEq, ::prost::Message)]
2804pub struct GetAlertDefByVersionIdResponse {
2805 #[prost(message, optional, tag = "1")]
2806 pub alert_def: ::core::option::Option<AlertDef>,
2807}
2808#[derive(serde::Serialize, serde::Deserialize)]
2809#[serde(rename_all = "snake_case")]
2810#[derive(Clone, PartialEq, ::prost::Message)]
2811pub struct ListAlertDefsResponse {
2812 #[prost(message, repeated, tag = "1")]
2813 pub alert_defs: ::prost::alloc::vec::Vec<AlertDef>,
2814 #[prost(message, optional, tag = "2")]
2815 pub pagination: ::core::option::Option<PaginationResponse>,
2816}
2817#[derive(serde::Serialize, serde::Deserialize)]
2818#[serde(rename_all = "snake_case")]
2819#[derive(Clone, PartialEq, ::prost::Message)]
2820pub struct ListAlertDefsRequest {
2821 #[prost(message, optional, tag = "1")]
2822 pub query_filter: ::core::option::Option<AlertDefQueryFilter>,
2823 #[prost(message, optional, tag = "2")]
2824 pub pagination: ::core::option::Option<PaginationRequest>,
2825 #[prost(message, optional, tag = "3")]
2826 pub order_bys: ::core::option::Option<AlertDefOrderByList>,
2827}
2828#[derive(serde::Serialize, serde::Deserialize)]
2829#[serde(rename_all = "snake_case")]
2830#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2831pub struct DownloadAlertsRequest {}
2832#[derive(serde::Serialize, serde::Deserialize)]
2833#[serde(rename_all = "snake_case")]
2834#[derive(Clone, PartialEq, ::prost::Message)]
2835pub struct DownloadAlertsResponse {
2836 #[prost(bytes = "vec", tag = "1")]
2837 pub content: ::prost::alloc::vec::Vec<u8>,
2838}
2839#[derive(serde::Serialize, serde::Deserialize)]
2840#[serde(rename_all = "snake_case")]
2841#[derive(Clone, PartialEq, ::prost::Message)]
2842pub struct BatchGetAlertDefRequest {
2843 #[prost(message, repeated, tag = "1")]
2844 pub ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2845}
2846#[derive(serde::Serialize, serde::Deserialize)]
2847#[serde(rename_all = "snake_case")]
2848#[derive(Clone, PartialEq, ::prost::Message)]
2849pub struct BatchGetAlertDefResponse {
2850 #[prost(map = "string, message", tag = "1")]
2851 pub alert_defs: ::std::collections::HashMap<
2852 ::prost::alloc::string::String,
2853 AlertDef,
2854 >,
2855 #[prost(message, repeated, tag = "2")]
2856 pub not_found_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2857}
2858#[derive(serde::Serialize, serde::Deserialize)]
2859#[serde(rename_all = "snake_case")]
2860#[derive(Clone, PartialEq, ::prost::Message)]
2861pub struct DeleteAlertDefRequest {
2862 #[prost(message, optional, tag = "1")]
2864 pub id: ::core::option::Option<::prost::alloc::string::String>,
2865}
2866#[derive(serde::Serialize, serde::Deserialize)]
2867#[serde(rename_all = "snake_case")]
2868#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2869pub struct DeleteAlertDefResponse {}
2870#[derive(serde::Serialize, serde::Deserialize)]
2871#[serde(rename_all = "snake_case")]
2872#[derive(Clone, PartialEq, ::prost::Message)]
2873pub struct ReplaceAlertDefRequest {
2874 #[prost(message, optional, tag = "1")]
2875 pub alert_def_properties: ::core::option::Option<AlertDefProperties>,
2876 #[prost(message, optional, tag = "2")]
2878 pub id: ::core::option::Option<::prost::alloc::string::String>,
2879}
2880#[derive(serde::Serialize, serde::Deserialize)]
2881#[serde(rename_all = "snake_case")]
2882#[derive(Clone, PartialEq, ::prost::Message)]
2883pub struct ReplaceAlertDefResponse {
2884 #[prost(message, optional, tag = "1")]
2885 pub alert_def: ::core::option::Option<AlertDef>,
2886}
2887#[derive(serde::Serialize, serde::Deserialize)]
2888#[serde(rename_all = "snake_case")]
2889#[derive(Clone, PartialEq, ::prost::Message)]
2890pub struct CreateAlertDefRequest {
2891 #[prost(message, optional, tag = "1")]
2892 pub alert_def_properties: ::core::option::Option<AlertDefProperties>,
2893}
2894#[derive(serde::Serialize, serde::Deserialize)]
2895#[serde(rename_all = "snake_case")]
2896#[derive(Clone, PartialEq, ::prost::Message)]
2897pub struct CreateAlertDefResponse {
2898 #[prost(message, optional, tag = "1")]
2899 pub alert_def: ::core::option::Option<AlertDef>,
2900}
2901#[derive(serde::Serialize, serde::Deserialize)]
2929#[serde(rename_all = "snake_case")]
2930#[derive(Clone, PartialEq, ::prost::Message)]
2931pub struct SetActiveRequest {
2932 #[prost(message, optional, tag = "1")]
2934 pub id: ::core::option::Option<::prost::alloc::string::String>,
2935 #[prost(message, optional, tag = "2")]
2936 pub active: ::core::option::Option<bool>,
2937}
2938#[derive(serde::Serialize, serde::Deserialize)]
2939#[serde(rename_all = "snake_case")]
2940#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2941pub struct SetActiveResponse {}
2942pub mod alert_defs_service_client {
2944 #![allow(
2945 unused_variables,
2946 dead_code,
2947 missing_docs,
2948 clippy::wildcard_imports,
2949 clippy::let_unit_value,
2950 )]
2951 use tonic::codegen::*;
2952 use tonic::codegen::http::Uri;
2953 #[derive(Debug, Clone)]
2954 pub struct AlertDefsServiceClient<T> {
2955 inner: tonic::client::Grpc<T>,
2956 }
2957 impl AlertDefsServiceClient<tonic::transport::Channel> {
2958 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2960 where
2961 D: TryInto<tonic::transport::Endpoint>,
2962 D::Error: Into<StdError>,
2963 {
2964 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2965 Ok(Self::new(conn))
2966 }
2967 }
2968 impl<T> AlertDefsServiceClient<T>
2969 where
2970 T: tonic::client::GrpcService<tonic::body::BoxBody>,
2971 T::Error: Into<StdError>,
2972 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2973 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2974 {
2975 pub fn new(inner: T) -> Self {
2976 let inner = tonic::client::Grpc::new(inner);
2977 Self { inner }
2978 }
2979 pub fn with_origin(inner: T, origin: Uri) -> Self {
2980 let inner = tonic::client::Grpc::with_origin(inner, origin);
2981 Self { inner }
2982 }
2983 pub fn with_interceptor<F>(
2984 inner: T,
2985 interceptor: F,
2986 ) -> AlertDefsServiceClient<InterceptedService<T, F>>
2987 where
2988 F: tonic::service::Interceptor,
2989 T::ResponseBody: Default,
2990 T: tonic::codegen::Service<
2991 http::Request<tonic::body::BoxBody>,
2992 Response = http::Response<
2993 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
2994 >,
2995 >,
2996 <T as tonic::codegen::Service<
2997 http::Request<tonic::body::BoxBody>,
2998 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2999 {
3000 AlertDefsServiceClient::new(InterceptedService::new(inner, interceptor))
3001 }
3002 #[must_use]
3007 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3008 self.inner = self.inner.send_compressed(encoding);
3009 self
3010 }
3011 #[must_use]
3013 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3014 self.inner = self.inner.accept_compressed(encoding);
3015 self
3016 }
3017 #[must_use]
3021 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3022 self.inner = self.inner.max_decoding_message_size(limit);
3023 self
3024 }
3025 #[must_use]
3029 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3030 self.inner = self.inner.max_encoding_message_size(limit);
3031 self
3032 }
3033 pub async fn get_alert_def(
3035 &mut self,
3036 request: impl tonic::IntoRequest<super::GetAlertDefRequest>,
3037 ) -> std::result::Result<
3038 tonic::Response<super::GetAlertDefResponse>,
3039 tonic::Status,
3040 > {
3041 self.inner
3042 .ready()
3043 .await
3044 .map_err(|e| {
3045 tonic::Status::unknown(
3046 format!("Service was not ready: {}", e.into()),
3047 )
3048 })?;
3049 let codec = tonic::codec::ProstCodec::default();
3050 let path = http::uri::PathAndQuery::from_static(
3051 "/com.coralogixapis.alerts.v3.AlertDefsService/GetAlertDef",
3052 );
3053 let mut req = request.into_request();
3054 req.extensions_mut()
3055 .insert(
3056 GrpcMethod::new(
3057 "com.coralogixapis.alerts.v3.AlertDefsService",
3058 "GetAlertDef",
3059 ),
3060 );
3061 self.inner.unary(req, path, codec).await
3062 }
3063 pub async fn get_alert_def_by_version_id(
3064 &mut self,
3065 request: impl tonic::IntoRequest<super::GetAlertDefByVersionIdRequest>,
3066 ) -> std::result::Result<
3067 tonic::Response<super::GetAlertDefByVersionIdResponse>,
3068 tonic::Status,
3069 > {
3070 self.inner
3071 .ready()
3072 .await
3073 .map_err(|e| {
3074 tonic::Status::unknown(
3075 format!("Service was not ready: {}", e.into()),
3076 )
3077 })?;
3078 let codec = tonic::codec::ProstCodec::default();
3079 let path = http::uri::PathAndQuery::from_static(
3080 "/com.coralogixapis.alerts.v3.AlertDefsService/GetAlertDefByVersionId",
3081 );
3082 let mut req = request.into_request();
3083 req.extensions_mut()
3084 .insert(
3085 GrpcMethod::new(
3086 "com.coralogixapis.alerts.v3.AlertDefsService",
3087 "GetAlertDefByVersionId",
3088 ),
3089 );
3090 self.inner.unary(req, path, codec).await
3091 }
3092 pub async fn create_alert_def(
3093 &mut self,
3094 request: impl tonic::IntoRequest<super::CreateAlertDefRequest>,
3095 ) -> std::result::Result<
3096 tonic::Response<super::CreateAlertDefResponse>,
3097 tonic::Status,
3098 > {
3099 self.inner
3100 .ready()
3101 .await
3102 .map_err(|e| {
3103 tonic::Status::unknown(
3104 format!("Service was not ready: {}", e.into()),
3105 )
3106 })?;
3107 let codec = tonic::codec::ProstCodec::default();
3108 let path = http::uri::PathAndQuery::from_static(
3109 "/com.coralogixapis.alerts.v3.AlertDefsService/CreateAlertDef",
3110 );
3111 let mut req = request.into_request();
3112 req.extensions_mut()
3113 .insert(
3114 GrpcMethod::new(
3115 "com.coralogixapis.alerts.v3.AlertDefsService",
3116 "CreateAlertDef",
3117 ),
3118 );
3119 self.inner.unary(req, path, codec).await
3120 }
3121 pub async fn replace_alert_def(
3122 &mut self,
3123 request: impl tonic::IntoRequest<super::ReplaceAlertDefRequest>,
3124 ) -> std::result::Result<
3125 tonic::Response<super::ReplaceAlertDefResponse>,
3126 tonic::Status,
3127 > {
3128 self.inner
3129 .ready()
3130 .await
3131 .map_err(|e| {
3132 tonic::Status::unknown(
3133 format!("Service was not ready: {}", e.into()),
3134 )
3135 })?;
3136 let codec = tonic::codec::ProstCodec::default();
3137 let path = http::uri::PathAndQuery::from_static(
3138 "/com.coralogixapis.alerts.v3.AlertDefsService/ReplaceAlertDef",
3139 );
3140 let mut req = request.into_request();
3141 req.extensions_mut()
3142 .insert(
3143 GrpcMethod::new(
3144 "com.coralogixapis.alerts.v3.AlertDefsService",
3145 "ReplaceAlertDef",
3146 ),
3147 );
3148 self.inner.unary(req, path, codec).await
3149 }
3150 pub async fn list_alert_defs(
3151 &mut self,
3152 request: impl tonic::IntoRequest<super::ListAlertDefsRequest>,
3153 ) -> std::result::Result<
3154 tonic::Response<super::ListAlertDefsResponse>,
3155 tonic::Status,
3156 > {
3157 self.inner
3158 .ready()
3159 .await
3160 .map_err(|e| {
3161 tonic::Status::unknown(
3162 format!("Service was not ready: {}", e.into()),
3163 )
3164 })?;
3165 let codec = tonic::codec::ProstCodec::default();
3166 let path = http::uri::PathAndQuery::from_static(
3167 "/com.coralogixapis.alerts.v3.AlertDefsService/ListAlertDefs",
3168 );
3169 let mut req = request.into_request();
3170 req.extensions_mut()
3171 .insert(
3172 GrpcMethod::new(
3173 "com.coralogixapis.alerts.v3.AlertDefsService",
3174 "ListAlertDefs",
3175 ),
3176 );
3177 self.inner.unary(req, path, codec).await
3178 }
3179 pub async fn download_alerts(
3180 &mut self,
3181 request: impl tonic::IntoRequest<super::DownloadAlertsRequest>,
3182 ) -> std::result::Result<
3183 tonic::Response<tonic::codec::Streaming<super::DownloadAlertsResponse>>,
3184 tonic::Status,
3185 > {
3186 self.inner
3187 .ready()
3188 .await
3189 .map_err(|e| {
3190 tonic::Status::unknown(
3191 format!("Service was not ready: {}", e.into()),
3192 )
3193 })?;
3194 let codec = tonic::codec::ProstCodec::default();
3195 let path = http::uri::PathAndQuery::from_static(
3196 "/com.coralogixapis.alerts.v3.AlertDefsService/DownloadAlerts",
3197 );
3198 let mut req = request.into_request();
3199 req.extensions_mut()
3200 .insert(
3201 GrpcMethod::new(
3202 "com.coralogixapis.alerts.v3.AlertDefsService",
3203 "DownloadAlerts",
3204 ),
3205 );
3206 self.inner.server_streaming(req, path, codec).await
3207 }
3208 pub async fn delete_alert_def(
3209 &mut self,
3210 request: impl tonic::IntoRequest<super::DeleteAlertDefRequest>,
3211 ) -> std::result::Result<
3212 tonic::Response<super::DeleteAlertDefResponse>,
3213 tonic::Status,
3214 > {
3215 self.inner
3216 .ready()
3217 .await
3218 .map_err(|e| {
3219 tonic::Status::unknown(
3220 format!("Service was not ready: {}", e.into()),
3221 )
3222 })?;
3223 let codec = tonic::codec::ProstCodec::default();
3224 let path = http::uri::PathAndQuery::from_static(
3225 "/com.coralogixapis.alerts.v3.AlertDefsService/DeleteAlertDef",
3226 );
3227 let mut req = request.into_request();
3228 req.extensions_mut()
3229 .insert(
3230 GrpcMethod::new(
3231 "com.coralogixapis.alerts.v3.AlertDefsService",
3232 "DeleteAlertDef",
3233 ),
3234 );
3235 self.inner.unary(req, path, codec).await
3236 }
3237 pub async fn set_active(
3238 &mut self,
3239 request: impl tonic::IntoRequest<super::SetActiveRequest>,
3240 ) -> std::result::Result<
3241 tonic::Response<super::SetActiveResponse>,
3242 tonic::Status,
3243 > {
3244 self.inner
3245 .ready()
3246 .await
3247 .map_err(|e| {
3248 tonic::Status::unknown(
3249 format!("Service was not ready: {}", e.into()),
3250 )
3251 })?;
3252 let codec = tonic::codec::ProstCodec::default();
3253 let path = http::uri::PathAndQuery::from_static(
3254 "/com.coralogixapis.alerts.v3.AlertDefsService/SetActive",
3255 );
3256 let mut req = request.into_request();
3257 req.extensions_mut()
3258 .insert(
3259 GrpcMethod::new(
3260 "com.coralogixapis.alerts.v3.AlertDefsService",
3261 "SetActive",
3262 ),
3263 );
3264 self.inner.unary(req, path, codec).await
3265 }
3266 pub async fn filter_option_counts(
3267 &mut self,
3268 request: impl tonic::IntoRequest<super::FilterOptionCountsRequest>,
3269 ) -> std::result::Result<
3270 tonic::Response<super::FilterOptionCountsResponse>,
3271 tonic::Status,
3272 > {
3273 self.inner
3274 .ready()
3275 .await
3276 .map_err(|e| {
3277 tonic::Status::unknown(
3278 format!("Service was not ready: {}", e.into()),
3279 )
3280 })?;
3281 let codec = tonic::codec::ProstCodec::default();
3282 let path = http::uri::PathAndQuery::from_static(
3283 "/com.coralogixapis.alerts.v3.AlertDefsService/FilterOptionCounts",
3284 );
3285 let mut req = request.into_request();
3286 req.extensions_mut()
3287 .insert(
3288 GrpcMethod::new(
3289 "com.coralogixapis.alerts.v3.AlertDefsService",
3290 "FilterOptionCounts",
3291 ),
3292 );
3293 self.inner.unary(req, path, codec).await
3294 }
3295 }
3296}