cx_api/generated/
com.coralogix.quota.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 GetPolicyRequest {
6    #[prost(message, optional, tag = "1")]
7    pub id: ::core::option::Option<::prost::alloc::string::String>,
8}
9#[derive(serde::Serialize, serde::Deserialize)]
10#[serde(rename_all = "snake_case")]
11#[derive(Clone, PartialEq, ::prost::Message)]
12pub struct ArchiveRetention {
13    #[prost(message, optional, tag = "1")]
14    pub id: ::core::option::Option<::prost::alloc::string::String>,
15}
16#[derive(serde::Serialize, serde::Deserialize)]
17#[serde(rename_all = "snake_case")]
18#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
19#[repr(i32)]
20pub enum Priority {
21    TypeUnspecified = 0,
22    TypeBlock = 1,
23    TypeLow = 2,
24    TypeMedium = 3,
25    TypeHigh = 4,
26}
27impl Priority {
28    /// String value of the enum field names used in the ProtoBuf definition.
29    ///
30    /// The values are not transformed in any way and thus are considered stable
31    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
32    pub fn as_str_name(&self) -> &'static str {
33        match self {
34            Self::TypeUnspecified => "PRIORITY_TYPE_UNSPECIFIED",
35            Self::TypeBlock => "PRIORITY_TYPE_BLOCK",
36            Self::TypeLow => "PRIORITY_TYPE_LOW",
37            Self::TypeMedium => "PRIORITY_TYPE_MEDIUM",
38            Self::TypeHigh => "PRIORITY_TYPE_HIGH",
39        }
40    }
41    /// Creates an enum from field names used in the ProtoBuf definition.
42    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
43        match value {
44            "PRIORITY_TYPE_UNSPECIFIED" => Some(Self::TypeUnspecified),
45            "PRIORITY_TYPE_BLOCK" => Some(Self::TypeBlock),
46            "PRIORITY_TYPE_LOW" => Some(Self::TypeLow),
47            "PRIORITY_TYPE_MEDIUM" => Some(Self::TypeMedium),
48            "PRIORITY_TYPE_HIGH" => Some(Self::TypeHigh),
49            _ => None,
50        }
51    }
52}
53#[derive(serde::Serialize, serde::Deserialize)]
54#[serde(rename_all = "snake_case")]
55#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
56#[repr(i32)]
57pub enum Severity {
58    Unspecified = 0,
59    Debug = 1,
60    Verbose = 2,
61    Info = 3,
62    Warning = 4,
63    Error = 5,
64    Critical = 6,
65}
66impl Severity {
67    /// String value of the enum field names used in the ProtoBuf definition.
68    ///
69    /// The values are not transformed in any way and thus are considered stable
70    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
71    pub fn as_str_name(&self) -> &'static str {
72        match self {
73            Self::Unspecified => "SEVERITY_UNSPECIFIED",
74            Self::Debug => "SEVERITY_DEBUG",
75            Self::Verbose => "SEVERITY_VERBOSE",
76            Self::Info => "SEVERITY_INFO",
77            Self::Warning => "SEVERITY_WARNING",
78            Self::Error => "SEVERITY_ERROR",
79            Self::Critical => "SEVERITY_CRITICAL",
80        }
81    }
82    /// Creates an enum from field names used in the ProtoBuf definition.
83    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
84        match value {
85            "SEVERITY_UNSPECIFIED" => Some(Self::Unspecified),
86            "SEVERITY_DEBUG" => Some(Self::Debug),
87            "SEVERITY_VERBOSE" => Some(Self::Verbose),
88            "SEVERITY_INFO" => Some(Self::Info),
89            "SEVERITY_WARNING" => Some(Self::Warning),
90            "SEVERITY_ERROR" => Some(Self::Error),
91            "SEVERITY_CRITICAL" => Some(Self::Critical),
92            _ => None,
93        }
94    }
95}
96#[derive(serde::Serialize, serde::Deserialize)]
97#[serde(rename_all = "snake_case")]
98#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
99#[repr(i32)]
100pub enum SourceType {
101    Unspecified = 0,
102    Logs = 1,
103    Spans = 2,
104}
105impl SourceType {
106    /// String value of the enum field names used in the ProtoBuf definition.
107    ///
108    /// The values are not transformed in any way and thus are considered stable
109    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
110    pub fn as_str_name(&self) -> &'static str {
111        match self {
112            Self::Unspecified => "SOURCE_TYPE_UNSPECIFIED",
113            Self::Logs => "SOURCE_TYPE_LOGS",
114            Self::Spans => "SOURCE_TYPE_SPANS",
115        }
116    }
117    /// Creates an enum from field names used in the ProtoBuf definition.
118    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
119        match value {
120            "SOURCE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
121            "SOURCE_TYPE_LOGS" => Some(Self::Logs),
122            "SOURCE_TYPE_SPANS" => Some(Self::Spans),
123            _ => None,
124        }
125    }
126}
127#[derive(serde::Serialize, serde::Deserialize)]
128#[serde(rename_all = "snake_case")]
129#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
130#[repr(i32)]
131pub enum RuleTypeId {
132    Unspecified = 0,
133    Is = 2,
134    IsNot = 3,
135    StartWith = 4,
136    Includes = 6,
137}
138impl RuleTypeId {
139    /// String value of the enum field names used in the ProtoBuf definition.
140    ///
141    /// The values are not transformed in any way and thus are considered stable
142    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
143    pub fn as_str_name(&self) -> &'static str {
144        match self {
145            Self::Unspecified => "RULE_TYPE_ID_UNSPECIFIED",
146            Self::Is => "RULE_TYPE_ID_IS",
147            Self::IsNot => "RULE_TYPE_ID_IS_NOT",
148            Self::StartWith => "RULE_TYPE_ID_START_WITH",
149            Self::Includes => "RULE_TYPE_ID_INCLUDES",
150        }
151    }
152    /// Creates an enum from field names used in the ProtoBuf definition.
153    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
154        match value {
155            "RULE_TYPE_ID_UNSPECIFIED" => Some(Self::Unspecified),
156            "RULE_TYPE_ID_IS" => Some(Self::Is),
157            "RULE_TYPE_ID_IS_NOT" => Some(Self::IsNot),
158            "RULE_TYPE_ID_START_WITH" => Some(Self::StartWith),
159            "RULE_TYPE_ID_INCLUDES" => Some(Self::Includes),
160            _ => None,
161        }
162    }
163}
164#[derive(serde::Serialize, serde::Deserialize)]
165#[serde(rename_all = "snake_case")]
166#[derive(Clone, PartialEq, ::prost::Message)]
167pub struct Rule {
168    #[prost(enumeration = "RuleTypeId", tag = "1")]
169    pub rule_type_id: i32,
170    #[prost(message, optional, tag = "2")]
171    pub name: ::core::option::Option<::prost::alloc::string::String>,
172}
173#[derive(serde::Serialize, serde::Deserialize)]
174#[serde(rename_all = "snake_case")]
175#[derive(Clone, PartialEq, ::prost::Message)]
176pub struct LogRules {
177    #[prost(enumeration = "Severity", repeated, tag = "1")]
178    pub severities: ::prost::alloc::vec::Vec<i32>,
179}
180#[derive(serde::Serialize, serde::Deserialize)]
181#[serde(rename_all = "snake_case")]
182#[derive(Clone, PartialEq, ::prost::Message)]
183pub struct TagRule {
184    #[prost(enumeration = "RuleTypeId", tag = "1")]
185    pub rule_type_id: i32,
186    #[prost(message, optional, tag = "2")]
187    pub tag_name: ::core::option::Option<::prost::alloc::string::String>,
188    #[prost(message, optional, tag = "3")]
189    pub tag_value: ::core::option::Option<::prost::alloc::string::String>,
190}
191#[derive(serde::Serialize, serde::Deserialize)]
192#[serde(rename_all = "snake_case")]
193#[derive(Clone, PartialEq, ::prost::Message)]
194pub struct SpanRules {
195    #[prost(message, optional, tag = "1")]
196    pub service_rule: ::core::option::Option<Rule>,
197    #[prost(message, optional, tag = "2")]
198    pub action_rule: ::core::option::Option<Rule>,
199    #[prost(message, repeated, tag = "3")]
200    pub tag_rules: ::prost::alloc::vec::Vec<TagRule>,
201}
202#[derive(serde::Serialize, serde::Deserialize)]
203#[serde(rename_all = "snake_case")]
204#[derive(Clone, PartialEq, ::prost::Message)]
205pub struct Policy {
206    #[prost(message, optional, tag = "1")]
207    pub id: ::core::option::Option<::prost::alloc::string::String>,
208    #[prost(message, optional, tag = "2")]
209    pub company_id: ::core::option::Option<i32>,
210    #[prost(message, optional, tag = "3")]
211    pub name: ::core::option::Option<::prost::alloc::string::String>,
212    #[prost(message, optional, tag = "4")]
213    pub description: ::core::option::Option<::prost::alloc::string::String>,
214    #[prost(enumeration = "Priority", tag = "5")]
215    pub priority: i32,
216    #[prost(message, optional, tag = "6")]
217    pub deleted: ::core::option::Option<bool>,
218    #[prost(message, optional, tag = "7")]
219    pub enabled: ::core::option::Option<bool>,
220    #[prost(message, optional, tag = "8")]
221    pub order: ::core::option::Option<i32>,
222    #[prost(message, optional, tag = "9")]
223    pub application_rule: ::core::option::Option<Rule>,
224    #[prost(message, optional, tag = "10")]
225    pub subsystem_rule: ::core::option::Option<Rule>,
226    #[prost(message, optional, tag = "13")]
227    pub created_at: ::core::option::Option<::prost::alloc::string::String>,
228    #[prost(message, optional, tag = "14")]
229    pub updated_at: ::core::option::Option<::prost::alloc::string::String>,
230    #[prost(message, optional, tag = "15")]
231    pub archive_retention: ::core::option::Option<ArchiveRetention>,
232    #[prost(oneof = "policy::SourceTypeRules", tags = "11, 12")]
233    pub source_type_rules: ::core::option::Option<policy::SourceTypeRules>,
234}
235/// Nested message and enum types in `Policy`.
236pub mod policy {
237    #[derive(serde::Serialize, serde::Deserialize)]
238    #[serde(rename_all = "snake_case")]
239    #[derive(Clone, PartialEq, ::prost::Oneof)]
240    pub enum SourceTypeRules {
241        #[prost(message, tag = "11")]
242        LogRules(super::LogRules),
243        #[prost(message, tag = "12")]
244        SpanRules(super::SpanRules),
245    }
246}
247#[derive(serde::Serialize, serde::Deserialize)]
248#[serde(rename_all = "snake_case")]
249#[derive(Clone, PartialEq, ::prost::Message)]
250pub struct GetPolicyResponse {
251    #[prost(message, optional, tag = "1")]
252    pub policy: ::core::option::Option<Policy>,
253}
254#[derive(serde::Serialize, serde::Deserialize)]
255#[serde(rename_all = "snake_case")]
256#[derive(Clone, Copy, PartialEq, ::prost::Message)]
257pub struct Placement {
258    #[prost(oneof = "placement::Kind", tags = "1, 2")]
259    pub kind: ::core::option::Option<placement::Kind>,
260}
261/// Nested message and enum types in `Placement`.
262pub mod placement {
263    #[derive(serde::Serialize, serde::Deserialize)]
264    #[serde(rename_all = "snake_case")]
265    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
266    pub enum Kind {
267        #[prost(message, tag = "1")]
268        First(super::First),
269        #[prost(message, tag = "2")]
270        Last(super::Last),
271    }
272}
273#[derive(serde::Serialize, serde::Deserialize)]
274#[serde(rename_all = "snake_case")]
275#[derive(Clone, Copy, PartialEq, ::prost::Message)]
276pub struct First {}
277#[derive(serde::Serialize, serde::Deserialize)]
278#[serde(rename_all = "snake_case")]
279#[derive(Clone, Copy, PartialEq, ::prost::Message)]
280pub struct Last {}
281#[derive(serde::Serialize, serde::Deserialize)]
282#[serde(rename_all = "snake_case")]
283#[derive(Clone, PartialEq, ::prost::Message)]
284pub struct CreatePolicyRequest {
285    #[prost(message, optional, tag = "1")]
286    pub name: ::core::option::Option<::prost::alloc::string::String>,
287    #[prost(message, optional, tag = "2")]
288    pub description: ::core::option::Option<::prost::alloc::string::String>,
289    #[prost(enumeration = "Priority", tag = "3")]
290    pub priority: i32,
291    #[prost(message, optional, tag = "4")]
292    pub application_rule: ::core::option::Option<Rule>,
293    #[prost(message, optional, tag = "5")]
294    pub subsystem_rule: ::core::option::Option<Rule>,
295    #[prost(message, optional, tag = "6")]
296    pub archive_retention: ::core::option::Option<ArchiveRetention>,
297    #[prost(bool, tag = "9")]
298    pub disabled: bool,
299    #[prost(message, optional, tag = "10")]
300    pub placement: ::core::option::Option<Placement>,
301    #[prost(oneof = "create_policy_request::SourceTypeRules", tags = "7, 8")]
302    pub source_type_rules: ::core::option::Option<
303        create_policy_request::SourceTypeRules,
304    >,
305}
306/// Nested message and enum types in `CreatePolicyRequest`.
307pub mod create_policy_request {
308    #[derive(serde::Serialize, serde::Deserialize)]
309    #[serde(rename_all = "snake_case")]
310    #[derive(Clone, PartialEq, ::prost::Oneof)]
311    pub enum SourceTypeRules {
312        #[prost(message, tag = "7")]
313        LogRules(super::LogRules),
314        #[prost(message, tag = "8")]
315        SpanRules(super::SpanRules),
316    }
317}
318#[derive(serde::Serialize, serde::Deserialize)]
319#[serde(rename_all = "snake_case")]
320#[derive(Clone, PartialEq, ::prost::Message)]
321pub struct CreatePolicyResponse {
322    #[prost(message, optional, tag = "1")]
323    pub policy: ::core::option::Option<Policy>,
324}
325#[derive(serde::Serialize, serde::Deserialize)]
326#[serde(rename_all = "snake_case")]
327#[derive(Clone, PartialEq, ::prost::Message)]
328pub struct UpdatePolicyRequest {
329    #[prost(message, optional, tag = "1")]
330    pub id: ::core::option::Option<::prost::alloc::string::String>,
331    #[prost(message, optional, tag = "2")]
332    pub name: ::core::option::Option<::prost::alloc::string::String>,
333    #[prost(message, optional, tag = "3")]
334    pub description: ::core::option::Option<::prost::alloc::string::String>,
335    #[prost(enumeration = "Priority", tag = "4")]
336    pub priority: i32,
337    #[prost(message, optional, tag = "5")]
338    pub application_rule: ::core::option::Option<Rule>,
339    #[prost(message, optional, tag = "6")]
340    pub subsystem_rule: ::core::option::Option<Rule>,
341    #[prost(message, optional, tag = "7")]
342    pub archive_retention: ::core::option::Option<ArchiveRetention>,
343    #[prost(message, optional, tag = "10")]
344    pub enabled: ::core::option::Option<bool>,
345    #[prost(oneof = "update_policy_request::SourceTypeRules", tags = "8, 9")]
346    pub source_type_rules: ::core::option::Option<
347        update_policy_request::SourceTypeRules,
348    >,
349}
350/// Nested message and enum types in `UpdatePolicyRequest`.
351pub mod update_policy_request {
352    #[derive(serde::Serialize, serde::Deserialize)]
353    #[serde(rename_all = "snake_case")]
354    #[derive(Clone, PartialEq, ::prost::Oneof)]
355    pub enum SourceTypeRules {
356        #[prost(message, tag = "8")]
357        LogRules(super::LogRules),
358        #[prost(message, tag = "9")]
359        SpanRules(super::SpanRules),
360    }
361}
362#[derive(serde::Serialize, serde::Deserialize)]
363#[serde(rename_all = "snake_case")]
364#[derive(Clone, PartialEq, ::prost::Message)]
365pub struct UpdatePolicyResponse {
366    #[prost(message, optional, tag = "1")]
367    pub policy: ::core::option::Option<Policy>,
368}
369#[derive(serde::Serialize, serde::Deserialize)]
370#[serde(rename_all = "snake_case")]
371#[derive(Clone, Copy, PartialEq, ::prost::Message)]
372pub struct GetCompanyPoliciesRequest {
373    #[prost(message, optional, tag = "1")]
374    pub enabled_only: ::core::option::Option<bool>,
375    #[prost(enumeration = "SourceType", optional, tag = "2")]
376    pub source_type: ::core::option::Option<i32>,
377}
378#[derive(serde::Serialize, serde::Deserialize)]
379#[serde(rename_all = "snake_case")]
380#[derive(Clone, PartialEq, ::prost::Message)]
381pub struct GetCompanyPoliciesResponse {
382    #[prost(message, repeated, tag = "1")]
383    pub policies: ::prost::alloc::vec::Vec<Policy>,
384}
385#[derive(serde::Serialize, serde::Deserialize)]
386#[serde(rename_all = "snake_case")]
387#[derive(Clone, PartialEq, ::prost::Message)]
388pub struct DeletePolicyRequest {
389    #[prost(message, optional, tag = "1")]
390    pub id: ::core::option::Option<::prost::alloc::string::String>,
391}
392#[derive(serde::Serialize, serde::Deserialize)]
393#[serde(rename_all = "snake_case")]
394#[derive(Clone, PartialEq, ::prost::Message)]
395pub struct DeletePolicyResponse {
396    #[prost(message, optional, tag = "1")]
397    pub id: ::core::option::Option<::prost::alloc::string::String>,
398}
399#[derive(serde::Serialize, serde::Deserialize)]
400#[serde(rename_all = "snake_case")]
401#[derive(Clone, PartialEq, ::prost::Message)]
402pub struct PolicyOrder {
403    #[prost(message, optional, tag = "1")]
404    pub order: ::core::option::Option<i32>,
405    #[prost(message, optional, tag = "2")]
406    pub id: ::core::option::Option<::prost::alloc::string::String>,
407}
408#[derive(serde::Serialize, serde::Deserialize)]
409#[serde(rename_all = "snake_case")]
410#[derive(Clone, PartialEq, ::prost::Message)]
411pub struct ReorderPoliciesRequest {
412    #[prost(message, repeated, tag = "1")]
413    pub orders: ::prost::alloc::vec::Vec<PolicyOrder>,
414    #[prost(enumeration = "SourceType", tag = "2")]
415    pub source_type: i32,
416}
417#[derive(serde::Serialize, serde::Deserialize)]
418#[serde(rename_all = "snake_case")]
419#[derive(Clone, PartialEq, ::prost::Message)]
420pub struct ReorderPoliciesResponse {
421    #[prost(message, repeated, tag = "1")]
422    pub orders: ::prost::alloc::vec::Vec<PolicyOrder>,
423}
424#[derive(serde::Serialize, serde::Deserialize)]
425#[serde(rename_all = "snake_case")]
426#[derive(Clone, PartialEq, ::prost::Message)]
427pub struct LogMetaFieldsValues {
428    #[prost(message, optional, tag = "1")]
429    pub application_name_values: ::core::option::Option<::prost::alloc::string::String>,
430    #[prost(message, optional, tag = "2")]
431    pub severity_values: ::core::option::Option<::prost::alloc::string::String>,
432    #[prost(message, optional, tag = "3")]
433    pub subsystem_name_values: ::core::option::Option<::prost::alloc::string::String>,
434}
435#[derive(serde::Serialize, serde::Deserialize)]
436#[serde(rename_all = "snake_case")]
437#[derive(Clone, PartialEq, ::prost::Message)]
438pub struct BulkTestLogPoliciesRequest {
439    #[prost(message, repeated, tag = "1")]
440    pub meta_fields_values_list: ::prost::alloc::vec::Vec<LogMetaFieldsValues>,
441}
442#[derive(serde::Serialize, serde::Deserialize)]
443#[serde(rename_all = "snake_case")]
444#[derive(Clone, PartialEq, ::prost::Message)]
445pub struct TestPoliciesResult {
446    #[prost(message, optional, tag = "1")]
447    pub meta_fields_values: ::core::option::Option<LogMetaFieldsValues>,
448    #[prost(message, optional, tag = "2")]
449    pub matched: ::core::option::Option<bool>,
450    #[prost(message, optional, tag = "3")]
451    pub policy: ::core::option::Option<Policy>,
452}
453#[derive(serde::Serialize, serde::Deserialize)]
454#[serde(rename_all = "snake_case")]
455#[derive(Clone, PartialEq, ::prost::Message)]
456pub struct BulkTestLogPoliciesResponse {
457    #[prost(message, repeated, tag = "1")]
458    pub test_policies_bulk_result: ::prost::alloc::vec::Vec<TestPoliciesResult>,
459}
460#[derive(serde::Serialize, serde::Deserialize)]
461#[serde(rename_all = "snake_case")]
462#[derive(Clone, PartialEq, ::prost::Message)]
463pub struct TogglePolicyRequest {
464    #[prost(message, optional, tag = "1")]
465    pub id: ::core::option::Option<::prost::alloc::string::String>,
466    #[prost(message, optional, tag = "2")]
467    pub enabled: ::core::option::Option<bool>,
468}
469#[derive(serde::Serialize, serde::Deserialize)]
470#[serde(rename_all = "snake_case")]
471#[derive(Clone, PartialEq, ::prost::Message)]
472pub struct TogglePolicyResponse {
473    #[prost(message, optional, tag = "1")]
474    pub id: ::core::option::Option<::prost::alloc::string::String>,
475    #[prost(message, optional, tag = "2")]
476    pub enabled: ::core::option::Option<bool>,
477}
478#[derive(serde::Serialize, serde::Deserialize)]
479#[serde(rename_all = "snake_case")]
480#[derive(Clone, PartialEq, ::prost::Message)]
481pub struct AtomicBatchCreatePolicyRequest {
482    #[prost(message, repeated, tag = "1")]
483    pub policy_requests: ::prost::alloc::vec::Vec<CreatePolicyRequest>,
484}
485#[derive(serde::Serialize, serde::Deserialize)]
486#[serde(rename_all = "snake_case")]
487#[derive(Clone, PartialEq, ::prost::Message)]
488pub struct AtomicBatchCreatePolicyResponse {
489    #[prost(message, repeated, tag = "1")]
490    pub create_responses: ::prost::alloc::vec::Vec<CreatePolicyResponse>,
491}
492#[derive(serde::Serialize, serde::Deserialize)]
493#[serde(rename_all = "snake_case")]
494#[derive(Clone, PartialEq, ::prost::Message)]
495pub struct AtomicOverwriteLogPoliciesResponse {
496    #[prost(message, repeated, tag = "1")]
497    pub create_responses: ::prost::alloc::vec::Vec<CreatePolicyResponse>,
498}
499#[derive(serde::Serialize, serde::Deserialize)]
500#[serde(rename_all = "snake_case")]
501#[derive(Clone, PartialEq, ::prost::Message)]
502pub struct AtomicOverwriteSpanPoliciesResponse {
503    #[prost(message, repeated, tag = "1")]
504    pub create_responses: ::prost::alloc::vec::Vec<CreatePolicyResponse>,
505}
506/// In an atomic operation delete all existing log policies and create the provided list by order
507#[derive(serde::Serialize, serde::Deserialize)]
508#[serde(rename_all = "snake_case")]
509#[derive(Clone, PartialEq, ::prost::Message)]
510pub struct AtomicOverwriteLogPoliciesRequest {
511    #[prost(message, repeated, tag = "1")]
512    pub policies: ::prost::alloc::vec::Vec<CreateLogPolicyRequest>,
513}
514/// In an atomic operation delete all existing span policies and create the provided list by order
515#[derive(serde::Serialize, serde::Deserialize)]
516#[serde(rename_all = "snake_case")]
517#[derive(Clone, PartialEq, ::prost::Message)]
518pub struct AtomicOverwriteSpanPoliciesRequest {
519    #[prost(message, repeated, tag = "1")]
520    pub policies: ::prost::alloc::vec::Vec<CreateSpanPolicyRequest>,
521}
522#[derive(serde::Serialize, serde::Deserialize)]
523#[serde(rename_all = "snake_case")]
524#[derive(Clone, PartialEq, ::prost::Message)]
525pub struct CreateSpanPolicyRequest {
526    #[prost(message, optional, tag = "1")]
527    pub policy: ::core::option::Option<CreateGenericPolicyRequest>,
528    #[prost(message, optional, tag = "2")]
529    pub span_rules: ::core::option::Option<SpanRules>,
530}
531#[derive(serde::Serialize, serde::Deserialize)]
532#[serde(rename_all = "snake_case")]
533#[derive(Clone, PartialEq, ::prost::Message)]
534pub struct CreateLogPolicyRequest {
535    #[prost(message, optional, tag = "1")]
536    pub policy: ::core::option::Option<CreateGenericPolicyRequest>,
537    #[prost(message, optional, tag = "2")]
538    pub log_rules: ::core::option::Option<LogRules>,
539}
540#[derive(serde::Serialize, serde::Deserialize)]
541#[serde(rename_all = "snake_case")]
542#[derive(Clone, PartialEq, ::prost::Message)]
543pub struct CreateGenericPolicyRequest {
544    #[prost(message, optional, tag = "1")]
545    pub name: ::core::option::Option<::prost::alloc::string::String>,
546    #[prost(message, optional, tag = "2")]
547    pub description: ::core::option::Option<::prost::alloc::string::String>,
548    #[prost(enumeration = "Priority", tag = "3")]
549    pub priority: i32,
550    #[prost(message, optional, tag = "4")]
551    pub application_rule: ::core::option::Option<Rule>,
552    #[prost(message, optional, tag = "5")]
553    pub subsystem_rule: ::core::option::Option<Rule>,
554    #[prost(message, optional, tag = "6")]
555    pub archive_retention: ::core::option::Option<ArchiveRetention>,
556}
557/// Generated client implementations.
558pub mod policies_service_client {
559    #![allow(
560        unused_variables,
561        dead_code,
562        missing_docs,
563        clippy::wildcard_imports,
564        clippy::let_unit_value,
565    )]
566    use tonic::codegen::*;
567    use tonic::codegen::http::Uri;
568    #[derive(Debug, Clone)]
569    pub struct PoliciesServiceClient<T> {
570        inner: tonic::client::Grpc<T>,
571    }
572    impl PoliciesServiceClient<tonic::transport::Channel> {
573        /// Attempt to create a new client by connecting to a given endpoint.
574        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
575        where
576            D: TryInto<tonic::transport::Endpoint>,
577            D::Error: Into<StdError>,
578        {
579            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
580            Ok(Self::new(conn))
581        }
582    }
583    impl<T> PoliciesServiceClient<T>
584    where
585        T: tonic::client::GrpcService<tonic::body::BoxBody>,
586        T::Error: Into<StdError>,
587        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
588        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
589    {
590        pub fn new(inner: T) -> Self {
591            let inner = tonic::client::Grpc::new(inner);
592            Self { inner }
593        }
594        pub fn with_origin(inner: T, origin: Uri) -> Self {
595            let inner = tonic::client::Grpc::with_origin(inner, origin);
596            Self { inner }
597        }
598        pub fn with_interceptor<F>(
599            inner: T,
600            interceptor: F,
601        ) -> PoliciesServiceClient<InterceptedService<T, F>>
602        where
603            F: tonic::service::Interceptor,
604            T::ResponseBody: Default,
605            T: tonic::codegen::Service<
606                http::Request<tonic::body::BoxBody>,
607                Response = http::Response<
608                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
609                >,
610            >,
611            <T as tonic::codegen::Service<
612                http::Request<tonic::body::BoxBody>,
613            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
614        {
615            PoliciesServiceClient::new(InterceptedService::new(inner, interceptor))
616        }
617        /// Compress requests with the given encoding.
618        ///
619        /// This requires the server to support it otherwise it might respond with an
620        /// error.
621        #[must_use]
622        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
623            self.inner = self.inner.send_compressed(encoding);
624            self
625        }
626        /// Enable decompressing responses.
627        #[must_use]
628        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
629            self.inner = self.inner.accept_compressed(encoding);
630            self
631        }
632        /// Limits the maximum size of a decoded message.
633        ///
634        /// Default: `4MB`
635        #[must_use]
636        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
637            self.inner = self.inner.max_decoding_message_size(limit);
638            self
639        }
640        /// Limits the maximum size of an encoded message.
641        ///
642        /// Default: `usize::MAX`
643        #[must_use]
644        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
645            self.inner = self.inner.max_encoding_message_size(limit);
646            self
647        }
648        pub async fn get_policy(
649            &mut self,
650            request: impl tonic::IntoRequest<super::GetPolicyRequest>,
651        ) -> std::result::Result<
652            tonic::Response<super::GetPolicyResponse>,
653            tonic::Status,
654        > {
655            self.inner
656                .ready()
657                .await
658                .map_err(|e| {
659                    tonic::Status::unknown(
660                        format!("Service was not ready: {}", e.into()),
661                    )
662                })?;
663            let codec = tonic::codec::ProstCodec::default();
664            let path = http::uri::PathAndQuery::from_static(
665                "/com.coralogix.quota.v1.PoliciesService/GetPolicy",
666            );
667            let mut req = request.into_request();
668            req.extensions_mut()
669                .insert(
670                    GrpcMethod::new(
671                        "com.coralogix.quota.v1.PoliciesService",
672                        "GetPolicy",
673                    ),
674                );
675            self.inner.unary(req, path, codec).await
676        }
677        pub async fn create_policy(
678            &mut self,
679            request: impl tonic::IntoRequest<super::CreatePolicyRequest>,
680        ) -> std::result::Result<
681            tonic::Response<super::CreatePolicyResponse>,
682            tonic::Status,
683        > {
684            self.inner
685                .ready()
686                .await
687                .map_err(|e| {
688                    tonic::Status::unknown(
689                        format!("Service was not ready: {}", e.into()),
690                    )
691                })?;
692            let codec = tonic::codec::ProstCodec::default();
693            let path = http::uri::PathAndQuery::from_static(
694                "/com.coralogix.quota.v1.PoliciesService/CreatePolicy",
695            );
696            let mut req = request.into_request();
697            req.extensions_mut()
698                .insert(
699                    GrpcMethod::new(
700                        "com.coralogix.quota.v1.PoliciesService",
701                        "CreatePolicy",
702                    ),
703                );
704            self.inner.unary(req, path, codec).await
705        }
706        pub async fn update_policy(
707            &mut self,
708            request: impl tonic::IntoRequest<super::UpdatePolicyRequest>,
709        ) -> std::result::Result<
710            tonic::Response<super::UpdatePolicyResponse>,
711            tonic::Status,
712        > {
713            self.inner
714                .ready()
715                .await
716                .map_err(|e| {
717                    tonic::Status::unknown(
718                        format!("Service was not ready: {}", e.into()),
719                    )
720                })?;
721            let codec = tonic::codec::ProstCodec::default();
722            let path = http::uri::PathAndQuery::from_static(
723                "/com.coralogix.quota.v1.PoliciesService/UpdatePolicy",
724            );
725            let mut req = request.into_request();
726            req.extensions_mut()
727                .insert(
728                    GrpcMethod::new(
729                        "com.coralogix.quota.v1.PoliciesService",
730                        "UpdatePolicy",
731                    ),
732                );
733            self.inner.unary(req, path, codec).await
734        }
735        pub async fn get_company_policies(
736            &mut self,
737            request: impl tonic::IntoRequest<super::GetCompanyPoliciesRequest>,
738        ) -> std::result::Result<
739            tonic::Response<super::GetCompanyPoliciesResponse>,
740            tonic::Status,
741        > {
742            self.inner
743                .ready()
744                .await
745                .map_err(|e| {
746                    tonic::Status::unknown(
747                        format!("Service was not ready: {}", e.into()),
748                    )
749                })?;
750            let codec = tonic::codec::ProstCodec::default();
751            let path = http::uri::PathAndQuery::from_static(
752                "/com.coralogix.quota.v1.PoliciesService/GetCompanyPolicies",
753            );
754            let mut req = request.into_request();
755            req.extensions_mut()
756                .insert(
757                    GrpcMethod::new(
758                        "com.coralogix.quota.v1.PoliciesService",
759                        "GetCompanyPolicies",
760                    ),
761                );
762            self.inner.unary(req, path, codec).await
763        }
764        pub async fn delete_policy(
765            &mut self,
766            request: impl tonic::IntoRequest<super::DeletePolicyRequest>,
767        ) -> std::result::Result<
768            tonic::Response<super::DeletePolicyResponse>,
769            tonic::Status,
770        > {
771            self.inner
772                .ready()
773                .await
774                .map_err(|e| {
775                    tonic::Status::unknown(
776                        format!("Service was not ready: {}", e.into()),
777                    )
778                })?;
779            let codec = tonic::codec::ProstCodec::default();
780            let path = http::uri::PathAndQuery::from_static(
781                "/com.coralogix.quota.v1.PoliciesService/DeletePolicy",
782            );
783            let mut req = request.into_request();
784            req.extensions_mut()
785                .insert(
786                    GrpcMethod::new(
787                        "com.coralogix.quota.v1.PoliciesService",
788                        "DeletePolicy",
789                    ),
790                );
791            self.inner.unary(req, path, codec).await
792        }
793        pub async fn reorder_policies(
794            &mut self,
795            request: impl tonic::IntoRequest<super::ReorderPoliciesRequest>,
796        ) -> std::result::Result<
797            tonic::Response<super::ReorderPoliciesResponse>,
798            tonic::Status,
799        > {
800            self.inner
801                .ready()
802                .await
803                .map_err(|e| {
804                    tonic::Status::unknown(
805                        format!("Service was not ready: {}", e.into()),
806                    )
807                })?;
808            let codec = tonic::codec::ProstCodec::default();
809            let path = http::uri::PathAndQuery::from_static(
810                "/com.coralogix.quota.v1.PoliciesService/ReorderPolicies",
811            );
812            let mut req = request.into_request();
813            req.extensions_mut()
814                .insert(
815                    GrpcMethod::new(
816                        "com.coralogix.quota.v1.PoliciesService",
817                        "ReorderPolicies",
818                    ),
819                );
820            self.inner.unary(req, path, codec).await
821        }
822        pub async fn bulk_test_log_policies(
823            &mut self,
824            request: impl tonic::IntoRequest<super::BulkTestLogPoliciesRequest>,
825        ) -> std::result::Result<
826            tonic::Response<super::BulkTestLogPoliciesResponse>,
827            tonic::Status,
828        > {
829            self.inner
830                .ready()
831                .await
832                .map_err(|e| {
833                    tonic::Status::unknown(
834                        format!("Service was not ready: {}", e.into()),
835                    )
836                })?;
837            let codec = tonic::codec::ProstCodec::default();
838            let path = http::uri::PathAndQuery::from_static(
839                "/com.coralogix.quota.v1.PoliciesService/BulkTestLogPolicies",
840            );
841            let mut req = request.into_request();
842            req.extensions_mut()
843                .insert(
844                    GrpcMethod::new(
845                        "com.coralogix.quota.v1.PoliciesService",
846                        "BulkTestLogPolicies",
847                    ),
848                );
849            self.inner.unary(req, path, codec).await
850        }
851        pub async fn toggle_policy(
852            &mut self,
853            request: impl tonic::IntoRequest<super::TogglePolicyRequest>,
854        ) -> std::result::Result<
855            tonic::Response<super::TogglePolicyResponse>,
856            tonic::Status,
857        > {
858            self.inner
859                .ready()
860                .await
861                .map_err(|e| {
862                    tonic::Status::unknown(
863                        format!("Service was not ready: {}", e.into()),
864                    )
865                })?;
866            let codec = tonic::codec::ProstCodec::default();
867            let path = http::uri::PathAndQuery::from_static(
868                "/com.coralogix.quota.v1.PoliciesService/TogglePolicy",
869            );
870            let mut req = request.into_request();
871            req.extensions_mut()
872                .insert(
873                    GrpcMethod::new(
874                        "com.coralogix.quota.v1.PoliciesService",
875                        "TogglePolicy",
876                    ),
877                );
878            self.inner.unary(req, path, codec).await
879        }
880        pub async fn atomic_batch_create_policy(
881            &mut self,
882            request: impl tonic::IntoRequest<super::AtomicBatchCreatePolicyRequest>,
883        ) -> std::result::Result<
884            tonic::Response<super::AtomicBatchCreatePolicyResponse>,
885            tonic::Status,
886        > {
887            self.inner
888                .ready()
889                .await
890                .map_err(|e| {
891                    tonic::Status::unknown(
892                        format!("Service was not ready: {}", e.into()),
893                    )
894                })?;
895            let codec = tonic::codec::ProstCodec::default();
896            let path = http::uri::PathAndQuery::from_static(
897                "/com.coralogix.quota.v1.PoliciesService/AtomicBatchCreatePolicy",
898            );
899            let mut req = request.into_request();
900            req.extensions_mut()
901                .insert(
902                    GrpcMethod::new(
903                        "com.coralogix.quota.v1.PoliciesService",
904                        "AtomicBatchCreatePolicy",
905                    ),
906                );
907            self.inner.unary(req, path, codec).await
908        }
909        pub async fn atomic_overwrite_log_policies(
910            &mut self,
911            request: impl tonic::IntoRequest<super::AtomicOverwriteLogPoliciesRequest>,
912        ) -> std::result::Result<
913            tonic::Response<super::AtomicOverwriteLogPoliciesResponse>,
914            tonic::Status,
915        > {
916            self.inner
917                .ready()
918                .await
919                .map_err(|e| {
920                    tonic::Status::unknown(
921                        format!("Service was not ready: {}", e.into()),
922                    )
923                })?;
924            let codec = tonic::codec::ProstCodec::default();
925            let path = http::uri::PathAndQuery::from_static(
926                "/com.coralogix.quota.v1.PoliciesService/AtomicOverwriteLogPolicies",
927            );
928            let mut req = request.into_request();
929            req.extensions_mut()
930                .insert(
931                    GrpcMethod::new(
932                        "com.coralogix.quota.v1.PoliciesService",
933                        "AtomicOverwriteLogPolicies",
934                    ),
935                );
936            self.inner.unary(req, path, codec).await
937        }
938        pub async fn atomic_overwrite_span_policies(
939            &mut self,
940            request: impl tonic::IntoRequest<super::AtomicOverwriteSpanPoliciesRequest>,
941        ) -> std::result::Result<
942            tonic::Response<super::AtomicOverwriteSpanPoliciesResponse>,
943            tonic::Status,
944        > {
945            self.inner
946                .ready()
947                .await
948                .map_err(|e| {
949                    tonic::Status::unknown(
950                        format!("Service was not ready: {}", e.into()),
951                    )
952                })?;
953            let codec = tonic::codec::ProstCodec::default();
954            let path = http::uri::PathAndQuery::from_static(
955                "/com.coralogix.quota.v1.PoliciesService/AtomicOverwriteSpanPolicies",
956            );
957            let mut req = request.into_request();
958            req.extensions_mut()
959                .insert(
960                    GrpcMethod::new(
961                        "com.coralogix.quota.v1.PoliciesService",
962                        "AtomicOverwriteSpanPolicies",
963                    ),
964                );
965            self.inner.unary(req, path, codec).await
966        }
967    }
968}