cx_api/generated/
com.coralogix.rules.v1.rs

1// This file is @generated by prost-build.
2#[derive(serde::Serialize, serde::Deserialize)]
3#[serde(rename_all = "snake_case")]
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct Rule {
6    #[prost(message, optional, tag = "1")]
7    pub id: ::core::option::Option<::prost::alloc::string::String>,
8    #[prost(message, optional, tag = "2")]
9    pub name: ::core::option::Option<::prost::alloc::string::String>,
10    #[prost(message, optional, tag = "3")]
11    pub description: ::core::option::Option<::prost::alloc::string::String>,
12    #[prost(message, optional, tag = "5")]
13    pub source_field: ::core::option::Option<::prost::alloc::string::String>,
14    #[prost(message, optional, tag = "6")]
15    pub parameters: ::core::option::Option<RuleParameters>,
16    #[prost(message, optional, tag = "7")]
17    pub enabled: ::core::option::Option<bool>,
18    #[prost(message, optional, tag = "8")]
19    pub order: ::core::option::Option<u32>,
20}
21#[derive(serde::Serialize, serde::Deserialize)]
22#[serde(rename_all = "snake_case")]
23#[derive(Clone, PartialEq, ::prost::Message)]
24pub struct RuleParameters {
25    #[prost(
26        oneof = "rule_parameters::RuleParameters",
27        tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10"
28    )]
29    pub rule_parameters: ::core::option::Option<rule_parameters::RuleParameters>,
30}
31/// Nested message and enum types in `RuleParameters`.
32pub mod rule_parameters {
33    #[derive(serde::Serialize, serde::Deserialize)]
34    #[serde(rename_all = "snake_case")]
35    #[derive(Clone, PartialEq, ::prost::Oneof)]
36    pub enum RuleParameters {
37        #[prost(message, tag = "1")]
38        ExtractParameters(super::ExtractParameters),
39        #[prost(message, tag = "2")]
40        JsonExtractParameters(super::JsonExtractParameters),
41        #[prost(message, tag = "3")]
42        ReplaceParameters(super::ReplaceParameters),
43        #[prost(message, tag = "4")]
44        ParseParameters(super::ParseParameters),
45        #[prost(message, tag = "5")]
46        AllowParameters(super::AllowParameters),
47        #[prost(message, tag = "6")]
48        BlockParameters(super::BlockParameters),
49        #[prost(message, tag = "7")]
50        ExtractTimestampParameters(super::ExtractTimestampParameters),
51        #[prost(message, tag = "8")]
52        RemoveFieldsParameters(super::RemoveFieldsParameters),
53        #[prost(message, tag = "9")]
54        JsonStringifyParameters(super::JsonStringifyParameters),
55        #[prost(message, tag = "10")]
56        JsonParseParameters(super::JsonParseParameters),
57    }
58}
59#[derive(serde::Serialize, serde::Deserialize)]
60#[serde(rename_all = "snake_case")]
61#[derive(Clone, PartialEq, ::prost::Message)]
62pub struct ExtractParameters {
63    #[prost(message, optional, tag = "2")]
64    pub rule: ::core::option::Option<::prost::alloc::string::String>,
65}
66#[derive(serde::Serialize, serde::Deserialize)]
67#[serde(rename_all = "snake_case")]
68#[derive(Clone, PartialEq, ::prost::Message)]
69pub struct JsonExtractParameters {
70    #[prost(enumeration = "json_extract_parameters::DestinationField", tag = "1")]
71    pub destination_field_type: i32,
72    #[prost(message, optional, tag = "2")]
73    pub rule: ::core::option::Option<::prost::alloc::string::String>,
74    #[prost(message, optional, tag = "3")]
75    pub destination_field_text: ::core::option::Option<::prost::alloc::string::String>,
76}
77/// Nested message and enum types in `JsonExtractParameters`.
78pub mod json_extract_parameters {
79    #[derive(serde::Serialize, serde::Deserialize)]
80    #[serde(rename_all = "snake_case")]
81    #[derive(
82        Clone,
83        Copy,
84        Debug,
85        PartialEq,
86        Eq,
87        Hash,
88        PartialOrd,
89        Ord,
90        ::prost::Enumeration
91    )]
92    #[repr(i32)]
93    pub enum DestinationField {
94        CategoryOrUnspecified = 0,
95        Classname = 1,
96        Methodname = 2,
97        Threadid = 3,
98        Severity = 4,
99        Text = 5,
100    }
101    impl DestinationField {
102        /// String value of the enum field names used in the ProtoBuf definition.
103        ///
104        /// The values are not transformed in any way and thus are considered stable
105        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
106        pub fn as_str_name(&self) -> &'static str {
107            match self {
108                Self::CategoryOrUnspecified => {
109                    "DESTINATION_FIELD_CATEGORY_OR_UNSPECIFIED"
110                }
111                Self::Classname => "DESTINATION_FIELD_CLASSNAME",
112                Self::Methodname => "DESTINATION_FIELD_METHODNAME",
113                Self::Threadid => "DESTINATION_FIELD_THREADID",
114                Self::Severity => "DESTINATION_FIELD_SEVERITY",
115                Self::Text => "DESTINATION_FIELD_TEXT",
116            }
117        }
118        /// Creates an enum from field names used in the ProtoBuf definition.
119        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
120            match value {
121                "DESTINATION_FIELD_CATEGORY_OR_UNSPECIFIED" => {
122                    Some(Self::CategoryOrUnspecified)
123                }
124                "DESTINATION_FIELD_CLASSNAME" => Some(Self::Classname),
125                "DESTINATION_FIELD_METHODNAME" => Some(Self::Methodname),
126                "DESTINATION_FIELD_THREADID" => Some(Self::Threadid),
127                "DESTINATION_FIELD_SEVERITY" => Some(Self::Severity),
128                "DESTINATION_FIELD_TEXT" => Some(Self::Text),
129                _ => None,
130            }
131        }
132    }
133}
134#[derive(serde::Serialize, serde::Deserialize)]
135#[serde(rename_all = "snake_case")]
136#[derive(Clone, PartialEq, ::prost::Message)]
137pub struct ReplaceParameters {
138    #[prost(message, optional, tag = "1")]
139    pub destination_field: ::core::option::Option<::prost::alloc::string::String>,
140    #[prost(message, optional, tag = "2")]
141    pub replace_new_val: ::core::option::Option<::prost::alloc::string::String>,
142    #[prost(message, optional, tag = "3")]
143    pub rule: ::core::option::Option<::prost::alloc::string::String>,
144}
145#[derive(serde::Serialize, serde::Deserialize)]
146#[serde(rename_all = "snake_case")]
147#[derive(Clone, PartialEq, ::prost::Message)]
148pub struct ParseParameters {
149    #[prost(message, optional, tag = "1")]
150    pub destination_field: ::core::option::Option<::prost::alloc::string::String>,
151    #[prost(message, optional, tag = "2")]
152    pub rule: ::core::option::Option<::prost::alloc::string::String>,
153}
154#[derive(serde::Serialize, serde::Deserialize)]
155#[serde(rename_all = "snake_case")]
156#[derive(Clone, PartialEq, ::prost::Message)]
157pub struct AllowParameters {
158    #[prost(message, optional, tag = "1")]
159    pub keep_blocked_logs: ::core::option::Option<bool>,
160    #[prost(message, optional, tag = "2")]
161    pub rule: ::core::option::Option<::prost::alloc::string::String>,
162}
163#[derive(serde::Serialize, serde::Deserialize)]
164#[serde(rename_all = "snake_case")]
165#[derive(Clone, PartialEq, ::prost::Message)]
166pub struct BlockParameters {
167    #[prost(message, optional, tag = "1")]
168    pub keep_blocked_logs: ::core::option::Option<bool>,
169    #[prost(message, optional, tag = "2")]
170    pub rule: ::core::option::Option<::prost::alloc::string::String>,
171}
172#[derive(serde::Serialize, serde::Deserialize)]
173#[serde(rename_all = "snake_case")]
174#[derive(Clone, PartialEq, ::prost::Message)]
175pub struct ExtractTimestampParameters {
176    #[prost(enumeration = "extract_timestamp_parameters::FormatStandard", tag = "1")]
177    pub standard: i32,
178    #[prost(message, optional, tag = "2")]
179    pub format: ::core::option::Option<::prost::alloc::string::String>,
180}
181/// Nested message and enum types in `ExtractTimestampParameters`.
182pub mod extract_timestamp_parameters {
183    #[derive(serde::Serialize, serde::Deserialize)]
184    #[serde(rename_all = "snake_case")]
185    #[derive(
186        Clone,
187        Copy,
188        Debug,
189        PartialEq,
190        Eq,
191        Hash,
192        PartialOrd,
193        Ord,
194        ::prost::Enumeration
195    )]
196    #[repr(i32)]
197    pub enum FormatStandard {
198        StrftimeOrUnspecified = 0,
199        Javasdf = 1,
200        Golang = 2,
201        Secondsts = 3,
202        Millits = 4,
203        Microts = 5,
204        Nanots = 6,
205    }
206    impl FormatStandard {
207        /// String value of the enum field names used in the ProtoBuf definition.
208        ///
209        /// The values are not transformed in any way and thus are considered stable
210        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
211        pub fn as_str_name(&self) -> &'static str {
212            match self {
213                Self::StrftimeOrUnspecified => "FORMAT_STANDARD_STRFTIME_OR_UNSPECIFIED",
214                Self::Javasdf => "FORMAT_STANDARD_JAVASDF",
215                Self::Golang => "FORMAT_STANDARD_GOLANG",
216                Self::Secondsts => "FORMAT_STANDARD_SECONDSTS",
217                Self::Millits => "FORMAT_STANDARD_MILLITS",
218                Self::Microts => "FORMAT_STANDARD_MICROTS",
219                Self::Nanots => "FORMAT_STANDARD_NANOTS",
220            }
221        }
222        /// Creates an enum from field names used in the ProtoBuf definition.
223        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
224            match value {
225                "FORMAT_STANDARD_STRFTIME_OR_UNSPECIFIED" => {
226                    Some(Self::StrftimeOrUnspecified)
227                }
228                "FORMAT_STANDARD_JAVASDF" => Some(Self::Javasdf),
229                "FORMAT_STANDARD_GOLANG" => Some(Self::Golang),
230                "FORMAT_STANDARD_SECONDSTS" => Some(Self::Secondsts),
231                "FORMAT_STANDARD_MILLITS" => Some(Self::Millits),
232                "FORMAT_STANDARD_MICROTS" => Some(Self::Microts),
233                "FORMAT_STANDARD_NANOTS" => Some(Self::Nanots),
234                _ => None,
235            }
236        }
237    }
238}
239#[derive(serde::Serialize, serde::Deserialize)]
240#[serde(rename_all = "snake_case")]
241#[derive(Clone, PartialEq, ::prost::Message)]
242pub struct RemoveFieldsParameters {
243    #[prost(string, repeated, tag = "1")]
244    pub fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
245}
246#[derive(serde::Serialize, serde::Deserialize)]
247#[serde(rename_all = "snake_case")]
248#[derive(Clone, PartialEq, ::prost::Message)]
249pub struct JsonStringifyParameters {
250    #[prost(message, optional, tag = "1")]
251    pub destination_field: ::core::option::Option<::prost::alloc::string::String>,
252    #[prost(message, optional, tag = "2")]
253    pub delete_source: ::core::option::Option<bool>,
254}
255#[derive(serde::Serialize, serde::Deserialize)]
256#[serde(rename_all = "snake_case")]
257#[derive(Clone, PartialEq, ::prost::Message)]
258pub struct JsonParseParameters {
259    #[prost(message, optional, tag = "1")]
260    pub destination_field: ::core::option::Option<::prost::alloc::string::String>,
261    #[prost(message, optional, tag = "2")]
262    pub delete_source: ::core::option::Option<bool>,
263    #[prost(message, optional, tag = "3")]
264    pub escaped_value: ::core::option::Option<bool>,
265    #[prost(message, optional, tag = "4")]
266    pub override_dest: ::core::option::Option<bool>,
267}
268#[derive(serde::Serialize, serde::Deserialize)]
269#[serde(rename_all = "snake_case")]
270#[derive(Clone, PartialEq, ::prost::Message)]
271pub struct RuleMatcher {
272    #[prost(oneof = "rule_matcher::Constraint", tags = "1, 2, 9")]
273    pub constraint: ::core::option::Option<rule_matcher::Constraint>,
274}
275/// Nested message and enum types in `RuleMatcher`.
276pub mod rule_matcher {
277    #[derive(serde::Serialize, serde::Deserialize)]
278    #[serde(rename_all = "snake_case")]
279    #[derive(Clone, PartialEq, ::prost::Oneof)]
280    pub enum Constraint {
281        #[prost(message, tag = "1")]
282        ApplicationName(super::ApplicationNameConstraint),
283        #[prost(message, tag = "2")]
284        SubsystemName(super::SubsystemNameConstraint),
285        #[prost(message, tag = "9")]
286        Severity(super::SeverityConstraint),
287    }
288}
289#[derive(serde::Serialize, serde::Deserialize)]
290#[serde(rename_all = "snake_case")]
291#[derive(Clone, PartialEq, ::prost::Message)]
292pub struct ApplicationNameConstraint {
293    #[prost(message, optional, tag = "1")]
294    pub value: ::core::option::Option<::prost::alloc::string::String>,
295}
296#[derive(serde::Serialize, serde::Deserialize)]
297#[serde(rename_all = "snake_case")]
298#[derive(Clone, PartialEq, ::prost::Message)]
299pub struct SubsystemNameConstraint {
300    #[prost(message, optional, tag = "1")]
301    pub value: ::core::option::Option<::prost::alloc::string::String>,
302}
303#[derive(serde::Serialize, serde::Deserialize)]
304#[serde(rename_all = "snake_case")]
305#[derive(Clone, Copy, PartialEq, ::prost::Message)]
306pub struct SeverityConstraint {
307    #[prost(enumeration = "severity_constraint::Value", tag = "1")]
308    pub value: i32,
309}
310/// Nested message and enum types in `SeverityConstraint`.
311pub mod severity_constraint {
312    #[derive(serde::Serialize, serde::Deserialize)]
313    #[serde(rename_all = "snake_case")]
314    #[derive(
315        Clone,
316        Copy,
317        Debug,
318        PartialEq,
319        Eq,
320        Hash,
321        PartialOrd,
322        Ord,
323        ::prost::Enumeration
324    )]
325    #[repr(i32)]
326    pub enum Value {
327        DebugOrUnspecified = 0,
328        Verbose = 1,
329        Info = 2,
330        Warning = 3,
331        Error = 4,
332        Critical = 5,
333    }
334    impl Value {
335        /// String value of the enum field names used in the ProtoBuf definition.
336        ///
337        /// The values are not transformed in any way and thus are considered stable
338        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
339        pub fn as_str_name(&self) -> &'static str {
340            match self {
341                Self::DebugOrUnspecified => "VALUE_DEBUG_OR_UNSPECIFIED",
342                Self::Verbose => "VALUE_VERBOSE",
343                Self::Info => "VALUE_INFO",
344                Self::Warning => "VALUE_WARNING",
345                Self::Error => "VALUE_ERROR",
346                Self::Critical => "VALUE_CRITICAL",
347            }
348        }
349        /// Creates an enum from field names used in the ProtoBuf definition.
350        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
351            match value {
352                "VALUE_DEBUG_OR_UNSPECIFIED" => Some(Self::DebugOrUnspecified),
353                "VALUE_VERBOSE" => Some(Self::Verbose),
354                "VALUE_INFO" => Some(Self::Info),
355                "VALUE_WARNING" => Some(Self::Warning),
356                "VALUE_ERROR" => Some(Self::Error),
357                "VALUE_CRITICAL" => Some(Self::Critical),
358                _ => None,
359            }
360        }
361    }
362}
363#[derive(serde::Serialize, serde::Deserialize)]
364#[serde(rename_all = "snake_case")]
365#[derive(Clone, PartialEq, ::prost::Message)]
366pub struct RuleSubgroup {
367    #[prost(message, optional, tag = "1")]
368    pub id: ::core::option::Option<::prost::alloc::string::String>,
369    #[prost(message, repeated, tag = "2")]
370    pub rules: ::prost::alloc::vec::Vec<Rule>,
371    #[prost(message, optional, tag = "3")]
372    pub enabled: ::core::option::Option<bool>,
373    #[prost(message, optional, tag = "4")]
374    pub order: ::core::option::Option<u32>,
375}
376#[derive(serde::Serialize, serde::Deserialize)]
377#[serde(rename_all = "snake_case")]
378#[derive(Clone, PartialEq, ::prost::Message)]
379pub struct RuleGroup {
380    #[prost(message, optional, tag = "1")]
381    pub id: ::core::option::Option<::prost::alloc::string::String>,
382    #[prost(message, optional, tag = "2")]
383    pub name: ::core::option::Option<::prost::alloc::string::String>,
384    #[prost(message, optional, tag = "3")]
385    pub description: ::core::option::Option<::prost::alloc::string::String>,
386    #[prost(message, optional, tag = "6")]
387    pub creator: ::core::option::Option<::prost::alloc::string::String>,
388    #[prost(message, optional, tag = "7")]
389    pub enabled: ::core::option::Option<bool>,
390    #[prost(message, optional, tag = "8")]
391    pub hidden: ::core::option::Option<bool>,
392    #[prost(message, repeated, tag = "9")]
393    pub rule_matchers: ::prost::alloc::vec::Vec<RuleMatcher>,
394    #[prost(message, repeated, tag = "10")]
395    pub rule_subgroups: ::prost::alloc::vec::Vec<RuleSubgroup>,
396    #[prost(message, optional, tag = "11")]
397    pub order: ::core::option::Option<u32>,
398}
399#[derive(serde::Serialize, serde::Deserialize)]
400#[serde(rename_all = "snake_case")]
401#[derive(Clone, Copy, PartialEq, ::prost::Message)]
402pub struct TeamId {
403    #[prost(uint32, tag = "1")]
404    pub id: u32,
405}
406#[derive(serde::Serialize, serde::Deserialize)]
407#[serde(rename_all = "snake_case")]
408#[derive(Clone, PartialEq, ::prost::Message)]
409pub struct GetRuleGroupRequest {
410    #[prost(string, tag = "1")]
411    pub group_id: ::prost::alloc::string::String,
412}
413#[derive(serde::Serialize, serde::Deserialize)]
414#[serde(rename_all = "snake_case")]
415#[derive(Clone, Copy, PartialEq, ::prost::Message)]
416pub struct ListRuleGroupsRequest {}
417#[derive(serde::Serialize, serde::Deserialize)]
418#[serde(rename_all = "snake_case")]
419#[derive(Clone, PartialEq, ::prost::Message)]
420pub struct ListRuleGroupsResponse {
421    #[prost(message, repeated, tag = "1")]
422    pub rule_groups: ::prost::alloc::vec::Vec<RuleGroup>,
423}
424#[derive(serde::Serialize, serde::Deserialize)]
425#[serde(rename_all = "snake_case")]
426#[derive(Clone, PartialEq, ::prost::Message)]
427pub struct GetRuleGroupResponse {
428    #[prost(message, optional, tag = "1")]
429    pub rule_group: ::core::option::Option<RuleGroup>,
430}
431#[derive(serde::Serialize, serde::Deserialize)]
432#[serde(rename_all = "snake_case")]
433#[derive(Clone, PartialEq, ::prost::Message)]
434pub struct CreateRuleGroupRequest {
435    #[prost(message, optional, tag = "1")]
436    pub name: ::core::option::Option<::prost::alloc::string::String>,
437    #[prost(message, optional, tag = "2")]
438    pub description: ::core::option::Option<::prost::alloc::string::String>,
439    #[prost(message, optional, tag = "3")]
440    pub enabled: ::core::option::Option<bool>,
441    #[prost(message, optional, tag = "4")]
442    pub hidden: ::core::option::Option<bool>,
443    #[prost(message, optional, tag = "5")]
444    pub creator: ::core::option::Option<::prost::alloc::string::String>,
445    #[prost(message, repeated, tag = "6")]
446    pub rule_matchers: ::prost::alloc::vec::Vec<RuleMatcher>,
447    #[prost(message, repeated, tag = "7")]
448    pub rule_subgroups: ::prost::alloc::vec::Vec<
449        create_rule_group_request::CreateRuleSubgroup,
450    >,
451    #[prost(message, optional, tag = "8")]
452    pub order: ::core::option::Option<u32>,
453    #[prost(message, optional, tag = "9")]
454    pub team_id: ::core::option::Option<TeamId>,
455}
456/// Nested message and enum types in `CreateRuleGroupRequest`.
457pub mod create_rule_group_request {
458    #[derive(serde::Serialize, serde::Deserialize)]
459    #[serde(rename_all = "snake_case")]
460    #[derive(Clone, PartialEq, ::prost::Message)]
461    pub struct CreateRuleSubgroup {
462        #[prost(message, repeated, tag = "1")]
463        pub rules: ::prost::alloc::vec::Vec<create_rule_subgroup::CreateRule>,
464        #[prost(message, optional, tag = "2")]
465        pub enabled: ::core::option::Option<bool>,
466        #[prost(message, optional, tag = "3")]
467        pub order: ::core::option::Option<u32>,
468    }
469    /// Nested message and enum types in `CreateRuleSubgroup`.
470    pub mod create_rule_subgroup {
471        #[derive(serde::Serialize, serde::Deserialize)]
472        #[serde(rename_all = "snake_case")]
473        #[derive(Clone, PartialEq, ::prost::Message)]
474        pub struct CreateRule {
475            #[prost(message, optional, tag = "1")]
476            pub name: ::core::option::Option<::prost::alloc::string::String>,
477            #[prost(message, optional, tag = "3")]
478            pub description: ::core::option::Option<::prost::alloc::string::String>,
479            #[prost(message, optional, tag = "4")]
480            pub source_field: ::core::option::Option<::prost::alloc::string::String>,
481            #[prost(message, optional, tag = "5")]
482            pub parameters: ::core::option::Option<super::super::RuleParameters>,
483            #[prost(message, optional, tag = "6")]
484            pub enabled: ::core::option::Option<bool>,
485            #[prost(message, optional, tag = "7")]
486            pub order: ::core::option::Option<u32>,
487        }
488    }
489}
490#[derive(serde::Serialize, serde::Deserialize)]
491#[serde(rename_all = "snake_case")]
492#[derive(Clone, PartialEq, ::prost::Message)]
493pub struct CreateRuleGroupResponse {
494    #[prost(message, optional, tag = "1")]
495    pub rule_group: ::core::option::Option<RuleGroup>,
496}
497#[derive(serde::Serialize, serde::Deserialize)]
498#[serde(rename_all = "snake_case")]
499#[derive(Clone, PartialEq, ::prost::Message)]
500pub struct UpdateRuleGroupRequest {
501    #[prost(message, optional, tag = "1")]
502    pub group_id: ::core::option::Option<::prost::alloc::string::String>,
503    #[prost(message, optional, tag = "2")]
504    pub rule_group: ::core::option::Option<CreateRuleGroupRequest>,
505}
506#[derive(serde::Serialize, serde::Deserialize)]
507#[serde(rename_all = "snake_case")]
508#[derive(Clone, PartialEq, ::prost::Message)]
509pub struct UpdateRuleGroupResponse {
510    #[prost(message, optional, tag = "1")]
511    pub rule_group: ::core::option::Option<RuleGroup>,
512}
513#[derive(serde::Serialize, serde::Deserialize)]
514#[serde(rename_all = "snake_case")]
515#[derive(Clone, PartialEq, ::prost::Message)]
516pub struct DeleteRuleGroupRequest {
517    #[prost(string, tag = "1")]
518    pub group_id: ::prost::alloc::string::String,
519}
520#[derive(serde::Serialize, serde::Deserialize)]
521#[serde(rename_all = "snake_case")]
522#[derive(Clone, PartialEq, ::prost::Message)]
523pub struct BulkDeleteRuleGroupRequest {
524    #[prost(string, repeated, tag = "1")]
525    pub group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
526}
527#[derive(serde::Serialize, serde::Deserialize)]
528#[serde(rename_all = "snake_case")]
529#[derive(Clone, Copy, PartialEq, ::prost::Message)]
530pub struct DeleteRuleGroupResponse {}
531#[derive(serde::Serialize, serde::Deserialize)]
532#[serde(rename_all = "snake_case")]
533#[derive(Clone, Copy, PartialEq, ::prost::Message)]
534pub struct BulkDeleteRuleGroupResponse {}
535#[derive(serde::Serialize, serde::Deserialize)]
536#[serde(rename_all = "snake_case")]
537#[derive(Clone, PartialEq, ::prost::Message)]
538pub struct GetRuleGroupModelMappingRequest {
539    #[prost(message, optional, tag = "1")]
540    pub name: ::core::option::Option<::prost::alloc::string::String>,
541    #[prost(message, optional, tag = "2")]
542    pub description: ::core::option::Option<::prost::alloc::string::String>,
543    #[prost(message, optional, tag = "3")]
544    pub enabled: ::core::option::Option<bool>,
545    #[prost(message, optional, tag = "4")]
546    pub hidden: ::core::option::Option<bool>,
547    #[prost(message, optional, tag = "5")]
548    pub creator: ::core::option::Option<::prost::alloc::string::String>,
549    #[prost(message, repeated, tag = "6")]
550    pub rule_matchers: ::prost::alloc::vec::Vec<RuleMatcher>,
551    #[prost(message, repeated, tag = "7")]
552    pub rule_subgroups: ::prost::alloc::vec::Vec<
553        get_rule_group_model_mapping_request::CreateRuleSubgroup,
554    >,
555    #[prost(message, optional, tag = "8")]
556    pub order: ::core::option::Option<u32>,
557}
558/// Nested message and enum types in `GetRuleGroupModelMappingRequest`.
559pub mod get_rule_group_model_mapping_request {
560    #[derive(serde::Serialize, serde::Deserialize)]
561    #[serde(rename_all = "snake_case")]
562    #[derive(Clone, PartialEq, ::prost::Message)]
563    pub struct CreateRuleSubgroup {
564        #[prost(message, repeated, tag = "1")]
565        pub rules: ::prost::alloc::vec::Vec<create_rule_subgroup::CreateRule>,
566        #[prost(message, optional, tag = "2")]
567        pub enabled: ::core::option::Option<bool>,
568        #[prost(message, optional, tag = "3")]
569        pub order: ::core::option::Option<u32>,
570    }
571    /// Nested message and enum types in `CreateRuleSubgroup`.
572    pub mod create_rule_subgroup {
573        #[derive(serde::Serialize, serde::Deserialize)]
574        #[serde(rename_all = "snake_case")]
575        #[derive(Clone, PartialEq, ::prost::Message)]
576        pub struct CreateRule {
577            #[prost(message, optional, tag = "1")]
578            pub name: ::core::option::Option<::prost::alloc::string::String>,
579            #[prost(message, optional, tag = "3")]
580            pub description: ::core::option::Option<::prost::alloc::string::String>,
581            #[prost(message, optional, tag = "4")]
582            pub source_field: ::core::option::Option<::prost::alloc::string::String>,
583            #[prost(message, optional, tag = "5")]
584            pub parameters: ::core::option::Option<super::super::RuleParameters>,
585            #[prost(message, optional, tag = "6")]
586            pub enabled: ::core::option::Option<bool>,
587            #[prost(message, optional, tag = "7")]
588            pub order: ::core::option::Option<u32>,
589        }
590    }
591}
592#[derive(serde::Serialize, serde::Deserialize)]
593#[serde(rename_all = "snake_case")]
594#[derive(Clone, PartialEq, ::prost::Message)]
595pub struct GetRuleGroupModelMappingResponse {
596    #[prost(message, optional, tag = "1")]
597    pub rule_definition: ::core::option::Option<::prost_wkt_types::Struct>,
598}
599#[derive(serde::Serialize, serde::Deserialize)]
600#[serde(rename_all = "snake_case")]
601#[derive(Clone, Copy, PartialEq, ::prost::Message)]
602pub struct GetCompanyUsageLimitsRequest {}
603#[derive(serde::Serialize, serde::Deserialize)]
604#[serde(rename_all = "snake_case")]
605#[derive(Clone, PartialEq, ::prost::Message)]
606pub struct GetCompanyUsageLimitsResponse {
607    #[prost(message, optional, tag = "1")]
608    pub company_id: ::core::option::Option<::prost::alloc::string::String>,
609    #[prost(message, optional, tag = "2")]
610    pub limits: ::core::option::Option<get_company_usage_limits_response::Counts>,
611    #[prost(message, optional, tag = "3")]
612    pub usage: ::core::option::Option<get_company_usage_limits_response::Counts>,
613}
614/// Nested message and enum types in `GetCompanyUsageLimitsResponse`.
615pub mod get_company_usage_limits_response {
616    #[derive(serde::Serialize, serde::Deserialize)]
617    #[serde(rename_all = "snake_case")]
618    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
619    pub struct Counts {
620        #[prost(message, optional, tag = "1")]
621        pub parsing_themes: ::core::option::Option<i32>,
622        #[prost(message, optional, tag = "2")]
623        pub groups: ::core::option::Option<i32>,
624        #[prost(message, optional, tag = "3")]
625        pub rules: ::core::option::Option<i32>,
626    }
627}
628/// Generated client implementations.
629pub mod rule_groups_service_client {
630    #![allow(
631        unused_variables,
632        dead_code,
633        missing_docs,
634        clippy::wildcard_imports,
635        clippy::let_unit_value,
636    )]
637    use tonic::codegen::*;
638    use tonic::codegen::http::Uri;
639    #[derive(Debug, Clone)]
640    pub struct RuleGroupsServiceClient<T> {
641        inner: tonic::client::Grpc<T>,
642    }
643    impl RuleGroupsServiceClient<tonic::transport::Channel> {
644        /// Attempt to create a new client by connecting to a given endpoint.
645        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
646        where
647            D: TryInto<tonic::transport::Endpoint>,
648            D::Error: Into<StdError>,
649        {
650            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
651            Ok(Self::new(conn))
652        }
653    }
654    impl<T> RuleGroupsServiceClient<T>
655    where
656        T: tonic::client::GrpcService<tonic::body::BoxBody>,
657        T::Error: Into<StdError>,
658        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
659        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
660    {
661        pub fn new(inner: T) -> Self {
662            let inner = tonic::client::Grpc::new(inner);
663            Self { inner }
664        }
665        pub fn with_origin(inner: T, origin: Uri) -> Self {
666            let inner = tonic::client::Grpc::with_origin(inner, origin);
667            Self { inner }
668        }
669        pub fn with_interceptor<F>(
670            inner: T,
671            interceptor: F,
672        ) -> RuleGroupsServiceClient<InterceptedService<T, F>>
673        where
674            F: tonic::service::Interceptor,
675            T::ResponseBody: Default,
676            T: tonic::codegen::Service<
677                http::Request<tonic::body::BoxBody>,
678                Response = http::Response<
679                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
680                >,
681            >,
682            <T as tonic::codegen::Service<
683                http::Request<tonic::body::BoxBody>,
684            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
685        {
686            RuleGroupsServiceClient::new(InterceptedService::new(inner, interceptor))
687        }
688        /// Compress requests with the given encoding.
689        ///
690        /// This requires the server to support it otherwise it might respond with an
691        /// error.
692        #[must_use]
693        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
694            self.inner = self.inner.send_compressed(encoding);
695            self
696        }
697        /// Enable decompressing responses.
698        #[must_use]
699        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
700            self.inner = self.inner.accept_compressed(encoding);
701            self
702        }
703        /// Limits the maximum size of a decoded message.
704        ///
705        /// Default: `4MB`
706        #[must_use]
707        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
708            self.inner = self.inner.max_decoding_message_size(limit);
709            self
710        }
711        /// Limits the maximum size of an encoded message.
712        ///
713        /// Default: `usize::MAX`
714        #[must_use]
715        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
716            self.inner = self.inner.max_encoding_message_size(limit);
717            self
718        }
719        pub async fn get_rule_group(
720            &mut self,
721            request: impl tonic::IntoRequest<super::GetRuleGroupRequest>,
722        ) -> std::result::Result<
723            tonic::Response<super::GetRuleGroupResponse>,
724            tonic::Status,
725        > {
726            self.inner
727                .ready()
728                .await
729                .map_err(|e| {
730                    tonic::Status::unknown(
731                        format!("Service was not ready: {}", e.into()),
732                    )
733                })?;
734            let codec = tonic::codec::ProstCodec::default();
735            let path = http::uri::PathAndQuery::from_static(
736                "/com.coralogix.rules.v1.RuleGroupsService/GetRuleGroup",
737            );
738            let mut req = request.into_request();
739            req.extensions_mut()
740                .insert(
741                    GrpcMethod::new(
742                        "com.coralogix.rules.v1.RuleGroupsService",
743                        "GetRuleGroup",
744                    ),
745                );
746            self.inner.unary(req, path, codec).await
747        }
748        pub async fn list_rule_groups(
749            &mut self,
750            request: impl tonic::IntoRequest<super::ListRuleGroupsRequest>,
751        ) -> std::result::Result<
752            tonic::Response<super::ListRuleGroupsResponse>,
753            tonic::Status,
754        > {
755            self.inner
756                .ready()
757                .await
758                .map_err(|e| {
759                    tonic::Status::unknown(
760                        format!("Service was not ready: {}", e.into()),
761                    )
762                })?;
763            let codec = tonic::codec::ProstCodec::default();
764            let path = http::uri::PathAndQuery::from_static(
765                "/com.coralogix.rules.v1.RuleGroupsService/ListRuleGroups",
766            );
767            let mut req = request.into_request();
768            req.extensions_mut()
769                .insert(
770                    GrpcMethod::new(
771                        "com.coralogix.rules.v1.RuleGroupsService",
772                        "ListRuleGroups",
773                    ),
774                );
775            self.inner.unary(req, path, codec).await
776        }
777        pub async fn create_rule_group(
778            &mut self,
779            request: impl tonic::IntoRequest<super::CreateRuleGroupRequest>,
780        ) -> std::result::Result<
781            tonic::Response<super::CreateRuleGroupResponse>,
782            tonic::Status,
783        > {
784            self.inner
785                .ready()
786                .await
787                .map_err(|e| {
788                    tonic::Status::unknown(
789                        format!("Service was not ready: {}", e.into()),
790                    )
791                })?;
792            let codec = tonic::codec::ProstCodec::default();
793            let path = http::uri::PathAndQuery::from_static(
794                "/com.coralogix.rules.v1.RuleGroupsService/CreateRuleGroup",
795            );
796            let mut req = request.into_request();
797            req.extensions_mut()
798                .insert(
799                    GrpcMethod::new(
800                        "com.coralogix.rules.v1.RuleGroupsService",
801                        "CreateRuleGroup",
802                    ),
803                );
804            self.inner.unary(req, path, codec).await
805        }
806        pub async fn update_rule_group(
807            &mut self,
808            request: impl tonic::IntoRequest<super::UpdateRuleGroupRequest>,
809        ) -> std::result::Result<
810            tonic::Response<super::UpdateRuleGroupResponse>,
811            tonic::Status,
812        > {
813            self.inner
814                .ready()
815                .await
816                .map_err(|e| {
817                    tonic::Status::unknown(
818                        format!("Service was not ready: {}", e.into()),
819                    )
820                })?;
821            let codec = tonic::codec::ProstCodec::default();
822            let path = http::uri::PathAndQuery::from_static(
823                "/com.coralogix.rules.v1.RuleGroupsService/UpdateRuleGroup",
824            );
825            let mut req = request.into_request();
826            req.extensions_mut()
827                .insert(
828                    GrpcMethod::new(
829                        "com.coralogix.rules.v1.RuleGroupsService",
830                        "UpdateRuleGroup",
831                    ),
832                );
833            self.inner.unary(req, path, codec).await
834        }
835        pub async fn delete_rule_group(
836            &mut self,
837            request: impl tonic::IntoRequest<super::DeleteRuleGroupRequest>,
838        ) -> std::result::Result<
839            tonic::Response<super::DeleteRuleGroupResponse>,
840            tonic::Status,
841        > {
842            self.inner
843                .ready()
844                .await
845                .map_err(|e| {
846                    tonic::Status::unknown(
847                        format!("Service was not ready: {}", e.into()),
848                    )
849                })?;
850            let codec = tonic::codec::ProstCodec::default();
851            let path = http::uri::PathAndQuery::from_static(
852                "/com.coralogix.rules.v1.RuleGroupsService/DeleteRuleGroup",
853            );
854            let mut req = request.into_request();
855            req.extensions_mut()
856                .insert(
857                    GrpcMethod::new(
858                        "com.coralogix.rules.v1.RuleGroupsService",
859                        "DeleteRuleGroup",
860                    ),
861                );
862            self.inner.unary(req, path, codec).await
863        }
864        pub async fn bulk_delete_rule_group(
865            &mut self,
866            request: impl tonic::IntoRequest<super::BulkDeleteRuleGroupRequest>,
867        ) -> std::result::Result<
868            tonic::Response<super::BulkDeleteRuleGroupResponse>,
869            tonic::Status,
870        > {
871            self.inner
872                .ready()
873                .await
874                .map_err(|e| {
875                    tonic::Status::unknown(
876                        format!("Service was not ready: {}", e.into()),
877                    )
878                })?;
879            let codec = tonic::codec::ProstCodec::default();
880            let path = http::uri::PathAndQuery::from_static(
881                "/com.coralogix.rules.v1.RuleGroupsService/BulkDeleteRuleGroup",
882            );
883            let mut req = request.into_request();
884            req.extensions_mut()
885                .insert(
886                    GrpcMethod::new(
887                        "com.coralogix.rules.v1.RuleGroupsService",
888                        "BulkDeleteRuleGroup",
889                    ),
890                );
891            self.inner.unary(req, path, codec).await
892        }
893        pub async fn get_rule_group_model_mapping(
894            &mut self,
895            request: impl tonic::IntoRequest<super::GetRuleGroupModelMappingRequest>,
896        ) -> std::result::Result<
897            tonic::Response<super::GetRuleGroupModelMappingResponse>,
898            tonic::Status,
899        > {
900            self.inner
901                .ready()
902                .await
903                .map_err(|e| {
904                    tonic::Status::unknown(
905                        format!("Service was not ready: {}", e.into()),
906                    )
907                })?;
908            let codec = tonic::codec::ProstCodec::default();
909            let path = http::uri::PathAndQuery::from_static(
910                "/com.coralogix.rules.v1.RuleGroupsService/GetRuleGroupModelMapping",
911            );
912            let mut req = request.into_request();
913            req.extensions_mut()
914                .insert(
915                    GrpcMethod::new(
916                        "com.coralogix.rules.v1.RuleGroupsService",
917                        "GetRuleGroupModelMapping",
918                    ),
919                );
920            self.inner.unary(req, path, codec).await
921        }
922        pub async fn get_company_usage_limits(
923            &mut self,
924            request: impl tonic::IntoRequest<super::GetCompanyUsageLimitsRequest>,
925        ) -> std::result::Result<
926            tonic::Response<super::GetCompanyUsageLimitsResponse>,
927            tonic::Status,
928        > {
929            self.inner
930                .ready()
931                .await
932                .map_err(|e| {
933                    tonic::Status::unknown(
934                        format!("Service was not ready: {}", e.into()),
935                    )
936                })?;
937            let codec = tonic::codec::ProstCodec::default();
938            let path = http::uri::PathAndQuery::from_static(
939                "/com.coralogix.rules.v1.RuleGroupsService/GetCompanyUsageLimits",
940            );
941            let mut req = request.into_request();
942            req.extensions_mut()
943                .insert(
944                    GrpcMethod::new(
945                        "com.coralogix.rules.v1.RuleGroupsService",
946                        "GetCompanyUsageLimits",
947                    ),
948                );
949            self.inner.unary(req, path, codec).await
950        }
951    }
952}