1#[derive(serde::Serialize, serde::Deserialize)]
3#[serde(rename_all = "snake_case")]
4#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
5#[repr(i32)]
6pub enum ConnectorType {
7 Unspecified = 0,
8 Slack = 1,
9 GenericHttps = 2,
10 Pagerduty = 3,
11 IbmEventNotifications = 5,
12}
13impl ConnectorType {
14 pub fn as_str_name(&self) -> &'static str {
19 match self {
20 Self::Unspecified => "CONNECTOR_TYPE_UNSPECIFIED",
21 Self::Slack => "SLACK",
22 Self::GenericHttps => "GENERIC_HTTPS",
23 Self::Pagerduty => "PAGERDUTY",
24 Self::IbmEventNotifications => "IBM_EVENT_NOTIFICATIONS",
25 }
26 }
27 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
29 match value {
30 "CONNECTOR_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
31 "SLACK" => Some(Self::Slack),
32 "GENERIC_HTTPS" => Some(Self::GenericHttps),
33 "PAGERDUTY" => Some(Self::Pagerduty),
34 "IBM_EVENT_NOTIFICATIONS" => Some(Self::IbmEventNotifications),
35 _ => None,
36 }
37 }
38}
39#[derive(serde::Serialize, serde::Deserialize)]
40#[serde(rename_all = "snake_case")]
41#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
42#[repr(i32)]
43pub enum EntityType {
44 Unspecified = 0,
45 Alerts = 1,
46 TestNotifications = 2,
47}
48impl EntityType {
49 pub fn as_str_name(&self) -> &'static str {
54 match self {
55 Self::Unspecified => "ENTITY_TYPE_UNSPECIFIED",
56 Self::Alerts => "ALERTS",
57 Self::TestNotifications => "TEST_NOTIFICATIONS",
58 }
59 }
60 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
62 match value {
63 "ENTITY_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
64 "ALERTS" => Some(Self::Alerts),
65 "TEST_NOTIFICATIONS" => Some(Self::TestNotifications),
66 _ => None,
67 }
68 }
69}
70#[derive(serde::Serialize, serde::Deserialize)]
71#[serde(rename_all = "snake_case")]
72#[derive(Clone, PartialEq, ::prost::Message)]
73pub struct ConnectorConfigField {
74 #[prost(string, tag = "1")]
75 pub field_name: ::prost::alloc::string::String,
76 #[prost(string, tag = "2")]
77 pub value: ::prost::alloc::string::String,
78}
79#[derive(serde::Serialize, serde::Deserialize)]
80#[serde(rename_all = "snake_case")]
81#[derive(Clone, PartialEq, ::prost::Message)]
82pub struct TemplatedConnectorConfigField {
83 #[prost(string, tag = "1")]
84 pub field_name: ::prost::alloc::string::String,
85 #[prost(string, tag = "2")]
86 pub template: ::prost::alloc::string::String,
87}
88#[derive(serde::Serialize, serde::Deserialize)]
89#[serde(rename_all = "snake_case")]
90#[derive(Clone, PartialEq, ::prost::Message)]
91pub struct MessageConfigField {
92 #[prost(string, tag = "1")]
93 pub field_name: ::prost::alloc::string::String,
94 #[prost(string, tag = "2")]
95 pub template: ::prost::alloc::string::String,
96}
97#[derive(serde::Serialize, serde::Deserialize)]
98#[serde(rename_all = "snake_case")]
99#[derive(Clone, PartialEq, ::prost::Message)]
100pub struct RenderedConnectorConfigField {
101 #[prost(string, tag = "1")]
102 pub field_name: ::prost::alloc::string::String,
103 #[prost(string, tag = "2")]
104 pub value: ::prost::alloc::string::String,
105}
106#[derive(serde::Serialize, serde::Deserialize)]
107#[serde(rename_all = "snake_case")]
108#[derive(Clone, PartialEq, ::prost::Message)]
109pub struct RenderedMessageConfigField {
110 #[prost(string, tag = "1")]
111 pub field_name: ::prost::alloc::string::String,
112 #[prost(string, tag = "2")]
113 pub value: ::prost::alloc::string::String,
114}
115#[derive(serde::Serialize, serde::Deserialize)]
116#[serde(rename_all = "snake_case")]
117#[derive(Clone, PartialEq, ::prost::Message)]
118pub struct ConfigOverrides {
119 #[prost(message, optional, tag = "1")]
120 pub condition_type: ::core::option::Option<ConditionType>,
121 #[prost(string, optional, tag = "2")]
122 pub payload_type: ::core::option::Option<::prost::alloc::string::String>,
123 #[prost(message, optional, tag = "3")]
124 pub message_config: ::core::option::Option<MessageConfig>,
125}
126#[derive(serde::Serialize, serde::Deserialize)]
127#[serde(rename_all = "snake_case")]
128#[derive(Clone, PartialEq, ::prost::Message)]
129pub struct ConditionType {
130 #[prost(oneof = "condition_type::Condition", tags = "1, 2")]
131 pub condition: ::core::option::Option<condition_type::Condition>,
132}
133pub mod condition_type {
135 #[derive(serde::Serialize, serde::Deserialize)]
136 #[serde(rename_all = "snake_case")]
137 #[derive(Clone, PartialEq, ::prost::Oneof)]
138 pub enum Condition {
139 #[prost(message, tag = "1")]
140 MatchEntityType(super::MatchEntityTypeCondition),
141 #[prost(message, tag = "2")]
142 MatchEntityTypeAndSubType(super::MatchEntityTypeAndSubTypeCondition),
143 }
144}
145#[derive(serde::Serialize, serde::Deserialize)]
146#[serde(rename_all = "snake_case")]
147#[derive(Clone, PartialEq, ::prost::Message)]
148pub struct MessageConfig {
149 #[prost(message, repeated, tag = "1")]
150 pub fields: ::prost::alloc::vec::Vec<MessageConfigField>,
151}
152#[derive(serde::Serialize, serde::Deserialize)]
153#[serde(rename_all = "snake_case")]
154#[derive(Clone, Copy, PartialEq, ::prost::Message)]
155pub struct MatchEntityTypeCondition {}
156#[derive(serde::Serialize, serde::Deserialize)]
157#[serde(rename_all = "snake_case")]
158#[derive(Clone, PartialEq, ::prost::Message)]
159pub struct MatchEntityTypeAndSubTypeCondition {
160 #[prost(string, tag = "2")]
161 pub entity_sub_type: ::prost::alloc::string::String,
162}