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