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, optional, tag = "1")]
274 pub id: ::core::option::Option<::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 AlertDefOrderBy {
2338 #[prost(enumeration = "AlertDefOrderByFields", tag = "1")]
2339 pub field_name: i32,
2340 #[prost(enumeration = "AlertDefOrderByDirection", tag = "2")]
2341 pub direction: i32,
2342}
2343#[derive(serde::Serialize, serde::Deserialize)]
2344#[serde(rename_all = "snake_case")]
2345#[derive(Clone, PartialEq, ::prost::Message)]
2346pub struct AlertDefOrderByList {
2347 #[prost(message, repeated, tag = "1")]
2348 pub order_bys: ::prost::alloc::vec::Vec<AlertDefOrderBy>,
2349}
2350#[derive(serde::Serialize, serde::Deserialize)]
2351#[serde(rename_all = "snake_case")]
2352#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2353#[repr(i32)]
2354pub enum AlertDefOrderByFields {
2355 Unspecified = 0,
2356 Priority = 1,
2357 LastTriggeredTime = 2,
2358 UpdatedTime = 3,
2359 Enabled = 4,
2360}
2361impl AlertDefOrderByFields {
2362 pub fn as_str_name(&self) -> &'static str {
2367 match self {
2368 Self::Unspecified => "ALERT_DEF_ORDER_BY_FIELDS_UNSPECIFIED",
2369 Self::Priority => "ALERT_DEF_ORDER_BY_FIELDS_PRIORITY",
2370 Self::LastTriggeredTime => "ALERT_DEF_ORDER_BY_FIELDS_LAST_TRIGGERED_TIME",
2371 Self::UpdatedTime => "ALERT_DEF_ORDER_BY_FIELDS_UPDATED_TIME",
2372 Self::Enabled => "ALERT_DEF_ORDER_BY_FIELDS_ENABLED",
2373 }
2374 }
2375 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2377 match value {
2378 "ALERT_DEF_ORDER_BY_FIELDS_UNSPECIFIED" => Some(Self::Unspecified),
2379 "ALERT_DEF_ORDER_BY_FIELDS_PRIORITY" => Some(Self::Priority),
2380 "ALERT_DEF_ORDER_BY_FIELDS_LAST_TRIGGERED_TIME" => {
2381 Some(Self::LastTriggeredTime)
2382 }
2383 "ALERT_DEF_ORDER_BY_FIELDS_UPDATED_TIME" => Some(Self::UpdatedTime),
2384 "ALERT_DEF_ORDER_BY_FIELDS_ENABLED" => Some(Self::Enabled),
2385 _ => None,
2386 }
2387 }
2388}
2389#[derive(serde::Serialize, serde::Deserialize)]
2390#[serde(rename_all = "snake_case")]
2391#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2392#[repr(i32)]
2393pub enum AlertDefOrderByDirection {
2394 AscOrUnspecified = 0,
2395 Desc = 1,
2396}
2397impl AlertDefOrderByDirection {
2398 pub fn as_str_name(&self) -> &'static str {
2403 match self {
2404 Self::AscOrUnspecified => "ALERT_DEF_ORDER_BY_DIRECTION_ASC_OR_UNSPECIFIED",
2405 Self::Desc => "ALERT_DEF_ORDER_BY_DIRECTION_DESC",
2406 }
2407 }
2408 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2410 match value {
2411 "ALERT_DEF_ORDER_BY_DIRECTION_ASC_OR_UNSPECIFIED" => {
2412 Some(Self::AscOrUnspecified)
2413 }
2414 "ALERT_DEF_ORDER_BY_DIRECTION_DESC" => Some(Self::Desc),
2415 _ => None,
2416 }
2417 }
2418}
2419#[derive(serde::Serialize, serde::Deserialize)]
2420#[serde(rename_all = "snake_case")]
2421#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2422pub struct TimeRange {
2423 #[prost(message, optional, tag = "1")]
2424 pub start_time: ::core::option::Option<::prost_wkt_types::Timestamp>,
2425 #[prost(message, optional, tag = "2")]
2426 pub end_time: ::core::option::Option<::prost_wkt_types::Timestamp>,
2427}
2428#[derive(serde::Serialize, serde::Deserialize)]
2429#[serde(rename_all = "snake_case")]
2430#[derive(Clone, PartialEq, ::prost::Message)]
2431pub struct AlertDefQueryFilter {
2432 #[prost(message, optional, tag = "1")]
2433 pub name_filter: ::core::option::Option<AlertDefNameFilter>,
2434 #[prost(message, optional, tag = "2")]
2435 pub type_filter: ::core::option::Option<AlertDefTypeFilter>,
2436 #[prost(message, optional, tag = "3")]
2437 pub entity_labels_filter: ::core::option::Option<AlertDefEntityLabelsFilter>,
2438 #[prost(message, optional, tag = "4")]
2439 pub priority_filter: ::core::option::Option<AlertDefPriorityFilter>,
2440 #[prost(message, optional, tag = "5")]
2441 pub enabled_filter: ::core::option::Option<AlertDefEnabledFilter>,
2442 #[prost(message, optional, tag = "7")]
2443 pub modified_time_range_filter: ::core::option::Option<AlertDefModifiedTimeFilter>,
2444 #[prost(message, optional, tag = "8")]
2445 pub last_triggered_time_range_filter: ::core::option::Option<
2446 AlertDefLastTriggeredTimeFilter,
2447 >,
2448 #[prost(message, optional, tag = "9")]
2449 pub type_specific_filter: ::core::option::Option<AlertDefTypeSpecificFilter>,
2450 #[prost(message, optional, tag = "10")]
2451 pub status_filter: ::core::option::Option<AlertDefStatusFilter>,
2452}
2453#[derive(serde::Serialize, serde::Deserialize)]
2454#[serde(rename_all = "snake_case")]
2455#[derive(Clone, PartialEq, ::prost::Message)]
2456pub struct AlertDefNameFilter {
2457 #[prost(message, repeated, tag = "1")]
2458 pub name: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2459 #[prost(enumeration = "FilterMatcher", tag = "2")]
2460 pub matcher: i32,
2461}
2462#[derive(serde::Serialize, serde::Deserialize)]
2463#[serde(rename_all = "snake_case")]
2464#[derive(Clone, PartialEq, ::prost::Message)]
2465pub struct AlertDefPriorityFilter {
2466 #[prost(enumeration = "AlertDefPriority", repeated, packed = "false", tag = "1")]
2467 pub priority: ::prost::alloc::vec::Vec<i32>,
2468 #[prost(enumeration = "FilterMatcher", tag = "2")]
2469 pub matcher: i32,
2470}
2471#[derive(serde::Serialize, serde::Deserialize)]
2472#[serde(rename_all = "snake_case")]
2473#[derive(Clone, PartialEq, ::prost::Message)]
2474pub struct AlertDefEntityLabelsFilter {
2475 #[prost(map = "string, string", tag = "1")]
2476 pub entity_labels: ::std::collections::HashMap<
2477 ::prost::alloc::string::String,
2478 ::prost::alloc::string::String,
2479 >,
2480 #[prost(enumeration = "FilterValuesOperator", tag = "3")]
2481 pub values_operator: i32,
2482}
2483#[derive(serde::Serialize, serde::Deserialize)]
2484#[serde(rename_all = "snake_case")]
2485#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2486pub struct AlertDefModifiedTimeFilter {
2487 #[prost(message, optional, tag = "1")]
2488 pub modified_at_range: ::core::option::Option<TimeRange>,
2489}
2490#[derive(serde::Serialize, serde::Deserialize)]
2491#[serde(rename_all = "snake_case")]
2492#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2493pub struct AlertDefLastTriggeredTimeFilter {
2494 #[prost(message, optional, tag = "1")]
2495 pub last_triggered_at_range: ::core::option::Option<TimeRange>,
2496}
2497#[derive(serde::Serialize, serde::Deserialize)]
2498#[serde(rename_all = "snake_case")]
2499#[derive(Clone, PartialEq, ::prost::Message)]
2500pub struct AlertDefTypeFilter {
2501 #[prost(enumeration = "AlertDefType", repeated, packed = "false", tag = "1")]
2502 pub r#type: ::prost::alloc::vec::Vec<i32>,
2503 #[prost(enumeration = "FilterMatcher", tag = "2")]
2504 pub matcher: i32,
2505}
2506#[derive(serde::Serialize, serde::Deserialize)]
2507#[serde(rename_all = "snake_case")]
2508#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2509pub struct AlertDefEnabledFilter {
2510 #[prost(message, optional, tag = "1")]
2511 pub enabled: ::core::option::Option<bool>,
2512}
2513#[derive(serde::Serialize, serde::Deserialize)]
2514#[serde(rename_all = "snake_case")]
2515#[derive(Clone, PartialEq, ::prost::Message)]
2516pub struct AlertDefTypeSpecificFilter {
2517 #[prost(oneof = "alert_def_type_specific_filter::TypeSpecificFilter", tags = "1")]
2518 pub type_specific_filter: ::core::option::Option<
2519 alert_def_type_specific_filter::TypeSpecificFilter,
2520 >,
2521}
2522pub mod alert_def_type_specific_filter {
2524 #[derive(serde::Serialize, serde::Deserialize)]
2525 #[serde(rename_all = "snake_case")]
2526 #[derive(Clone, PartialEq, ::prost::Oneof)]
2527 pub enum TypeSpecificFilter {
2528 #[prost(message, tag = "1")]
2529 SloFilter(super::AlertDefSloSpecificFilter),
2530 }
2531}
2532#[derive(serde::Serialize, serde::Deserialize)]
2533#[serde(rename_all = "snake_case")]
2534#[derive(Clone, PartialEq, ::prost::Message)]
2535pub struct AlertDefSloSpecificFilter {
2536 #[prost(message, repeated, tag = "1")]
2537 pub slo_id: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2538 #[prost(enumeration = "FilterMatcher", tag = "2")]
2539 pub matcher: i32,
2540}
2541#[derive(serde::Serialize, serde::Deserialize)]
2542#[serde(rename_all = "snake_case")]
2543#[derive(Clone, PartialEq, ::prost::Message)]
2544pub struct AlertDefStatusFilter {
2545 #[prost(enumeration = "AlertDefStatus", repeated, packed = "false", tag = "1")]
2546 pub status: ::prost::alloc::vec::Vec<i32>,
2547 #[prost(enumeration = "FilterMatcher", tag = "2")]
2548 pub matcher: i32,
2549}
2550#[derive(serde::Serialize, serde::Deserialize)]
2551#[serde(rename_all = "snake_case")]
2552#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2553#[repr(i32)]
2554pub enum FilterMatcher {
2555 Unspecified = 0,
2556 Equals = 1,
2557 NotEquals = 2,
2558 Contains = 3,
2559}
2560impl FilterMatcher {
2561 pub fn as_str_name(&self) -> &'static str {
2566 match self {
2567 Self::Unspecified => "FILTER_MATCHER_UNSPECIFIED",
2568 Self::Equals => "FILTER_MATCHER_EQUALS",
2569 Self::NotEquals => "FILTER_MATCHER_NOT_EQUALS",
2570 Self::Contains => "FILTER_MATCHER_CONTAINS",
2571 }
2572 }
2573 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2575 match value {
2576 "FILTER_MATCHER_UNSPECIFIED" => Some(Self::Unspecified),
2577 "FILTER_MATCHER_EQUALS" => Some(Self::Equals),
2578 "FILTER_MATCHER_NOT_EQUALS" => Some(Self::NotEquals),
2579 "FILTER_MATCHER_CONTAINS" => Some(Self::Contains),
2580 _ => None,
2581 }
2582 }
2583}
2584#[derive(serde::Serialize, serde::Deserialize)]
2585#[serde(rename_all = "snake_case")]
2586#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2587#[repr(i32)]
2588pub enum FilterValuesOperator {
2589 Unspecified = 0,
2590 Or = 1,
2591 And = 2,
2592}
2593impl FilterValuesOperator {
2594 pub fn as_str_name(&self) -> &'static str {
2599 match self {
2600 Self::Unspecified => "FILTER_VALUES_OPERATOR_UNSPECIFIED",
2601 Self::Or => "FILTER_VALUES_OPERATOR_OR",
2602 Self::And => "FILTER_VALUES_OPERATOR_AND",
2603 }
2604 }
2605 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2607 match value {
2608 "FILTER_VALUES_OPERATOR_UNSPECIFIED" => Some(Self::Unspecified),
2609 "FILTER_VALUES_OPERATOR_OR" => Some(Self::Or),
2610 "FILTER_VALUES_OPERATOR_AND" => Some(Self::And),
2611 _ => None,
2612 }
2613 }
2614}
2615#[derive(serde::Serialize, serde::Deserialize)]
2616#[serde(rename_all = "snake_case")]
2617#[derive(Clone, PartialEq, ::prost::Message)]
2618pub struct FilterOptionCountsRequest {
2619 #[prost(message, optional, tag = "1")]
2620 pub query_filter: ::core::option::Option<FilterOptionCountsFilter>,
2621}
2622#[derive(serde::Serialize, serde::Deserialize)]
2623#[serde(rename_all = "snake_case")]
2624#[derive(Clone, PartialEq, ::prost::Message)]
2625pub struct FilterOptionCountsResponse {
2626 #[prost(message, optional, tag = "1")]
2627 pub counts: ::core::option::Option<FilterOptionCounts>,
2628}
2629#[derive(serde::Serialize, serde::Deserialize)]
2630#[serde(rename_all = "snake_case")]
2631#[derive(Clone, PartialEq, ::prost::Message)]
2632pub struct FilterOptionCountsFilter {
2633 #[prost(message, optional, tag = "1")]
2634 pub name_filter: ::core::option::Option<FilterOptionCountsNameFilter>,
2635 #[prost(message, optional, tag = "2")]
2636 pub type_filter: ::core::option::Option<FilterOptionCountsTypeFilter>,
2637 #[prost(message, optional, tag = "3")]
2638 pub priority_filter: ::core::option::Option<FilterOptionCountsPriorityFilter>,
2639 #[prost(message, optional, tag = "4")]
2640 pub entity_labels_filter: ::core::option::Option<
2641 FilterOptionCountsEntityLabelsFilter,
2642 >,
2643 #[prost(message, optional, tag = "5")]
2644 pub status_filter: ::core::option::Option<FilterOptionCountsStatusFilter>,
2645 #[prost(message, optional, tag = "6")]
2646 pub enabled_filter: ::core::option::Option<FilterOptionCountsEnabledFilter>,
2647}
2648#[derive(serde::Serialize, serde::Deserialize)]
2649#[serde(rename_all = "snake_case")]
2650#[derive(Clone, PartialEq, ::prost::Message)]
2651pub struct FilterOptionCountsNameFilter {
2652 #[prost(message, repeated, tag = "1")]
2653 pub name: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2654 #[prost(enumeration = "FilterMatcher", tag = "2")]
2655 pub matcher: i32,
2656}
2657#[derive(serde::Serialize, serde::Deserialize)]
2658#[serde(rename_all = "snake_case")]
2659#[derive(Clone, PartialEq, ::prost::Message)]
2660pub struct FilterOptionCountsTypeFilter {
2661 #[prost(enumeration = "AlertDefType", repeated, packed = "false", tag = "1")]
2662 pub r#type: ::prost::alloc::vec::Vec<i32>,
2663}
2664#[derive(serde::Serialize, serde::Deserialize)]
2665#[serde(rename_all = "snake_case")]
2666#[derive(Clone, PartialEq, ::prost::Message)]
2667pub struct FilterOptionCountsPriorityFilter {
2668 #[prost(enumeration = "AlertDefPriority", repeated, packed = "false", tag = "1")]
2669 pub priority: ::prost::alloc::vec::Vec<i32>,
2670}
2671#[derive(serde::Serialize, serde::Deserialize)]
2672#[serde(rename_all = "snake_case")]
2673#[derive(Clone, PartialEq, ::prost::Message)]
2674pub struct FilterOptionCountsEntityLabelsFilter {
2675 #[prost(map = "string, string", tag = "1")]
2676 pub entity_labels: ::std::collections::HashMap<
2677 ::prost::alloc::string::String,
2678 ::prost::alloc::string::String,
2679 >,
2680 #[prost(enumeration = "FilterValuesOperator", tag = "2")]
2681 pub values_operator: i32,
2682}
2683#[derive(serde::Serialize, serde::Deserialize)]
2684#[serde(rename_all = "snake_case")]
2685#[derive(Clone, PartialEq, ::prost::Message)]
2686pub struct FilterOptionCountsStatusFilter {
2687 #[prost(enumeration = "AlertDefStatus", repeated, packed = "false", tag = "1")]
2688 pub status: ::prost::alloc::vec::Vec<i32>,
2689 #[prost(enumeration = "FilterMatcher", tag = "2")]
2690 pub matcher: i32,
2691}
2692#[derive(serde::Serialize, serde::Deserialize)]
2693#[serde(rename_all = "snake_case")]
2694#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2695pub struct FilterOptionCountsEnabledFilter {
2696 #[prost(message, optional, tag = "1")]
2697 pub enabled: ::core::option::Option<bool>,
2698}
2699#[derive(serde::Serialize, serde::Deserialize)]
2700#[serde(rename_all = "snake_case")]
2701#[derive(Clone, PartialEq, ::prost::Message)]
2702pub struct FilterOptionCounts {
2703 #[prost(message, repeated, tag = "1")]
2704 pub type_counts: ::prost::alloc::vec::Vec<TypeCount>,
2705 #[prost(message, repeated, tag = "2")]
2706 pub priority_counts: ::prost::alloc::vec::Vec<PriorityCount>,
2707 #[prost(message, repeated, tag = "3")]
2708 pub entity_label_counts: ::prost::alloc::vec::Vec<EntityLabelCount>,
2709 #[prost(message, repeated, tag = "4")]
2710 pub status_counts: ::prost::alloc::vec::Vec<StatusCount>,
2711 #[prost(message, repeated, tag = "5")]
2712 pub enabled_counts: ::prost::alloc::vec::Vec<EnabledCount>,
2713}
2714#[derive(serde::Serialize, serde::Deserialize)]
2715#[serde(rename_all = "snake_case")]
2716#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2717pub struct TypeCount {
2718 #[prost(enumeration = "AlertDefType", tag = "1")]
2719 pub r#type: i32,
2720 #[prost(message, optional, tag = "2")]
2721 pub count: ::core::option::Option<u32>,
2722}
2723#[derive(serde::Serialize, serde::Deserialize)]
2724#[serde(rename_all = "snake_case")]
2725#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2726pub struct PriorityCount {
2727 #[prost(enumeration = "AlertDefPriority", tag = "1")]
2728 pub priority: i32,
2729 #[prost(message, optional, tag = "2")]
2730 pub count: ::core::option::Option<u32>,
2731}
2732#[derive(serde::Serialize, serde::Deserialize)]
2733#[serde(rename_all = "snake_case")]
2734#[derive(Clone, PartialEq, ::prost::Message)]
2735pub struct EntityLabelCount {
2736 #[prost(message, optional, tag = "1")]
2737 pub label_key: ::core::option::Option<::prost::alloc::string::String>,
2738 #[prost(message, optional, tag = "2")]
2739 pub label_value: ::core::option::Option<::prost::alloc::string::String>,
2740 #[prost(message, optional, tag = "3")]
2741 pub count: ::core::option::Option<u32>,
2742}
2743#[derive(serde::Serialize, serde::Deserialize)]
2744#[serde(rename_all = "snake_case")]
2745#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2746pub struct StatusCount {
2747 #[prost(enumeration = "AlertDefStatus", tag = "1")]
2748 pub status: i32,
2749 #[prost(message, optional, tag = "2")]
2750 pub count: ::core::option::Option<u32>,
2751}
2752#[derive(serde::Serialize, serde::Deserialize)]
2753#[serde(rename_all = "snake_case")]
2754#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2755pub struct EnabledCount {
2756 #[prost(message, optional, tag = "1")]
2757 pub enabled: ::core::option::Option<bool>,
2758 #[prost(message, optional, tag = "2")]
2759 pub count: ::core::option::Option<u32>,
2760}
2761#[derive(serde::Serialize, serde::Deserialize)]
2762#[serde(rename_all = "snake_case")]
2763#[derive(Clone, PartialEq, ::prost::Message)]
2764pub struct PaginationRequest {
2765 #[prost(message, optional, tag = "1")]
2766 pub page_size: ::core::option::Option<u32>,
2767 #[prost(message, optional, tag = "2")]
2768 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
2769}
2770#[derive(serde::Serialize, serde::Deserialize)]
2771#[serde(rename_all = "snake_case")]
2772#[derive(Clone, PartialEq, ::prost::Message)]
2773pub struct PaginationResponse {
2774 #[prost(message, optional, tag = "1")]
2775 pub total_size: ::core::option::Option<u32>,
2776 #[prost(message, optional, tag = "2")]
2777 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
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 {}
2942#[derive(serde::Serialize, serde::Deserialize)]
2943#[serde(rename_all = "snake_case")]
2944#[derive(Clone, PartialEq, ::prost::Message)]
2945pub struct AlertDefToReplace {
2946 #[prost(message, optional, tag = "1")]
2947 pub id: ::core::option::Option<::prost::alloc::string::String>,
2948 #[prost(message, optional, tag = "2")]
2949 pub alert_def_properties: ::core::option::Option<AlertDefProperties>,
2950}
2951#[derive(serde::Serialize, serde::Deserialize)]
2952#[serde(rename_all = "snake_case")]
2953#[derive(Clone, PartialEq, ::prost::Message)]
2954pub struct BulkReplaceAlertDefsRequest {
2955 #[prost(message, repeated, tag = "1")]
2956 pub alert_defs_to_replace: ::prost::alloc::vec::Vec<AlertDefToReplace>,
2957}
2958#[derive(serde::Serialize, serde::Deserialize)]
2959#[serde(rename_all = "snake_case")]
2960#[derive(Clone, PartialEq, ::prost::Message)]
2961pub struct BulkReplaceAlertDefsResponse {
2962 #[prost(message, repeated, tag = "1")]
2963 pub alert_defs: ::prost::alloc::vec::Vec<AlertDef>,
2964 #[prost(message, repeated, tag = "2")]
2965 pub not_found_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2966 #[prost(message, repeated, tag = "3")]
2967 pub failed_to_replace_alert_defs: ::prost::alloc::vec::Vec<FailedToReplaceAlertDef>,
2968 #[prost(message, repeated, tag = "4")]
2969 pub skipped_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2970}
2971#[derive(serde::Serialize, serde::Deserialize)]
2972#[serde(rename_all = "snake_case")]
2973#[derive(Clone, PartialEq, ::prost::Message)]
2974pub struct FailedToReplaceAlertDef {
2975 #[prost(message, optional, tag = "1")]
2976 pub id: ::core::option::Option<::prost::alloc::string::String>,
2977}
2978pub mod alert_defs_service_client {
2980 #![allow(
2981 unused_variables,
2982 dead_code,
2983 missing_docs,
2984 clippy::wildcard_imports,
2985 clippy::let_unit_value,
2986 )]
2987 use tonic::codegen::*;
2988 use tonic::codegen::http::Uri;
2989 #[derive(Debug, Clone)]
2990 pub struct AlertDefsServiceClient<T> {
2991 inner: tonic::client::Grpc<T>,
2992 }
2993 impl AlertDefsServiceClient<tonic::transport::Channel> {
2994 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2996 where
2997 D: TryInto<tonic::transport::Endpoint>,
2998 D::Error: Into<StdError>,
2999 {
3000 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
3001 Ok(Self::new(conn))
3002 }
3003 }
3004 impl<T> AlertDefsServiceClient<T>
3005 where
3006 T: tonic::client::GrpcService<tonic::body::BoxBody>,
3007 T::Error: Into<StdError>,
3008 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
3009 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
3010 {
3011 pub fn new(inner: T) -> Self {
3012 let inner = tonic::client::Grpc::new(inner);
3013 Self { inner }
3014 }
3015 pub fn with_origin(inner: T, origin: Uri) -> Self {
3016 let inner = tonic::client::Grpc::with_origin(inner, origin);
3017 Self { inner }
3018 }
3019 pub fn with_interceptor<F>(
3020 inner: T,
3021 interceptor: F,
3022 ) -> AlertDefsServiceClient<InterceptedService<T, F>>
3023 where
3024 F: tonic::service::Interceptor,
3025 T::ResponseBody: Default,
3026 T: tonic::codegen::Service<
3027 http::Request<tonic::body::BoxBody>,
3028 Response = http::Response<
3029 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
3030 >,
3031 >,
3032 <T as tonic::codegen::Service<
3033 http::Request<tonic::body::BoxBody>,
3034 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
3035 {
3036 AlertDefsServiceClient::new(InterceptedService::new(inner, interceptor))
3037 }
3038 #[must_use]
3043 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3044 self.inner = self.inner.send_compressed(encoding);
3045 self
3046 }
3047 #[must_use]
3049 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3050 self.inner = self.inner.accept_compressed(encoding);
3051 self
3052 }
3053 #[must_use]
3057 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3058 self.inner = self.inner.max_decoding_message_size(limit);
3059 self
3060 }
3061 #[must_use]
3065 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3066 self.inner = self.inner.max_encoding_message_size(limit);
3067 self
3068 }
3069 pub async fn get_alert_def(
3071 &mut self,
3072 request: impl tonic::IntoRequest<super::GetAlertDefRequest>,
3073 ) -> std::result::Result<
3074 tonic::Response<super::GetAlertDefResponse>,
3075 tonic::Status,
3076 > {
3077 self.inner
3078 .ready()
3079 .await
3080 .map_err(|e| {
3081 tonic::Status::unknown(
3082 format!("Service was not ready: {}", e.into()),
3083 )
3084 })?;
3085 let codec = tonic::codec::ProstCodec::default();
3086 let path = http::uri::PathAndQuery::from_static(
3087 "/com.coralogixapis.alerts.v3.AlertDefsService/GetAlertDef",
3088 );
3089 let mut req = request.into_request();
3090 req.extensions_mut()
3091 .insert(
3092 GrpcMethod::new(
3093 "com.coralogixapis.alerts.v3.AlertDefsService",
3094 "GetAlertDef",
3095 ),
3096 );
3097 self.inner.unary(req, path, codec).await
3098 }
3099 pub async fn get_alert_def_by_version_id(
3100 &mut self,
3101 request: impl tonic::IntoRequest<super::GetAlertDefByVersionIdRequest>,
3102 ) -> std::result::Result<
3103 tonic::Response<super::GetAlertDefByVersionIdResponse>,
3104 tonic::Status,
3105 > {
3106 self.inner
3107 .ready()
3108 .await
3109 .map_err(|e| {
3110 tonic::Status::unknown(
3111 format!("Service was not ready: {}", e.into()),
3112 )
3113 })?;
3114 let codec = tonic::codec::ProstCodec::default();
3115 let path = http::uri::PathAndQuery::from_static(
3116 "/com.coralogixapis.alerts.v3.AlertDefsService/GetAlertDefByVersionId",
3117 );
3118 let mut req = request.into_request();
3119 req.extensions_mut()
3120 .insert(
3121 GrpcMethod::new(
3122 "com.coralogixapis.alerts.v3.AlertDefsService",
3123 "GetAlertDefByVersionId",
3124 ),
3125 );
3126 self.inner.unary(req, path, codec).await
3127 }
3128 pub async fn create_alert_def(
3129 &mut self,
3130 request: impl tonic::IntoRequest<super::CreateAlertDefRequest>,
3131 ) -> std::result::Result<
3132 tonic::Response<super::CreateAlertDefResponse>,
3133 tonic::Status,
3134 > {
3135 self.inner
3136 .ready()
3137 .await
3138 .map_err(|e| {
3139 tonic::Status::unknown(
3140 format!("Service was not ready: {}", e.into()),
3141 )
3142 })?;
3143 let codec = tonic::codec::ProstCodec::default();
3144 let path = http::uri::PathAndQuery::from_static(
3145 "/com.coralogixapis.alerts.v3.AlertDefsService/CreateAlertDef",
3146 );
3147 let mut req = request.into_request();
3148 req.extensions_mut()
3149 .insert(
3150 GrpcMethod::new(
3151 "com.coralogixapis.alerts.v3.AlertDefsService",
3152 "CreateAlertDef",
3153 ),
3154 );
3155 self.inner.unary(req, path, codec).await
3156 }
3157 pub async fn replace_alert_def(
3158 &mut self,
3159 request: impl tonic::IntoRequest<super::ReplaceAlertDefRequest>,
3160 ) -> std::result::Result<
3161 tonic::Response<super::ReplaceAlertDefResponse>,
3162 tonic::Status,
3163 > {
3164 self.inner
3165 .ready()
3166 .await
3167 .map_err(|e| {
3168 tonic::Status::unknown(
3169 format!("Service was not ready: {}", e.into()),
3170 )
3171 })?;
3172 let codec = tonic::codec::ProstCodec::default();
3173 let path = http::uri::PathAndQuery::from_static(
3174 "/com.coralogixapis.alerts.v3.AlertDefsService/ReplaceAlertDef",
3175 );
3176 let mut req = request.into_request();
3177 req.extensions_mut()
3178 .insert(
3179 GrpcMethod::new(
3180 "com.coralogixapis.alerts.v3.AlertDefsService",
3181 "ReplaceAlertDef",
3182 ),
3183 );
3184 self.inner.unary(req, path, codec).await
3185 }
3186 pub async fn bulk_replace_alert_defs(
3187 &mut self,
3188 request: impl tonic::IntoRequest<super::BulkReplaceAlertDefsRequest>,
3189 ) -> std::result::Result<
3190 tonic::Response<super::BulkReplaceAlertDefsResponse>,
3191 tonic::Status,
3192 > {
3193 self.inner
3194 .ready()
3195 .await
3196 .map_err(|e| {
3197 tonic::Status::unknown(
3198 format!("Service was not ready: {}", e.into()),
3199 )
3200 })?;
3201 let codec = tonic::codec::ProstCodec::default();
3202 let path = http::uri::PathAndQuery::from_static(
3203 "/com.coralogixapis.alerts.v3.AlertDefsService/BulkReplaceAlertDefs",
3204 );
3205 let mut req = request.into_request();
3206 req.extensions_mut()
3207 .insert(
3208 GrpcMethod::new(
3209 "com.coralogixapis.alerts.v3.AlertDefsService",
3210 "BulkReplaceAlertDefs",
3211 ),
3212 );
3213 self.inner.unary(req, path, codec).await
3214 }
3215 pub async fn list_alert_defs(
3216 &mut self,
3217 request: impl tonic::IntoRequest<super::ListAlertDefsRequest>,
3218 ) -> std::result::Result<
3219 tonic::Response<super::ListAlertDefsResponse>,
3220 tonic::Status,
3221 > {
3222 self.inner
3223 .ready()
3224 .await
3225 .map_err(|e| {
3226 tonic::Status::unknown(
3227 format!("Service was not ready: {}", e.into()),
3228 )
3229 })?;
3230 let codec = tonic::codec::ProstCodec::default();
3231 let path = http::uri::PathAndQuery::from_static(
3232 "/com.coralogixapis.alerts.v3.AlertDefsService/ListAlertDefs",
3233 );
3234 let mut req = request.into_request();
3235 req.extensions_mut()
3236 .insert(
3237 GrpcMethod::new(
3238 "com.coralogixapis.alerts.v3.AlertDefsService",
3239 "ListAlertDefs",
3240 ),
3241 );
3242 self.inner.unary(req, path, codec).await
3243 }
3244 pub async fn download_alerts(
3245 &mut self,
3246 request: impl tonic::IntoRequest<super::DownloadAlertsRequest>,
3247 ) -> std::result::Result<
3248 tonic::Response<tonic::codec::Streaming<super::DownloadAlertsResponse>>,
3249 tonic::Status,
3250 > {
3251 self.inner
3252 .ready()
3253 .await
3254 .map_err(|e| {
3255 tonic::Status::unknown(
3256 format!("Service was not ready: {}", e.into()),
3257 )
3258 })?;
3259 let codec = tonic::codec::ProstCodec::default();
3260 let path = http::uri::PathAndQuery::from_static(
3261 "/com.coralogixapis.alerts.v3.AlertDefsService/DownloadAlerts",
3262 );
3263 let mut req = request.into_request();
3264 req.extensions_mut()
3265 .insert(
3266 GrpcMethod::new(
3267 "com.coralogixapis.alerts.v3.AlertDefsService",
3268 "DownloadAlerts",
3269 ),
3270 );
3271 self.inner.server_streaming(req, path, codec).await
3272 }
3273 pub async fn delete_alert_def(
3274 &mut self,
3275 request: impl tonic::IntoRequest<super::DeleteAlertDefRequest>,
3276 ) -> std::result::Result<
3277 tonic::Response<super::DeleteAlertDefResponse>,
3278 tonic::Status,
3279 > {
3280 self.inner
3281 .ready()
3282 .await
3283 .map_err(|e| {
3284 tonic::Status::unknown(
3285 format!("Service was not ready: {}", e.into()),
3286 )
3287 })?;
3288 let codec = tonic::codec::ProstCodec::default();
3289 let path = http::uri::PathAndQuery::from_static(
3290 "/com.coralogixapis.alerts.v3.AlertDefsService/DeleteAlertDef",
3291 );
3292 let mut req = request.into_request();
3293 req.extensions_mut()
3294 .insert(
3295 GrpcMethod::new(
3296 "com.coralogixapis.alerts.v3.AlertDefsService",
3297 "DeleteAlertDef",
3298 ),
3299 );
3300 self.inner.unary(req, path, codec).await
3301 }
3302 pub async fn set_active(
3303 &mut self,
3304 request: impl tonic::IntoRequest<super::SetActiveRequest>,
3305 ) -> std::result::Result<
3306 tonic::Response<super::SetActiveResponse>,
3307 tonic::Status,
3308 > {
3309 self.inner
3310 .ready()
3311 .await
3312 .map_err(|e| {
3313 tonic::Status::unknown(
3314 format!("Service was not ready: {}", e.into()),
3315 )
3316 })?;
3317 let codec = tonic::codec::ProstCodec::default();
3318 let path = http::uri::PathAndQuery::from_static(
3319 "/com.coralogixapis.alerts.v3.AlertDefsService/SetActive",
3320 );
3321 let mut req = request.into_request();
3322 req.extensions_mut()
3323 .insert(
3324 GrpcMethod::new(
3325 "com.coralogixapis.alerts.v3.AlertDefsService",
3326 "SetActive",
3327 ),
3328 );
3329 self.inner.unary(req, path, codec).await
3330 }
3331 pub async fn filter_option_counts(
3332 &mut self,
3333 request: impl tonic::IntoRequest<super::FilterOptionCountsRequest>,
3334 ) -> std::result::Result<
3335 tonic::Response<super::FilterOptionCountsResponse>,
3336 tonic::Status,
3337 > {
3338 self.inner
3339 .ready()
3340 .await
3341 .map_err(|e| {
3342 tonic::Status::unknown(
3343 format!("Service was not ready: {}", e.into()),
3344 )
3345 })?;
3346 let codec = tonic::codec::ProstCodec::default();
3347 let path = http::uri::PathAndQuery::from_static(
3348 "/com.coralogixapis.alerts.v3.AlertDefsService/FilterOptionCounts",
3349 );
3350 let mut req = request.into_request();
3351 req.extensions_mut()
3352 .insert(
3353 GrpcMethod::new(
3354 "com.coralogixapis.alerts.v3.AlertDefsService",
3355 "FilterOptionCounts",
3356 ),
3357 );
3358 self.inner.unary(req, path, codec).await
3359 }
3360 }
3361}