#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum NotifyOn {
TriggeredOnlyUnspecified = 0,
TriggeredAndResolved = 1,
}
impl NotifyOn {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::TriggeredOnlyUnspecified => "NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED",
Self::TriggeredAndResolved => "NOTIFY_ON_TRIGGERED_AND_RESOLVED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NOTIFY_ON_TRIGGERED_ONLY_UNSPECIFIED" => {
Some(Self::TriggeredOnlyUnspecified)
}
"NOTIFY_ON_TRIGGERED_AND_RESOLVED" => Some(Self::TriggeredAndResolved),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NotificationDestination {
#[prost(string, tag = "1")]
pub connector_id: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub preset_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration = "NotifyOn", tag = "3")]
pub notify_on: i32,
#[prost(message, optional, tag = "4")]
pub triggered_routing_overrides: ::core::option::Option<NotificationRouting>,
#[prost(message, optional, tag = "5")]
pub resolved_route_overrides: ::core::option::Option<NotificationRouting>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NotificationRouting {
#[prost(message, optional, tag = "1")]
pub config_overrides: ::core::option::Option<SourceOverrides>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SourceOverrides {
#[prost(string, tag = "1")]
pub output_schema_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub message_config_fields: ::prost::alloc::vec::Vec<MessageConfigField>,
#[prost(message, repeated, tag = "3")]
pub connector_config_fields: ::prost::alloc::vec::Vec<ConnectorConfigField>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConnectorConfigField {
#[prost(string, tag = "1")]
pub field_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub template: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MessageConfigField {
#[prost(string, tag = "1")]
pub field_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub template: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AlertDefIncidentSettings {
#[prost(enumeration = "NotifyOn", tag = "2")]
pub notify_on: i32,
#[prost(oneof = "alert_def_incident_settings::RetriggeringPeriod", tags = "100")]
pub retriggering_period: ::core::option::Option<
alert_def_incident_settings::RetriggeringPeriod,
>,
}
pub mod alert_def_incident_settings {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum RetriggeringPeriod {
#[prost(message, tag = "100")]
Minutes(u32),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AlertDefNotificationGroup {
#[prost(message, repeated, tag = "1")]
pub group_by_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "2")]
pub webhooks: ::prost::alloc::vec::Vec<AlertDefWebhooksSettings>,
#[prost(message, repeated, tag = "3")]
pub destinations: ::prost::alloc::vec::Vec<NotificationDestination>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AlertDefWebhooksSettings {
#[prost(enumeration = "NotifyOn", optional, tag = "1")]
pub notify_on: ::core::option::Option<i32>,
#[prost(message, optional, tag = "2")]
pub integration: ::core::option::Option<IntegrationType>,
#[prost(oneof = "alert_def_webhooks_settings::RetriggeringPeriod", tags = "100")]
pub retriggering_period: ::core::option::Option<
alert_def_webhooks_settings::RetriggeringPeriod,
>,
}
pub mod alert_def_webhooks_settings {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum RetriggeringPeriod {
#[prost(message, tag = "100")]
Minutes(u32),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IntegrationType {
#[prost(oneof = "integration_type::IntegrationType", tags = "2, 3")]
pub integration_type: ::core::option::Option<integration_type::IntegrationType>,
}
pub mod integration_type {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum IntegrationType {
#[prost(message, tag = "2")]
IntegrationId(u32),
#[prost(message, tag = "3")]
Recipients(super::Recipients),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Recipients {
#[prost(message, repeated, tag = "1")]
pub emails: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AlertDefPriority {
P5OrUnspecified = 0,
P4 = 1,
P3 = 2,
P2 = 3,
P1 = 4,
}
impl AlertDefPriority {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::P5OrUnspecified => "ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED",
Self::P4 => "ALERT_DEF_PRIORITY_P4",
Self::P3 => "ALERT_DEF_PRIORITY_P3",
Self::P2 => "ALERT_DEF_PRIORITY_P2",
Self::P1 => "ALERT_DEF_PRIORITY_P1",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ALERT_DEF_PRIORITY_P5_OR_UNSPECIFIED" => Some(Self::P5OrUnspecified),
"ALERT_DEF_PRIORITY_P4" => Some(Self::P4),
"ALERT_DEF_PRIORITY_P3" => Some(Self::P3),
"ALERT_DEF_PRIORITY_P2" => Some(Self::P2),
"ALERT_DEF_PRIORITY_P1" => Some(Self::P1),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActivitySchedule {
#[prost(enumeration = "DayOfWeek", repeated, tag = "1")]
pub day_of_week: ::prost::alloc::vec::Vec<i32>,
#[prost(message, optional, tag = "2")]
pub start_time: ::core::option::Option<TimeOfDay>,
#[prost(message, optional, tag = "3")]
pub end_time: ::core::option::Option<TimeOfDay>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TimeOfDay {
#[prost(int32, tag = "1")]
pub hours: i32,
#[prost(int32, tag = "2")]
pub minutes: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DayOfWeek {
MondayOrUnspecified = 0,
Tuesday = 1,
Wednesday = 2,
Thursday = 3,
Friday = 4,
Saturday = 5,
Sunday = 6,
}
impl DayOfWeek {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::MondayOrUnspecified => "DAY_OF_WEEK_MONDAY_OR_UNSPECIFIED",
Self::Tuesday => "DAY_OF_WEEK_TUESDAY",
Self::Wednesday => "DAY_OF_WEEK_WEDNESDAY",
Self::Thursday => "DAY_OF_WEEK_THURSDAY",
Self::Friday => "DAY_OF_WEEK_FRIDAY",
Self::Saturday => "DAY_OF_WEEK_SATURDAY",
Self::Sunday => "DAY_OF_WEEK_SUNDAY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DAY_OF_WEEK_MONDAY_OR_UNSPECIFIED" => Some(Self::MondayOrUnspecified),
"DAY_OF_WEEK_TUESDAY" => Some(Self::Tuesday),
"DAY_OF_WEEK_WEDNESDAY" => Some(Self::Wednesday),
"DAY_OF_WEEK_THURSDAY" => Some(Self::Thursday),
"DAY_OF_WEEK_FRIDAY" => Some(Self::Friday),
"DAY_OF_WEEK_SATURDAY" => Some(Self::Saturday),
"DAY_OF_WEEK_SUNDAY" => Some(Self::Sunday),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AlertDefType {
LogsImmediateOrUnspecified = 0,
LogsThreshold = 1,
LogsAnomaly = 3,
LogsRatioThreshold = 4,
LogsNewValue = 6,
LogsUniqueCount = 7,
LogsTimeRelativeThreshold = 8,
MetricThreshold = 10,
MetricAnomaly = 14,
TracingImmediate = 15,
TracingThreshold = 16,
Flow = 17,
}
impl AlertDefType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::LogsImmediateOrUnspecified => {
"ALERT_DEF_TYPE_LOGS_IMMEDIATE_OR_UNSPECIFIED"
}
Self::LogsThreshold => "ALERT_DEF_TYPE_LOGS_THRESHOLD",
Self::LogsAnomaly => "ALERT_DEF_TYPE_LOGS_ANOMALY",
Self::LogsRatioThreshold => "ALERT_DEF_TYPE_LOGS_RATIO_THRESHOLD",
Self::LogsNewValue => "ALERT_DEF_TYPE_LOGS_NEW_VALUE",
Self::LogsUniqueCount => "ALERT_DEF_TYPE_LOGS_UNIQUE_COUNT",
Self::LogsTimeRelativeThreshold => {
"ALERT_DEF_TYPE_LOGS_TIME_RELATIVE_THRESHOLD"
}
Self::MetricThreshold => "ALERT_DEF_TYPE_METRIC_THRESHOLD",
Self::MetricAnomaly => "ALERT_DEF_TYPE_METRIC_ANOMALY",
Self::TracingImmediate => "ALERT_DEF_TYPE_TRACING_IMMEDIATE",
Self::TracingThreshold => "ALERT_DEF_TYPE_TRACING_THRESHOLD",
Self::Flow => "ALERT_DEF_TYPE_FLOW",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ALERT_DEF_TYPE_LOGS_IMMEDIATE_OR_UNSPECIFIED" => {
Some(Self::LogsImmediateOrUnspecified)
}
"ALERT_DEF_TYPE_LOGS_THRESHOLD" => Some(Self::LogsThreshold),
"ALERT_DEF_TYPE_LOGS_ANOMALY" => Some(Self::LogsAnomaly),
"ALERT_DEF_TYPE_LOGS_RATIO_THRESHOLD" => Some(Self::LogsRatioThreshold),
"ALERT_DEF_TYPE_LOGS_NEW_VALUE" => Some(Self::LogsNewValue),
"ALERT_DEF_TYPE_LOGS_UNIQUE_COUNT" => Some(Self::LogsUniqueCount),
"ALERT_DEF_TYPE_LOGS_TIME_RELATIVE_THRESHOLD" => {
Some(Self::LogsTimeRelativeThreshold)
}
"ALERT_DEF_TYPE_METRIC_THRESHOLD" => Some(Self::MetricThreshold),
"ALERT_DEF_TYPE_METRIC_ANOMALY" => Some(Self::MetricAnomaly),
"ALERT_DEF_TYPE_TRACING_IMMEDIATE" => Some(Self::TracingImmediate),
"ALERT_DEF_TYPE_TRACING_THRESHOLD" => Some(Self::TracingThreshold),
"ALERT_DEF_TYPE_FLOW" => Some(Self::Flow),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FlowType {
#[prost(message, repeated, tag = "1")]
pub stages: ::prost::alloc::vec::Vec<FlowStages>,
#[prost(message, optional, tag = "2")]
pub enforce_suppression: ::core::option::Option<bool>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FlowStages {
#[prost(message, optional, tag = "3")]
pub timeframe_ms: ::core::option::Option<i64>,
#[prost(enumeration = "TimeframeType", tag = "4")]
pub timeframe_type: i32,
#[prost(oneof = "flow_stages::FlowStages", tags = "10")]
pub flow_stages: ::core::option::Option<flow_stages::FlowStages>,
}
pub mod flow_stages {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum FlowStages {
#[prost(message, tag = "10")]
FlowStagesGroups(super::FlowStagesGroups),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FlowStagesGroups {
#[prost(message, repeated, tag = "1")]
pub groups: ::prost::alloc::vec::Vec<FlowStagesGroup>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FlowStagesGroup {
#[prost(message, repeated, tag = "1")]
pub alert_defs: ::prost::alloc::vec::Vec<FlowStagesGroupsAlertDefs>,
#[prost(enumeration = "NextOp", tag = "2")]
pub next_op: i32,
#[prost(enumeration = "AlertsOp", tag = "3")]
pub alerts_op: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FlowStagesGroupsAlertDefs {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub not: ::core::option::Option<bool>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum NextOp {
AndOrUnspecified = 0,
Or = 1,
}
impl NextOp {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::AndOrUnspecified => "NEXT_OP_AND_OR_UNSPECIFIED",
Self::Or => "NEXT_OP_OR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NEXT_OP_AND_OR_UNSPECIFIED" => Some(Self::AndOrUnspecified),
"NEXT_OP_OR" => Some(Self::Or),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AlertsOp {
AndOrUnspecified = 0,
Or = 1,
}
impl AlertsOp {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::AndOrUnspecified => "ALERTS_OP_AND_OR_UNSPECIFIED",
Self::Or => "ALERTS_OP_OR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ALERTS_OP_AND_OR_UNSPECIFIED" => Some(Self::AndOrUnspecified),
"ALERTS_OP_OR" => Some(Self::Or),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TimeframeType {
Unspecified = 0,
UpTo = 1,
}
impl TimeframeType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "TIMEFRAME_TYPE_UNSPECIFIED",
Self::UpTo => "TIMEFRAME_TYPE_UP_TO",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TIMEFRAME_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"TIMEFRAME_TYPE_UP_TO" => Some(Self::UpTo),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MetricTimeWindow {
#[prost(oneof = "metric_time_window::Type", tags = "1")]
pub r#type: ::core::option::Option<metric_time_window::Type>,
}
pub mod metric_time_window {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Type {
#[prost(enumeration = "super::MetricTimeWindowValue", tag = "1")]
MetricTimeWindowSpecificValue(i32),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MetricTimeWindowValue {
Minutes1OrUnspecified = 0,
Minutes5 = 1,
Minutes10 = 2,
Minutes15 = 3,
Minutes20 = 11,
Minutes30 = 4,
Hour1 = 5,
Hours2 = 6,
Hours4 = 7,
Hours6 = 8,
Hours12 = 9,
Hours24 = 10,
Hours36 = 12,
}
impl MetricTimeWindowValue {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Minutes1OrUnspecified => {
"METRIC_TIME_WINDOW_VALUE_MINUTES_1_OR_UNSPECIFIED"
}
Self::Minutes5 => "METRIC_TIME_WINDOW_VALUE_MINUTES_5",
Self::Minutes10 => "METRIC_TIME_WINDOW_VALUE_MINUTES_10",
Self::Minutes15 => "METRIC_TIME_WINDOW_VALUE_MINUTES_15",
Self::Minutes20 => "METRIC_TIME_WINDOW_VALUE_MINUTES_20",
Self::Minutes30 => "METRIC_TIME_WINDOW_VALUE_MINUTES_30",
Self::Hour1 => "METRIC_TIME_WINDOW_VALUE_HOUR_1",
Self::Hours2 => "METRIC_TIME_WINDOW_VALUE_HOURS_2",
Self::Hours4 => "METRIC_TIME_WINDOW_VALUE_HOURS_4",
Self::Hours6 => "METRIC_TIME_WINDOW_VALUE_HOURS_6",
Self::Hours12 => "METRIC_TIME_WINDOW_VALUE_HOURS_12",
Self::Hours24 => "METRIC_TIME_WINDOW_VALUE_HOURS_24",
Self::Hours36 => "METRIC_TIME_WINDOW_VALUE_HOURS_36",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"METRIC_TIME_WINDOW_VALUE_MINUTES_1_OR_UNSPECIFIED" => {
Some(Self::Minutes1OrUnspecified)
}
"METRIC_TIME_WINDOW_VALUE_MINUTES_5" => Some(Self::Minutes5),
"METRIC_TIME_WINDOW_VALUE_MINUTES_10" => Some(Self::Minutes10),
"METRIC_TIME_WINDOW_VALUE_MINUTES_15" => Some(Self::Minutes15),
"METRIC_TIME_WINDOW_VALUE_MINUTES_20" => Some(Self::Minutes20),
"METRIC_TIME_WINDOW_VALUE_MINUTES_30" => Some(Self::Minutes30),
"METRIC_TIME_WINDOW_VALUE_HOUR_1" => Some(Self::Hour1),
"METRIC_TIME_WINDOW_VALUE_HOURS_2" => Some(Self::Hours2),
"METRIC_TIME_WINDOW_VALUE_HOURS_4" => Some(Self::Hours4),
"METRIC_TIME_WINDOW_VALUE_HOURS_6" => Some(Self::Hours6),
"METRIC_TIME_WINDOW_VALUE_HOURS_12" => Some(Self::Hours12),
"METRIC_TIME_WINDOW_VALUE_HOURS_24" => Some(Self::Hours24),
"METRIC_TIME_WINDOW_VALUE_HOURS_36" => Some(Self::Hours36),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UndetectedValuesManagement {
#[prost(message, optional, tag = "1")]
pub trigger_undetected_values: ::core::option::Option<bool>,
#[prost(enumeration = "AutoRetireTimeframe", optional, tag = "2")]
pub auto_retire_timeframe: ::core::option::Option<i32>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AutoRetireTimeframe {
NeverOrUnspecified = 0,
Minutes5 = 1,
Minutes10 = 2,
Hour1 = 3,
Hours2 = 4,
Hours6 = 5,
Hours12 = 6,
Hours24 = 7,
}
impl AutoRetireTimeframe {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::NeverOrUnspecified => "AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED",
Self::Minutes5 => "AUTO_RETIRE_TIMEFRAME_MINUTES_5",
Self::Minutes10 => "AUTO_RETIRE_TIMEFRAME_MINUTES_10",
Self::Hour1 => "AUTO_RETIRE_TIMEFRAME_HOUR_1",
Self::Hours2 => "AUTO_RETIRE_TIMEFRAME_HOURS_2",
Self::Hours6 => "AUTO_RETIRE_TIMEFRAME_HOURS_6",
Self::Hours12 => "AUTO_RETIRE_TIMEFRAME_HOURS_12",
Self::Hours24 => "AUTO_RETIRE_TIMEFRAME_HOURS_24",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"AUTO_RETIRE_TIMEFRAME_NEVER_OR_UNSPECIFIED" => {
Some(Self::NeverOrUnspecified)
}
"AUTO_RETIRE_TIMEFRAME_MINUTES_5" => Some(Self::Minutes5),
"AUTO_RETIRE_TIMEFRAME_MINUTES_10" => Some(Self::Minutes10),
"AUTO_RETIRE_TIMEFRAME_HOUR_1" => Some(Self::Hour1),
"AUTO_RETIRE_TIMEFRAME_HOURS_2" => Some(Self::Hours2),
"AUTO_RETIRE_TIMEFRAME_HOURS_6" => Some(Self::Hours6),
"AUTO_RETIRE_TIMEFRAME_HOURS_12" => Some(Self::Hours12),
"AUTO_RETIRE_TIMEFRAME_HOURS_24" => Some(Self::Hours24),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MetricMissingValues {
#[prost(oneof = "metric_missing_values::MissingValues", tags = "1, 2")]
pub missing_values: ::core::option::Option<metric_missing_values::MissingValues>,
}
pub mod metric_missing_values {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum MissingValues {
#[prost(message, tag = "1")]
ReplaceWithZero(bool),
#[prost(message, tag = "2")]
MinNonNullValuesPct(u32),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MetricFilter {
#[prost(oneof = "metric_filter::Type", tags = "1")]
pub r#type: ::core::option::Option<metric_filter::Type>,
}
pub mod metric_filter {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Type {
#[prost(message, tag = "1")]
Promql(::prost::alloc::string::String),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MetricThresholdConditionType {
MoreThanOrUnspecified = 0,
LessThan = 1,
MoreThanOrEquals = 2,
LessThanOrEquals = 3,
}
impl MetricThresholdConditionType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::MoreThanOrUnspecified => {
"METRIC_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"
}
Self::LessThan => "METRIC_THRESHOLD_CONDITION_TYPE_LESS_THAN",
Self::MoreThanOrEquals => {
"METRIC_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_EQUALS"
}
Self::LessThanOrEquals => {
"METRIC_THRESHOLD_CONDITION_TYPE_LESS_THAN_OR_EQUALS"
}
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"METRIC_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED" => {
Some(Self::MoreThanOrUnspecified)
}
"METRIC_THRESHOLD_CONDITION_TYPE_LESS_THAN" => Some(Self::LessThan),
"METRIC_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_EQUALS" => {
Some(Self::MoreThanOrEquals)
}
"METRIC_THRESHOLD_CONDITION_TYPE_LESS_THAN_OR_EQUALS" => {
Some(Self::LessThanOrEquals)
}
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AlertDefOverride {
#[prost(enumeration = "AlertDefPriority", tag = "1")]
pub priority: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MetricThresholdType {
#[prost(message, optional, tag = "1")]
pub metric_filter: ::core::option::Option<MetricFilter>,
#[prost(message, repeated, tag = "2")]
pub rules: ::prost::alloc::vec::Vec<MetricThresholdRule>,
#[prost(message, optional, tag = "3")]
pub undetected_values_management: ::core::option::Option<UndetectedValuesManagement>,
#[prost(message, optional, tag = "4")]
pub missing_values: ::core::option::Option<MetricMissingValues>,
#[prost(message, optional, tag = "5")]
pub evaluation_delay_ms: ::core::option::Option<i32>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MetricThresholdRule {
#[prost(message, optional, tag = "1")]
pub condition: ::core::option::Option<MetricThresholdCondition>,
#[prost(message, optional, tag = "2")]
pub r#override: ::core::option::Option<AlertDefOverride>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MetricThresholdCondition {
#[prost(message, optional, tag = "1")]
pub threshold: ::core::option::Option<f64>,
#[prost(message, optional, tag = "2")]
pub for_over_pct: ::core::option::Option<u32>,
#[prost(message, optional, tag = "3")]
pub of_the_last: ::core::option::Option<MetricTimeWindow>,
#[prost(enumeration = "MetricThresholdConditionType", tag = "5")]
pub condition_type: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MetricAnomalyConditionType {
MoreThanUsualOrUnspecified = 0,
LessThanUsual = 1,
}
impl MetricAnomalyConditionType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::MoreThanUsualOrUnspecified => {
"METRIC_ANOMALY_CONDITION_TYPE_MORE_THAN_USUAL_OR_UNSPECIFIED"
}
Self::LessThanUsual => "METRIC_ANOMALY_CONDITION_TYPE_LESS_THAN_USUAL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"METRIC_ANOMALY_CONDITION_TYPE_MORE_THAN_USUAL_OR_UNSPECIFIED" => {
Some(Self::MoreThanUsualOrUnspecified)
}
"METRIC_ANOMALY_CONDITION_TYPE_LESS_THAN_USUAL" => Some(Self::LessThanUsual),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MetricAnomalyType {
#[prost(message, optional, tag = "1")]
pub metric_filter: ::core::option::Option<MetricFilter>,
#[prost(message, repeated, tag = "2")]
pub rules: ::prost::alloc::vec::Vec<MetricAnomalyRule>,
#[prost(message, optional, tag = "3")]
pub evaluation_delay_ms: ::core::option::Option<i32>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MetricAnomalyRule {
#[prost(message, optional, tag = "1")]
pub condition: ::core::option::Option<MetricAnomalyCondition>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MetricAnomalyCondition {
#[prost(message, optional, tag = "1")]
pub threshold: ::core::option::Option<f64>,
#[prost(message, optional, tag = "2")]
pub for_over_pct: ::core::option::Option<u32>,
#[prost(message, optional, tag = "3")]
pub of_the_last: ::core::option::Option<MetricTimeWindow>,
#[prost(message, optional, tag = "4")]
pub min_non_null_values_pct: ::core::option::Option<u32>,
#[prost(enumeration = "MetricAnomalyConditionType", tag = "5")]
pub condition_type: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LogsNewValueTimeWindow {
#[prost(oneof = "logs_new_value_time_window::Type", tags = "1")]
pub r#type: ::core::option::Option<logs_new_value_time_window::Type>,
}
pub mod logs_new_value_time_window {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Type {
#[prost(enumeration = "super::LogsNewValueTimeWindowValue", tag = "1")]
LogsNewValueTimeWindowSpecificValue(i32),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LogsNewValueTimeWindowValue {
Hours12OrUnspecified = 0,
Hours24 = 1,
Hours48 = 2,
Hours72 = 3,
Week1 = 4,
Month1 = 5,
Months2 = 6,
Months3 = 7,
}
impl LogsNewValueTimeWindowValue {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Hours12OrUnspecified => {
"LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_12_OR_UNSPECIFIED"
}
Self::Hours24 => "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_24",
Self::Hours48 => "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_48",
Self::Hours72 => "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_72",
Self::Week1 => "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_WEEK_1",
Self::Month1 => "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_MONTH_1",
Self::Months2 => "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_MONTHS_2",
Self::Months3 => "LOGS_NEW_VALUE_TIME_WINDOW_VALUE_MONTHS_3",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_12_OR_UNSPECIFIED" => {
Some(Self::Hours12OrUnspecified)
}
"LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_24" => Some(Self::Hours24),
"LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_48" => Some(Self::Hours48),
"LOGS_NEW_VALUE_TIME_WINDOW_VALUE_HOURS_72" => Some(Self::Hours72),
"LOGS_NEW_VALUE_TIME_WINDOW_VALUE_WEEK_1" => Some(Self::Week1),
"LOGS_NEW_VALUE_TIME_WINDOW_VALUE_MONTH_1" => Some(Self::Month1),
"LOGS_NEW_VALUE_TIME_WINDOW_VALUE_MONTHS_2" => Some(Self::Months2),
"LOGS_NEW_VALUE_TIME_WINDOW_VALUE_MONTHS_3" => Some(Self::Months3),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LogsFilter {
#[prost(oneof = "logs_filter::FilterType", tags = "1")]
pub filter_type: ::core::option::Option<logs_filter::FilterType>,
}
pub mod logs_filter {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum FilterType {
#[prost(message, tag = "1")]
SimpleFilter(super::LogsSimpleFilter),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LogsSimpleFilter {
#[prost(message, optional, tag = "1")]
pub lucene_query: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub label_filters: ::core::option::Option<LabelFilters>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LabelFilters {
#[prost(message, repeated, tag = "1")]
pub application_name: ::prost::alloc::vec::Vec<LabelFilterType>,
#[prost(message, repeated, tag = "2")]
pub subsystem_name: ::prost::alloc::vec::Vec<LabelFilterType>,
#[prost(enumeration = "LogSeverity", repeated, tag = "3")]
pub severities: ::prost::alloc::vec::Vec<i32>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LabelFilterType {
#[prost(message, optional, tag = "1")]
pub value: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration = "LogFilterOperationType", tag = "2")]
pub operation: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LogFilterOperationType {
IsOrUnspecified = 0,
Includes = 1,
EndsWith = 2,
StartsWith = 3,
}
impl LogFilterOperationType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::IsOrUnspecified => "LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED",
Self::Includes => "LOG_FILTER_OPERATION_TYPE_INCLUDES",
Self::EndsWith => "LOG_FILTER_OPERATION_TYPE_ENDS_WITH",
Self::StartsWith => "LOG_FILTER_OPERATION_TYPE_STARTS_WITH",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"LOG_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED" => Some(Self::IsOrUnspecified),
"LOG_FILTER_OPERATION_TYPE_INCLUDES" => Some(Self::Includes),
"LOG_FILTER_OPERATION_TYPE_ENDS_WITH" => Some(Self::EndsWith),
"LOG_FILTER_OPERATION_TYPE_STARTS_WITH" => Some(Self::StartsWith),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LogSeverity {
VerboseUnspecified = 0,
Debug = 1,
Info = 2,
Warning = 3,
Error = 4,
Critical = 5,
}
impl LogSeverity {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::VerboseUnspecified => "LOG_SEVERITY_VERBOSE_UNSPECIFIED",
Self::Debug => "LOG_SEVERITY_DEBUG",
Self::Info => "LOG_SEVERITY_INFO",
Self::Warning => "LOG_SEVERITY_WARNING",
Self::Error => "LOG_SEVERITY_ERROR",
Self::Critical => "LOG_SEVERITY_CRITICAL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"LOG_SEVERITY_VERBOSE_UNSPECIFIED" => Some(Self::VerboseUnspecified),
"LOG_SEVERITY_DEBUG" => Some(Self::Debug),
"LOG_SEVERITY_INFO" => Some(Self::Info),
"LOG_SEVERITY_WARNING" => Some(Self::Warning),
"LOG_SEVERITY_ERROR" => Some(Self::Error),
"LOG_SEVERITY_CRITICAL" => Some(Self::Critical),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LogsNewValueType {
#[prost(message, optional, tag = "1")]
pub logs_filter: ::core::option::Option<LogsFilter>,
#[prost(message, repeated, tag = "2")]
pub rules: ::prost::alloc::vec::Vec<LogsNewValueRule>,
#[prost(message, repeated, tag = "3")]
pub notification_payload_filter: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LogsNewValueRule {
#[prost(message, optional, tag = "1")]
pub condition: ::core::option::Option<LogsNewValueCondition>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LogsNewValueCondition {
#[prost(message, optional, tag = "1")]
pub keypath_to_track: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub time_window: ::core::option::Option<LogsNewValueTimeWindow>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LogsRatioTimeWindow {
#[prost(oneof = "logs_ratio_time_window::Type", tags = "1")]
pub r#type: ::core::option::Option<logs_ratio_time_window::Type>,
}
pub mod logs_ratio_time_window {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Type {
#[prost(enumeration = "super::LogsRatioTimeWindowValue", tag = "1")]
LogsRatioTimeWindowSpecificValue(i32),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LogsRatioTimeWindowValue {
Minutes5OrUnspecified = 0,
Minutes10 = 1,
Minutes15 = 2,
Minutes30 = 3,
Hour1 = 4,
Hours2 = 5,
Hours4 = 6,
Hours6 = 7,
Hours12 = 8,
Hours24 = 9,
Hours36 = 10,
}
impl LogsRatioTimeWindowValue {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Minutes5OrUnspecified => {
"LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED"
}
Self::Minutes10 => "LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_10",
Self::Minutes15 => "LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_15",
Self::Minutes30 => "LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_30",
Self::Hour1 => "LOGS_RATIO_TIME_WINDOW_VALUE_HOUR_1",
Self::Hours2 => "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_2",
Self::Hours4 => "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_4",
Self::Hours6 => "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_6",
Self::Hours12 => "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_12",
Self::Hours24 => "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_24",
Self::Hours36 => "LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_36",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED" => {
Some(Self::Minutes5OrUnspecified)
}
"LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_10" => Some(Self::Minutes10),
"LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_15" => Some(Self::Minutes15),
"LOGS_RATIO_TIME_WINDOW_VALUE_MINUTES_30" => Some(Self::Minutes30),
"LOGS_RATIO_TIME_WINDOW_VALUE_HOUR_1" => Some(Self::Hour1),
"LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_2" => Some(Self::Hours2),
"LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_4" => Some(Self::Hours4),
"LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_6" => Some(Self::Hours6),
"LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_12" => Some(Self::Hours12),
"LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_24" => Some(Self::Hours24),
"LOGS_RATIO_TIME_WINDOW_VALUE_HOURS_36" => Some(Self::Hours36),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LogsRatioGroupByFor {
BothOrUnspecified = 0,
NumeratorOnly = 1,
DenumeratorOnly = 2,
}
impl LogsRatioGroupByFor {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::BothOrUnspecified => "LOGS_RATIO_GROUP_BY_FOR_BOTH_OR_UNSPECIFIED",
Self::NumeratorOnly => "LOGS_RATIO_GROUP_BY_FOR_NUMERATOR_ONLY",
Self::DenumeratorOnly => "LOGS_RATIO_GROUP_BY_FOR_DENUMERATOR_ONLY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"LOGS_RATIO_GROUP_BY_FOR_BOTH_OR_UNSPECIFIED" => {
Some(Self::BothOrUnspecified)
}
"LOGS_RATIO_GROUP_BY_FOR_NUMERATOR_ONLY" => Some(Self::NumeratorOnly),
"LOGS_RATIO_GROUP_BY_FOR_DENUMERATOR_ONLY" => Some(Self::DenumeratorOnly),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LogsRatioConditionType {
MoreThanOrUnspecified = 0,
LessThan = 1,
}
impl LogsRatioConditionType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::MoreThanOrUnspecified => {
"LOGS_RATIO_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"
}
Self::LessThan => "LOGS_RATIO_CONDITION_TYPE_LESS_THAN",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"LOGS_RATIO_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED" => {
Some(Self::MoreThanOrUnspecified)
}
"LOGS_RATIO_CONDITION_TYPE_LESS_THAN" => Some(Self::LessThan),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LogsRatioThresholdType {
#[prost(message, optional, tag = "1")]
pub numerator: ::core::option::Option<LogsFilter>,
#[prost(message, optional, tag = "2")]
pub numerator_alias: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub denominator: ::core::option::Option<LogsFilter>,
#[prost(message, optional, tag = "4")]
pub denominator_alias: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "5")]
pub rules: ::prost::alloc::vec::Vec<LogsRatioRules>,
#[prost(message, repeated, tag = "6")]
pub notification_payload_filter: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
#[prost(enumeration = "LogsRatioGroupByFor", tag = "7")]
pub group_by_for: i32,
#[prost(message, optional, tag = "8")]
pub undetected_values_management: ::core::option::Option<UndetectedValuesManagement>,
#[prost(message, optional, tag = "9")]
pub ignore_infinity: ::core::option::Option<bool>,
#[prost(message, optional, tag = "10")]
pub evaluation_delay_ms: ::core::option::Option<i32>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LogsRatioRules {
#[prost(message, optional, tag = "1")]
pub condition: ::core::option::Option<LogsRatioCondition>,
#[prost(message, optional, tag = "2")]
pub r#override: ::core::option::Option<AlertDefOverride>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LogsRatioCondition {
#[prost(message, optional, tag = "1")]
pub threshold: ::core::option::Option<f64>,
#[prost(message, optional, tag = "2")]
pub time_window: ::core::option::Option<LogsRatioTimeWindow>,
#[prost(enumeration = "LogsRatioConditionType", tag = "4")]
pub condition_type: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LogsImmediateType {
#[prost(message, optional, tag = "1")]
pub logs_filter: ::core::option::Option<LogsFilter>,
#[prost(message, repeated, tag = "2")]
pub notification_payload_filter: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LogsTimeWindow {
#[prost(oneof = "logs_time_window::Type", tags = "1")]
pub r#type: ::core::option::Option<logs_time_window::Type>,
}
pub mod logs_time_window {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Type {
#[prost(enumeration = "super::LogsTimeWindowValue", tag = "1")]
LogsTimeWindowSpecificValue(i32),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LogsTimeWindowValue {
Minutes5OrUnspecified = 0,
Minutes10 = 1,
Minutes20 = 2,
Minutes15 = 3,
Minutes30 = 4,
Hour1 = 5,
Hours2 = 6,
Hours4 = 7,
Hours6 = 8,
Hours12 = 9,
Hours24 = 10,
Hours36 = 11,
}
impl LogsTimeWindowValue {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Minutes5OrUnspecified => {
"LOGS_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED"
}
Self::Minutes10 => "LOGS_TIME_WINDOW_VALUE_MINUTES_10",
Self::Minutes20 => "LOGS_TIME_WINDOW_VALUE_MINUTES_20",
Self::Minutes15 => "LOGS_TIME_WINDOW_VALUE_MINUTES_15",
Self::Minutes30 => "LOGS_TIME_WINDOW_VALUE_MINUTES_30",
Self::Hour1 => "LOGS_TIME_WINDOW_VALUE_HOUR_1",
Self::Hours2 => "LOGS_TIME_WINDOW_VALUE_HOURS_2",
Self::Hours4 => "LOGS_TIME_WINDOW_VALUE_HOURS_4",
Self::Hours6 => "LOGS_TIME_WINDOW_VALUE_HOURS_6",
Self::Hours12 => "LOGS_TIME_WINDOW_VALUE_HOURS_12",
Self::Hours24 => "LOGS_TIME_WINDOW_VALUE_HOURS_24",
Self::Hours36 => "LOGS_TIME_WINDOW_VALUE_HOURS_36",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"LOGS_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED" => {
Some(Self::Minutes5OrUnspecified)
}
"LOGS_TIME_WINDOW_VALUE_MINUTES_10" => Some(Self::Minutes10),
"LOGS_TIME_WINDOW_VALUE_MINUTES_20" => Some(Self::Minutes20),
"LOGS_TIME_WINDOW_VALUE_MINUTES_15" => Some(Self::Minutes15),
"LOGS_TIME_WINDOW_VALUE_MINUTES_30" => Some(Self::Minutes30),
"LOGS_TIME_WINDOW_VALUE_HOUR_1" => Some(Self::Hour1),
"LOGS_TIME_WINDOW_VALUE_HOURS_2" => Some(Self::Hours2),
"LOGS_TIME_WINDOW_VALUE_HOURS_4" => Some(Self::Hours4),
"LOGS_TIME_WINDOW_VALUE_HOURS_6" => Some(Self::Hours6),
"LOGS_TIME_WINDOW_VALUE_HOURS_12" => Some(Self::Hours12),
"LOGS_TIME_WINDOW_VALUE_HOURS_24" => Some(Self::Hours24),
"LOGS_TIME_WINDOW_VALUE_HOURS_36" => Some(Self::Hours36),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LogsThresholdConditionType {
MoreThanOrUnspecified = 0,
LessThan = 1,
}
impl LogsThresholdConditionType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::MoreThanOrUnspecified => {
"LOGS_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"
}
Self::LessThan => "LOGS_THRESHOLD_CONDITION_TYPE_LESS_THAN",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"LOGS_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED" => {
Some(Self::MoreThanOrUnspecified)
}
"LOGS_THRESHOLD_CONDITION_TYPE_LESS_THAN" => Some(Self::LessThan),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LogsThresholdType {
#[prost(message, optional, tag = "1")]
pub logs_filter: ::core::option::Option<LogsFilter>,
#[prost(message, optional, tag = "2")]
pub undetected_values_management: ::core::option::Option<UndetectedValuesManagement>,
#[prost(message, repeated, tag = "3")]
pub rules: ::prost::alloc::vec::Vec<LogsThresholdRule>,
#[prost(message, repeated, tag = "4")]
pub notification_payload_filter: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "5")]
pub evaluation_delay_ms: ::core::option::Option<i32>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LogsThresholdRule {
#[prost(message, optional, tag = "1")]
pub condition: ::core::option::Option<LogsThresholdCondition>,
#[prost(message, optional, tag = "2")]
pub r#override: ::core::option::Option<AlertDefOverride>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LogsThresholdCondition {
#[prost(message, optional, tag = "1")]
pub threshold: ::core::option::Option<f64>,
#[prost(message, optional, tag = "2")]
pub time_window: ::core::option::Option<LogsTimeWindow>,
#[prost(enumeration = "LogsThresholdConditionType", tag = "3")]
pub condition_type: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LogsAnomalyConditionType {
MoreThanUsualOrUnspecified = 0,
}
impl LogsAnomalyConditionType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::MoreThanUsualOrUnspecified => {
"LOGS_ANOMALY_CONDITION_TYPE_MORE_THAN_USUAL_OR_UNSPECIFIED"
}
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"LOGS_ANOMALY_CONDITION_TYPE_MORE_THAN_USUAL_OR_UNSPECIFIED" => {
Some(Self::MoreThanUsualOrUnspecified)
}
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LogsAnomalyType {
#[prost(message, optional, tag = "1")]
pub logs_filter: ::core::option::Option<LogsFilter>,
#[prost(message, repeated, tag = "2")]
pub rules: ::prost::alloc::vec::Vec<LogsAnomalyRule>,
#[prost(message, repeated, tag = "3")]
pub notification_payload_filter: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "4")]
pub evaluation_delay_ms: ::core::option::Option<i32>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LogsAnomalyRule {
#[prost(message, optional, tag = "1")]
pub condition: ::core::option::Option<LogsAnomalyCondition>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LogsAnomalyCondition {
#[prost(message, optional, tag = "1")]
pub minimum_threshold: ::core::option::Option<f64>,
#[prost(message, optional, tag = "2")]
pub time_window: ::core::option::Option<LogsTimeWindow>,
#[prost(enumeration = "LogsAnomalyConditionType", tag = "3")]
pub condition_type: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LogsTimeRelativeComparedTo {
PreviousHourOrUnspecified = 0,
SameHourYesterday = 1,
SameHourLastWeek = 2,
Yesterday = 3,
SameDayLastWeek = 4,
SameDayLastMonth = 5,
}
impl LogsTimeRelativeComparedTo {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::PreviousHourOrUnspecified => {
"LOGS_TIME_RELATIVE_COMPARED_TO_PREVIOUS_HOUR_OR_UNSPECIFIED"
}
Self::SameHourYesterday => {
"LOGS_TIME_RELATIVE_COMPARED_TO_SAME_HOUR_YESTERDAY"
}
Self::SameHourLastWeek => {
"LOGS_TIME_RELATIVE_COMPARED_TO_SAME_HOUR_LAST_WEEK"
}
Self::Yesterday => "LOGS_TIME_RELATIVE_COMPARED_TO_YESTERDAY",
Self::SameDayLastWeek => "LOGS_TIME_RELATIVE_COMPARED_TO_SAME_DAY_LAST_WEEK",
Self::SameDayLastMonth => {
"LOGS_TIME_RELATIVE_COMPARED_TO_SAME_DAY_LAST_MONTH"
}
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"LOGS_TIME_RELATIVE_COMPARED_TO_PREVIOUS_HOUR_OR_UNSPECIFIED" => {
Some(Self::PreviousHourOrUnspecified)
}
"LOGS_TIME_RELATIVE_COMPARED_TO_SAME_HOUR_YESTERDAY" => {
Some(Self::SameHourYesterday)
}
"LOGS_TIME_RELATIVE_COMPARED_TO_SAME_HOUR_LAST_WEEK" => {
Some(Self::SameHourLastWeek)
}
"LOGS_TIME_RELATIVE_COMPARED_TO_YESTERDAY" => Some(Self::Yesterday),
"LOGS_TIME_RELATIVE_COMPARED_TO_SAME_DAY_LAST_WEEK" => {
Some(Self::SameDayLastWeek)
}
"LOGS_TIME_RELATIVE_COMPARED_TO_SAME_DAY_LAST_MONTH" => {
Some(Self::SameDayLastMonth)
}
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LogsTimeRelativeConditionType {
MoreThanOrUnspecified = 0,
LessThan = 1,
}
impl LogsTimeRelativeConditionType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::MoreThanOrUnspecified => {
"LOGS_TIME_RELATIVE_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"
}
Self::LessThan => "LOGS_TIME_RELATIVE_CONDITION_TYPE_LESS_THAN",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"LOGS_TIME_RELATIVE_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED" => {
Some(Self::MoreThanOrUnspecified)
}
"LOGS_TIME_RELATIVE_CONDITION_TYPE_LESS_THAN" => Some(Self::LessThan),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LogsTimeRelativeThresholdType {
#[prost(message, optional, tag = "1")]
pub logs_filter: ::core::option::Option<LogsFilter>,
#[prost(message, repeated, tag = "2")]
pub rules: ::prost::alloc::vec::Vec<LogsTimeRelativeRule>,
#[prost(message, optional, tag = "3")]
pub ignore_infinity: ::core::option::Option<bool>,
#[prost(message, repeated, tag = "4")]
pub notification_payload_filter: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "5")]
pub undetected_values_management: ::core::option::Option<UndetectedValuesManagement>,
#[prost(message, optional, tag = "6")]
pub evaluation_delay_ms: ::core::option::Option<i32>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LogsTimeRelativeRule {
#[prost(message, optional, tag = "1")]
pub condition: ::core::option::Option<LogsTimeRelativeCondition>,
#[prost(message, optional, tag = "2")]
pub r#override: ::core::option::Option<AlertDefOverride>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LogsTimeRelativeCondition {
#[prost(message, optional, tag = "1")]
pub threshold: ::core::option::Option<f64>,
#[prost(enumeration = "LogsTimeRelativeComparedTo", tag = "2")]
pub compared_to: i32,
#[prost(enumeration = "LogsTimeRelativeConditionType", tag = "4")]
pub condition_type: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TracingFilter {
#[prost(oneof = "tracing_filter::FilterType", tags = "1")]
pub filter_type: ::core::option::Option<tracing_filter::FilterType>,
}
pub mod tracing_filter {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum FilterType {
#[prost(message, tag = "1")]
SimpleFilter(super::TracingSimpleFilter),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TracingSimpleFilter {
#[prost(message, optional, tag = "1")]
pub tracing_label_filters: ::core::option::Option<TracingLabelFilters>,
#[prost(message, optional, tag = "2")]
pub latency_threshold_ms: ::core::option::Option<u64>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TracingLabelFilters {
#[prost(message, repeated, tag = "1")]
pub application_name: ::prost::alloc::vec::Vec<TracingFilterType>,
#[prost(message, repeated, tag = "2")]
pub subsystem_name: ::prost::alloc::vec::Vec<TracingFilterType>,
#[prost(message, repeated, tag = "3")]
pub service_name: ::prost::alloc::vec::Vec<TracingFilterType>,
#[prost(message, repeated, tag = "4")]
pub operation_name: ::prost::alloc::vec::Vec<TracingFilterType>,
#[prost(message, repeated, tag = "5")]
pub span_fields: ::prost::alloc::vec::Vec<TracingSpanFieldsFilterType>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TracingSpanFieldsFilterType {
#[prost(message, optional, tag = "1")]
pub key: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub filter_type: ::core::option::Option<TracingFilterType>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TracingFilterType {
#[prost(message, repeated, tag = "1")]
pub values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(enumeration = "TracingFilterOperationType", tag = "2")]
pub operation: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TracingFilterOperationType {
IsOrUnspecified = 0,
Includes = 1,
EndsWith = 2,
StartsWith = 3,
IsNot = 4,
}
impl TracingFilterOperationType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::IsOrUnspecified => "TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED",
Self::Includes => "TRACING_FILTER_OPERATION_TYPE_INCLUDES",
Self::EndsWith => "TRACING_FILTER_OPERATION_TYPE_ENDS_WITH",
Self::StartsWith => "TRACING_FILTER_OPERATION_TYPE_STARTS_WITH",
Self::IsNot => "TRACING_FILTER_OPERATION_TYPE_IS_NOT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TRACING_FILTER_OPERATION_TYPE_IS_OR_UNSPECIFIED" => {
Some(Self::IsOrUnspecified)
}
"TRACING_FILTER_OPERATION_TYPE_INCLUDES" => Some(Self::Includes),
"TRACING_FILTER_OPERATION_TYPE_ENDS_WITH" => Some(Self::EndsWith),
"TRACING_FILTER_OPERATION_TYPE_STARTS_WITH" => Some(Self::StartsWith),
"TRACING_FILTER_OPERATION_TYPE_IS_NOT" => Some(Self::IsNot),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TracingImmediateType {
#[prost(message, optional, tag = "1")]
pub tracing_filter: ::core::option::Option<TracingFilter>,
#[prost(message, repeated, tag = "2")]
pub notification_payload_filter: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TracingTimeWindow {
#[prost(oneof = "tracing_time_window::Type", tags = "1")]
pub r#type: ::core::option::Option<tracing_time_window::Type>,
}
pub mod tracing_time_window {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Type {
#[prost(enumeration = "super::TracingTimeWindowValue", tag = "1")]
TracingTimeWindowValue(i32),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TracingTimeWindowValue {
Minutes5OrUnspecified = 0,
Minutes10 = 1,
Minutes15 = 2,
Minutes20 = 11,
Minutes30 = 3,
Hour1 = 4,
Hours2 = 5,
Hours4 = 6,
Hours6 = 7,
Hours12 = 8,
Hours24 = 9,
Hours36 = 10,
}
impl TracingTimeWindowValue {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Minutes5OrUnspecified => {
"TRACING_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED"
}
Self::Minutes10 => "TRACING_TIME_WINDOW_VALUE_MINUTES_10",
Self::Minutes15 => "TRACING_TIME_WINDOW_VALUE_MINUTES_15",
Self::Minutes20 => "TRACING_TIME_WINDOW_VALUE_MINUTES_20",
Self::Minutes30 => "TRACING_TIME_WINDOW_VALUE_MINUTES_30",
Self::Hour1 => "TRACING_TIME_WINDOW_VALUE_HOUR_1",
Self::Hours2 => "TRACING_TIME_WINDOW_VALUE_HOURS_2",
Self::Hours4 => "TRACING_TIME_WINDOW_VALUE_HOURS_4",
Self::Hours6 => "TRACING_TIME_WINDOW_VALUE_HOURS_6",
Self::Hours12 => "TRACING_TIME_WINDOW_VALUE_HOURS_12",
Self::Hours24 => "TRACING_TIME_WINDOW_VALUE_HOURS_24",
Self::Hours36 => "TRACING_TIME_WINDOW_VALUE_HOURS_36",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TRACING_TIME_WINDOW_VALUE_MINUTES_5_OR_UNSPECIFIED" => {
Some(Self::Minutes5OrUnspecified)
}
"TRACING_TIME_WINDOW_VALUE_MINUTES_10" => Some(Self::Minutes10),
"TRACING_TIME_WINDOW_VALUE_MINUTES_15" => Some(Self::Minutes15),
"TRACING_TIME_WINDOW_VALUE_MINUTES_20" => Some(Self::Minutes20),
"TRACING_TIME_WINDOW_VALUE_MINUTES_30" => Some(Self::Minutes30),
"TRACING_TIME_WINDOW_VALUE_HOUR_1" => Some(Self::Hour1),
"TRACING_TIME_WINDOW_VALUE_HOURS_2" => Some(Self::Hours2),
"TRACING_TIME_WINDOW_VALUE_HOURS_4" => Some(Self::Hours4),
"TRACING_TIME_WINDOW_VALUE_HOURS_6" => Some(Self::Hours6),
"TRACING_TIME_WINDOW_VALUE_HOURS_12" => Some(Self::Hours12),
"TRACING_TIME_WINDOW_VALUE_HOURS_24" => Some(Self::Hours24),
"TRACING_TIME_WINDOW_VALUE_HOURS_36" => Some(Self::Hours36),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TracingThresholdConditionType {
MoreThanOrUnspecified = 0,
}
impl TracingThresholdConditionType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::MoreThanOrUnspecified => {
"TRACING_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED"
}
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TRACING_THRESHOLD_CONDITION_TYPE_MORE_THAN_OR_UNSPECIFIED" => {
Some(Self::MoreThanOrUnspecified)
}
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TracingThresholdType {
#[prost(message, optional, tag = "1")]
pub tracing_filter: ::core::option::Option<TracingFilter>,
#[prost(message, repeated, tag = "2")]
pub rules: ::prost::alloc::vec::Vec<TracingThresholdRule>,
#[prost(message, repeated, tag = "3")]
pub notification_payload_filter: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TracingThresholdRule {
#[prost(message, optional, tag = "1")]
pub condition: ::core::option::Option<TracingThresholdCondition>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TracingThresholdCondition {
#[prost(message, optional, tag = "1")]
pub span_amount: ::core::option::Option<f64>,
#[prost(message, optional, tag = "2")]
pub time_window: ::core::option::Option<TracingTimeWindow>,
#[prost(enumeration = "TracingThresholdConditionType", tag = "3")]
pub condition_type: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LogsUniqueValueTimeWindow {
#[prost(oneof = "logs_unique_value_time_window::Type", tags = "1")]
pub r#type: ::core::option::Option<logs_unique_value_time_window::Type>,
}
pub mod logs_unique_value_time_window {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Type {
#[prost(enumeration = "super::LogsUniqueValueTimeWindowValue", tag = "1")]
LogsUniqueValueTimeWindowSpecificValue(i32),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LogsUniqueValueTimeWindowValue {
Minute1OrUnspecified = 0,
Minutes5 = 10,
Minutes10 = 11,
Minutes15 = 1,
Minutes20 = 2,
Minutes30 = 3,
Hours1 = 4,
Hours2 = 5,
Hours4 = 6,
Hours6 = 7,
Hours12 = 8,
Hours24 = 9,
Hours36 = 12,
}
impl LogsUniqueValueTimeWindowValue {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Minute1OrUnspecified => {
"LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTE_1_OR_UNSPECIFIED"
}
Self::Minutes5 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_5",
Self::Minutes10 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_10",
Self::Minutes15 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_15",
Self::Minutes20 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_20",
Self::Minutes30 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_30",
Self::Hours1 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_1",
Self::Hours2 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_2",
Self::Hours4 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_4",
Self::Hours6 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_6",
Self::Hours12 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_12",
Self::Hours24 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_24",
Self::Hours36 => "LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_36",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTE_1_OR_UNSPECIFIED" => {
Some(Self::Minute1OrUnspecified)
}
"LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_5" => Some(Self::Minutes5),
"LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_10" => Some(Self::Minutes10),
"LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_15" => Some(Self::Minutes15),
"LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_20" => Some(Self::Minutes20),
"LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_MINUTES_30" => Some(Self::Minutes30),
"LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_1" => Some(Self::Hours1),
"LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_2" => Some(Self::Hours2),
"LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_4" => Some(Self::Hours4),
"LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_6" => Some(Self::Hours6),
"LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_12" => Some(Self::Hours12),
"LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_24" => Some(Self::Hours24),
"LOGS_UNIQUE_VALUE_TIME_WINDOW_VALUE_HOURS_36" => Some(Self::Hours36),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LogsUniqueCountType {
#[prost(message, optional, tag = "1")]
pub logs_filter: ::core::option::Option<LogsFilter>,
#[prost(message, repeated, tag = "2")]
pub rules: ::prost::alloc::vec::Vec<LogsUniqueCountRule>,
#[prost(message, repeated, tag = "3")]
pub notification_payload_filter: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "4")]
pub max_unique_count_per_group_by_key: ::core::option::Option<i64>,
#[prost(message, optional, tag = "5")]
pub unique_count_keypath: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LogsUniqueCountRule {
#[prost(message, optional, tag = "1")]
pub condition: ::core::option::Option<LogsUniqueCountCondition>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LogsUniqueCountCondition {
#[prost(message, optional, tag = "2")]
pub max_unique_count: ::core::option::Option<i64>,
#[prost(message, optional, tag = "3")]
pub time_window: ::core::option::Option<LogsUniqueValueTimeWindow>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AlertDef {
#[prost(message, optional, tag = "1")]
pub alert_def_properties: ::core::option::Option<AlertDefProperties>,
#[prost(message, optional, tag = "2")]
pub id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "20")]
pub alert_version_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub created_time: ::core::option::Option<::prost_wkt_types::Timestamp>,
#[prost(message, optional, tag = "4")]
pub updated_time: ::core::option::Option<::prost_wkt_types::Timestamp>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AlertDefProperties {
#[prost(message, optional, tag = "1")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub enabled: ::core::option::Option<bool>,
#[prost(enumeration = "AlertDefPriority", tag = "4")]
pub priority: i32,
#[prost(enumeration = "AlertDefType", tag = "6")]
pub r#type: i32,
#[prost(message, repeated, tag = "7")]
pub group_by_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "8")]
pub incidents_settings: ::core::option::Option<AlertDefIncidentSettings>,
#[prost(message, optional, tag = "9")]
pub notification_group: ::core::option::Option<AlertDefNotificationGroup>,
#[deprecated]
#[prost(message, repeated, tag = "210")]
pub notification_group_excess: ::prost::alloc::vec::Vec<AlertDefNotificationGroup>,
#[prost(map = "string, string", tag = "10")]
pub entity_labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "11")]
pub phantom_mode: ::core::option::Option<bool>,
#[prost(message, optional, tag = "12")]
pub deleted: ::core::option::Option<bool>,
#[prost(oneof = "alert_def_properties::Schedule", tags = "5")]
pub schedule: ::core::option::Option<alert_def_properties::Schedule>,
#[prost(
oneof = "alert_def_properties::TypeDefinition",
tags = "101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112"
)]
pub type_definition: ::core::option::Option<alert_def_properties::TypeDefinition>,
}
pub mod alert_def_properties {
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Schedule {
#[prost(message, tag = "5")]
ActiveOn(super::ActivitySchedule),
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum TypeDefinition {
#[prost(message, tag = "101")]
LogsImmediate(super::LogsImmediateType),
#[prost(message, tag = "102")]
TracingImmediate(super::TracingImmediateType),
#[prost(message, tag = "103")]
LogsThreshold(super::LogsThresholdType),
#[prost(message, tag = "104")]
LogsRatioThreshold(super::LogsRatioThresholdType),
#[prost(message, tag = "105")]
LogsTimeRelativeThreshold(super::LogsTimeRelativeThresholdType),
#[prost(message, tag = "106")]
MetricThreshold(super::MetricThresholdType),
#[prost(message, tag = "107")]
TracingThreshold(super::TracingThresholdType),
#[prost(message, tag = "108")]
Flow(super::FlowType),
#[prost(message, tag = "109")]
LogsAnomaly(super::LogsAnomalyType),
#[prost(message, tag = "110")]
MetricAnomaly(super::MetricAnomalyType),
#[prost(message, tag = "111")]
LogsNewValue(super::LogsNewValueType),
#[prost(message, tag = "112")]
LogsUniqueCount(super::LogsUniqueCountType),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuditLogDescription {
#[prost(string, optional, tag = "1")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct OrderBy {
#[prost(enumeration = "OrderByFields", tag = "1")]
pub field_name: i32,
#[prost(enumeration = "OrderByDirection", tag = "2")]
pub direction: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAlertDefRequest {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAlertDefByVersionIdRequest {
#[prost(message, optional, tag = "1")]
pub alert_version_id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAlertDefResponse {
#[prost(message, optional, tag = "1")]
pub alert_def: ::core::option::Option<AlertDef>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAlertDefByVersionIdResponse {
#[prost(message, optional, tag = "1")]
pub alert_def: ::core::option::Option<AlertDef>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAlertDefsResponse {
#[prost(message, repeated, tag = "1")]
pub alert_defs: ::prost::alloc::vec::Vec<AlertDef>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ListAlertDefsRequest {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DownloadAlertsRequest {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DownloadAlertsResponse {
#[prost(bytes = "vec", tag = "1")]
pub content: ::prost::alloc::vec::Vec<u8>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetAlertDefRequest {
#[prost(message, repeated, tag = "1")]
pub ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetAlertDefResponse {
#[prost(map = "string, message", tag = "1")]
pub alert_defs: ::std::collections::HashMap<
::prost::alloc::string::String,
AlertDef,
>,
#[prost(message, repeated, tag = "2")]
pub not_found_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteAlertDefRequest {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeleteAlertDefResponse {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReplaceAlertDefRequest {
#[prost(message, optional, tag = "1")]
pub alert_def_properties: ::core::option::Option<AlertDefProperties>,
#[prost(message, optional, tag = "2")]
pub id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReplaceAlertDefResponse {
#[prost(message, optional, tag = "1")]
pub alert_def: ::core::option::Option<AlertDef>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateAlertDefRequest {
#[prost(message, optional, tag = "1")]
pub alert_def_properties: ::core::option::Option<AlertDefProperties>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateAlertDefResponse {
#[prost(message, optional, tag = "1")]
pub alert_def: ::core::option::Option<AlertDef>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetActiveRequest {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "2")]
pub active: ::core::option::Option<bool>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SetActiveResponse {}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OrderByDirection {
AscOrUnspecified = 0,
Desc = 1,
}
impl OrderByDirection {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::AscOrUnspecified => "ORDER_BY_DIRECTION_ASC_OR_UNSPECIFIED",
Self::Desc => "ORDER_BY_DIRECTION_DESC",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ORDER_BY_DIRECTION_ASC_OR_UNSPECIFIED" => Some(Self::AscOrUnspecified),
"ORDER_BY_DIRECTION_DESC" => Some(Self::Desc),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OrderByFields {
NameOrUnspecified = 0,
Id = 1,
Severity = 2,
CreatedTime = 3,
UpdatedTime = 4,
}
impl OrderByFields {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::NameOrUnspecified => "ORDER_BY_FIELDS_NAME_OR_UNSPECIFIED",
Self::Id => "ORDER_BY_FIELDS_ID",
Self::Severity => "ORDER_BY_FIELDS_SEVERITY",
Self::CreatedTime => "ORDER_BY_FIELDS_CREATED_TIME",
Self::UpdatedTime => "ORDER_BY_FIELDS_UPDATED_TIME",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ORDER_BY_FIELDS_NAME_OR_UNSPECIFIED" => Some(Self::NameOrUnspecified),
"ORDER_BY_FIELDS_ID" => Some(Self::Id),
"ORDER_BY_FIELDS_SEVERITY" => Some(Self::Severity),
"ORDER_BY_FIELDS_CREATED_TIME" => Some(Self::CreatedTime),
"ORDER_BY_FIELDS_UPDATED_TIME" => Some(Self::UpdatedTime),
_ => None,
}
}
}
pub mod alert_defs_service_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct AlertDefsServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl AlertDefsServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> AlertDefsServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AlertDefsServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
AlertDefsServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn get_alert_def(
&mut self,
request: impl tonic::IntoRequest<super::GetAlertDefRequest>,
) -> std::result::Result<
tonic::Response<super::GetAlertDefResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/com.coralogixapis.alerts.v3.AlertDefsService/GetAlertDef",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.alerts.v3.AlertDefsService",
"GetAlertDef",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_alert_def_by_version_id(
&mut self,
request: impl tonic::IntoRequest<super::GetAlertDefByVersionIdRequest>,
) -> std::result::Result<
tonic::Response<super::GetAlertDefByVersionIdResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/com.coralogixapis.alerts.v3.AlertDefsService/GetAlertDefByVersionId",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.alerts.v3.AlertDefsService",
"GetAlertDefByVersionId",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn create_alert_def(
&mut self,
request: impl tonic::IntoRequest<super::CreateAlertDefRequest>,
) -> std::result::Result<
tonic::Response<super::CreateAlertDefResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/com.coralogixapis.alerts.v3.AlertDefsService/CreateAlertDef",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.alerts.v3.AlertDefsService",
"CreateAlertDef",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn replace_alert_def(
&mut self,
request: impl tonic::IntoRequest<super::ReplaceAlertDefRequest>,
) -> std::result::Result<
tonic::Response<super::ReplaceAlertDefResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/com.coralogixapis.alerts.v3.AlertDefsService/ReplaceAlertDef",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.alerts.v3.AlertDefsService",
"ReplaceAlertDef",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_alert_defs(
&mut self,
request: impl tonic::IntoRequest<super::ListAlertDefsRequest>,
) -> std::result::Result<
tonic::Response<super::ListAlertDefsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/com.coralogixapis.alerts.v3.AlertDefsService/ListAlertDefs",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.alerts.v3.AlertDefsService",
"ListAlertDefs",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn download_alerts(
&mut self,
request: impl tonic::IntoRequest<super::DownloadAlertsRequest>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::DownloadAlertsResponse>>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/com.coralogixapis.alerts.v3.AlertDefsService/DownloadAlerts",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.alerts.v3.AlertDefsService",
"DownloadAlerts",
),
);
self.inner.server_streaming(req, path, codec).await
}
pub async fn delete_alert_def(
&mut self,
request: impl tonic::IntoRequest<super::DeleteAlertDefRequest>,
) -> std::result::Result<
tonic::Response<super::DeleteAlertDefResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/com.coralogixapis.alerts.v3.AlertDefsService/DeleteAlertDef",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.alerts.v3.AlertDefsService",
"DeleteAlertDef",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn set_active(
&mut self,
request: impl tonic::IntoRequest<super::SetActiveRequest>,
) -> std::result::Result<
tonic::Response<super::SetActiveResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/com.coralogixapis.alerts.v3.AlertDefsService/SetActive",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"com.coralogixapis.alerts.v3.AlertDefsService",
"SetActive",
),
);
self.inner.unary(req, path, codec).await
}
}
}