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