cx_api/generated/
com.coralogixapis.slo.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 Metric {
6    #[prost(string, tag = "1")]
7    pub query: ::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 RequestBasedMetricSli {
13    #[prost(message, optional, tag = "1")]
14    pub good_events: ::core::option::Option<Metric>,
15    #[prost(message, optional, tag = "2")]
16    pub total_events: ::core::option::Option<Metric>,
17}
18#[derive(serde::Serialize, serde::Deserialize)]
19#[serde(rename_all = "snake_case")]
20#[derive(Clone, PartialEq, ::prost::Message)]
21pub struct WindowBasedMetricSli {
22    #[prost(message, optional, tag = "1")]
23    pub query: ::core::option::Option<Metric>,
24    #[prost(enumeration = "WindowSloWindow", tag = "2")]
25    pub window: i32,
26    #[prost(enumeration = "ComparisonOperator", tag = "3")]
27    pub comparison_operator: i32,
28    #[prost(float, tag = "4")]
29    pub threshold: f32,
30}
31#[derive(serde::Serialize, serde::Deserialize)]
32#[serde(rename_all = "snake_case")]
33#[derive(Clone, Copy, PartialEq, ::prost::Message)]
34pub struct Revision {
35    #[prost(int32, tag = "1")]
36    pub revision: i32,
37    #[prost(message, optional, tag = "2")]
38    pub update_time: ::core::option::Option<::prost_wkt_types::Timestamp>,
39}
40#[derive(serde::Serialize, serde::Deserialize)]
41#[serde(rename_all = "snake_case")]
42#[derive(Clone, PartialEq, ::prost::Message)]
43pub struct Grouping {
44    #[prost(string, repeated, tag = "1")]
45    pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
46}
47#[derive(serde::Serialize, serde::Deserialize)]
48#[serde(rename_all = "snake_case")]
49#[derive(Clone, PartialEq, ::prost::Message)]
50pub struct Slo {
51    #[prost(string, optional, tag = "1")]
52    pub id: ::core::option::Option<::prost::alloc::string::String>,
53    #[prost(string, tag = "2")]
54    pub name: ::prost::alloc::string::String,
55    #[prost(string, optional, tag = "3")]
56    pub description: ::core::option::Option<::prost::alloc::string::String>,
57    #[prost(string, optional, tag = "4")]
58    pub creator: ::core::option::Option<::prost::alloc::string::String>,
59    #[prost(map = "string, string", tag = "5")]
60    pub labels: ::std::collections::HashMap<
61        ::prost::alloc::string::String,
62        ::prost::alloc::string::String,
63    >,
64    #[prost(message, optional, tag = "6")]
65    pub revision: ::core::option::Option<Revision>,
66    #[prost(message, optional, tag = "7")]
67    pub grouping: ::core::option::Option<Grouping>,
68    #[prost(message, optional, tag = "8")]
69    pub create_time: ::core::option::Option<::prost_wkt_types::Timestamp>,
70    #[prost(message, optional, tag = "9")]
71    pub update_time: ::core::option::Option<::prost_wkt_types::Timestamp>,
72    #[prost(float, tag = "10")]
73    pub target_threshold_percentage: f32,
74    #[prost(oneof = "slo::Window", tags = "11")]
75    pub window: ::core::option::Option<slo::Window>,
76    #[prost(oneof = "slo::Sli", tags = "12, 13")]
77    pub sli: ::core::option::Option<slo::Sli>,
78}
79/// Nested message and enum types in `Slo`.
80pub mod slo {
81    #[derive(serde::Serialize, serde::Deserialize)]
82    #[serde(rename_all = "snake_case")]
83    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
84    pub enum Window {
85        #[prost(enumeration = "super::SloTimeFrame", tag = "11")]
86        SloTimeFrame(i32),
87    }
88    #[derive(serde::Serialize, serde::Deserialize)]
89    #[serde(rename_all = "snake_case")]
90    #[derive(Clone, PartialEq, ::prost::Oneof)]
91    pub enum Sli {
92        #[prost(message, tag = "12")]
93        RequestBasedMetricSli(super::RequestBasedMetricSli),
94        #[prost(message, tag = "13")]
95        WindowBasedMetricSli(super::WindowBasedMetricSli),
96    }
97}
98#[derive(serde::Serialize, serde::Deserialize)]
99#[serde(rename_all = "snake_case")]
100#[derive(Clone, PartialEq, ::prost::Message)]
101pub struct SloFilterField {
102    #[prost(oneof = "slo_filter_field::Field", tags = "1, 2")]
103    pub field: ::core::option::Option<slo_filter_field::Field>,
104}
105/// Nested message and enum types in `SloFilterField`.
106pub mod slo_filter_field {
107    #[derive(serde::Serialize, serde::Deserialize)]
108    #[serde(rename_all = "snake_case")]
109    #[derive(Clone, PartialEq, ::prost::Oneof)]
110    pub enum Field {
111        #[prost(enumeration = "super::SloConstantFilterField", tag = "1")]
112        ConstFilter(i32),
113        #[prost(string, tag = "2")]
114        LabelName(::prost::alloc::string::String),
115    }
116}
117#[derive(serde::Serialize, serde::Deserialize)]
118#[serde(rename_all = "snake_case")]
119#[derive(Clone, PartialEq, ::prost::Message)]
120pub struct IsFilterPredicate {
121    #[prost(string, repeated, tag = "1")]
122    pub is: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
123}
124#[derive(serde::Serialize, serde::Deserialize)]
125#[serde(rename_all = "snake_case")]
126#[derive(Clone, PartialEq, ::prost::Message)]
127pub struct SloFilterPredicate {
128    #[prost(oneof = "slo_filter_predicate::Predicate", tags = "1")]
129    pub predicate: ::core::option::Option<slo_filter_predicate::Predicate>,
130}
131/// Nested message and enum types in `SloFilterPredicate`.
132pub mod slo_filter_predicate {
133    #[derive(serde::Serialize, serde::Deserialize)]
134    #[serde(rename_all = "snake_case")]
135    #[derive(Clone, PartialEq, ::prost::Oneof)]
136    pub enum Predicate {
137        #[prost(message, tag = "1")]
138        Is(super::IsFilterPredicate),
139    }
140}
141#[derive(serde::Serialize, serde::Deserialize)]
142#[serde(rename_all = "snake_case")]
143#[derive(Clone, PartialEq, ::prost::Message)]
144pub struct SloFilter {
145    #[prost(message, optional, tag = "1")]
146    pub field: ::core::option::Option<SloFilterField>,
147    #[prost(message, optional, tag = "2")]
148    pub predicate: ::core::option::Option<SloFilterPredicate>,
149}
150#[derive(serde::Serialize, serde::Deserialize)]
151#[serde(rename_all = "snake_case")]
152#[derive(Clone, PartialEq, ::prost::Message)]
153pub struct SloFilters {
154    #[prost(message, repeated, tag = "1")]
155    pub filters: ::prost::alloc::vec::Vec<SloFilter>,
156}
157#[derive(serde::Serialize, serde::Deserialize)]
158#[serde(rename_all = "snake_case")]
159#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
160#[repr(i32)]
161pub enum ComparisonOperator {
162    Unspecified = 0,
163    GreaterThan = 1,
164    GreaterThanOrEquals = 2,
165    LessThan = 3,
166    LessThanOrEquals = 4,
167}
168impl ComparisonOperator {
169    /// String value of the enum field names used in the ProtoBuf definition.
170    ///
171    /// The values are not transformed in any way and thus are considered stable
172    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
173    pub fn as_str_name(&self) -> &'static str {
174        match self {
175            Self::Unspecified => "COMPARISON_OPERATOR_UNSPECIFIED",
176            Self::GreaterThan => "COMPARISON_OPERATOR_GREATER_THAN",
177            Self::GreaterThanOrEquals => "COMPARISON_OPERATOR_GREATER_THAN_OR_EQUALS",
178            Self::LessThan => "COMPARISON_OPERATOR_LESS_THAN",
179            Self::LessThanOrEquals => "COMPARISON_OPERATOR_LESS_THAN_OR_EQUALS",
180        }
181    }
182    /// Creates an enum from field names used in the ProtoBuf definition.
183    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
184        match value {
185            "COMPARISON_OPERATOR_UNSPECIFIED" => Some(Self::Unspecified),
186            "COMPARISON_OPERATOR_GREATER_THAN" => Some(Self::GreaterThan),
187            "COMPARISON_OPERATOR_GREATER_THAN_OR_EQUALS" => {
188                Some(Self::GreaterThanOrEquals)
189            }
190            "COMPARISON_OPERATOR_LESS_THAN" => Some(Self::LessThan),
191            "COMPARISON_OPERATOR_LESS_THAN_OR_EQUALS" => Some(Self::LessThanOrEquals),
192            _ => None,
193        }
194    }
195}
196#[derive(serde::Serialize, serde::Deserialize)]
197#[serde(rename_all = "snake_case")]
198#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
199#[repr(i32)]
200pub enum WindowSloWindow {
201    Unspecified = 0,
202    WindowSloWindow1Minute = 1,
203    WindowSloWindow5Minutes = 2,
204}
205impl WindowSloWindow {
206    /// String value of the enum field names used in the ProtoBuf definition.
207    ///
208    /// The values are not transformed in any way and thus are considered stable
209    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
210    pub fn as_str_name(&self) -> &'static str {
211        match self {
212            Self::Unspecified => "WINDOW_SLO_WINDOW_UNSPECIFIED",
213            Self::WindowSloWindow1Minute => "WINDOW_SLO_WINDOW_1_MINUTE",
214            Self::WindowSloWindow5Minutes => "WINDOW_SLO_WINDOW_5_MINUTES",
215        }
216    }
217    /// Creates an enum from field names used in the ProtoBuf definition.
218    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
219        match value {
220            "WINDOW_SLO_WINDOW_UNSPECIFIED" => Some(Self::Unspecified),
221            "WINDOW_SLO_WINDOW_1_MINUTE" => Some(Self::WindowSloWindow1Minute),
222            "WINDOW_SLO_WINDOW_5_MINUTES" => Some(Self::WindowSloWindow5Minutes),
223            _ => None,
224        }
225    }
226}
227#[derive(serde::Serialize, serde::Deserialize)]
228#[serde(rename_all = "snake_case")]
229#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
230#[repr(i32)]
231pub enum SloTimeFrame {
232    Unspecified = 0,
233    SloTimeFrame7Days = 1,
234    SloTimeFrame14Days = 2,
235    SloTimeFrame21Days = 3,
236    SloTimeFrame28Days = 4,
237}
238impl SloTimeFrame {
239    /// String value of the enum field names used in the ProtoBuf definition.
240    ///
241    /// The values are not transformed in any way and thus are considered stable
242    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
243    pub fn as_str_name(&self) -> &'static str {
244        match self {
245            Self::Unspecified => "SLO_TIME_FRAME_UNSPECIFIED",
246            Self::SloTimeFrame7Days => "SLO_TIME_FRAME_7_DAYS",
247            Self::SloTimeFrame14Days => "SLO_TIME_FRAME_14_DAYS",
248            Self::SloTimeFrame21Days => "SLO_TIME_FRAME_21_DAYS",
249            Self::SloTimeFrame28Days => "SLO_TIME_FRAME_28_DAYS",
250        }
251    }
252    /// Creates an enum from field names used in the ProtoBuf definition.
253    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
254        match value {
255            "SLO_TIME_FRAME_UNSPECIFIED" => Some(Self::Unspecified),
256            "SLO_TIME_FRAME_7_DAYS" => Some(Self::SloTimeFrame7Days),
257            "SLO_TIME_FRAME_14_DAYS" => Some(Self::SloTimeFrame14Days),
258            "SLO_TIME_FRAME_21_DAYS" => Some(Self::SloTimeFrame21Days),
259            "SLO_TIME_FRAME_28_DAYS" => Some(Self::SloTimeFrame28Days),
260            _ => None,
261        }
262    }
263}
264#[derive(serde::Serialize, serde::Deserialize)]
265#[serde(rename_all = "snake_case")]
266#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
267#[repr(i32)]
268pub enum SloConstantFilterField {
269    SloConstFilterFieldUnspecified = 0,
270    SloConstFilterFieldUserName = 1,
271    SloConstFilterFieldSloName = 2,
272}
273impl SloConstantFilterField {
274    /// String value of the enum field names used in the ProtoBuf definition.
275    ///
276    /// The values are not transformed in any way and thus are considered stable
277    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
278    pub fn as_str_name(&self) -> &'static str {
279        match self {
280            Self::SloConstFilterFieldUnspecified => "SLO_CONST_FILTER_FIELD_UNSPECIFIED",
281            Self::SloConstFilterFieldUserName => "SLO_CONST_FILTER_FIELD_USER_NAME",
282            Self::SloConstFilterFieldSloName => "SLO_CONST_FILTER_FIELD_SLO_NAME",
283        }
284    }
285    /// Creates an enum from field names used in the ProtoBuf definition.
286    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
287        match value {
288            "SLO_CONST_FILTER_FIELD_UNSPECIFIED" => {
289                Some(Self::SloConstFilterFieldUnspecified)
290            }
291            "SLO_CONST_FILTER_FIELD_USER_NAME" => Some(Self::SloConstFilterFieldUserName),
292            "SLO_CONST_FILTER_FIELD_SLO_NAME" => Some(Self::SloConstFilterFieldSloName),
293            _ => None,
294        }
295    }
296}
297#[derive(serde::Serialize, serde::Deserialize)]
298#[serde(rename_all = "snake_case")]
299#[derive(Clone, PartialEq, ::prost::Message)]
300pub struct ResponseStatus {
301    #[prost(enumeration = "super::super::super::super::google::rpc::Code", tag = "1")]
302    pub status_code: i32,
303    #[prost(string, optional, tag = "2")]
304    pub message: ::core::option::Option<::prost::alloc::string::String>,
305    #[prost(map = "string, string", tag = "3")]
306    pub details: ::std::collections::HashMap<
307        ::prost::alloc::string::String,
308        ::prost::alloc::string::String,
309    >,
310}
311#[derive(serde::Serialize, serde::Deserialize)]
312#[serde(rename_all = "snake_case")]
313#[derive(Clone, PartialEq, ::prost::Message)]
314pub struct CreateSloRequest {
315    #[prost(message, optional, tag = "1")]
316    pub slo: ::core::option::Option<Slo>,
317}
318#[derive(serde::Serialize, serde::Deserialize)]
319#[serde(rename_all = "snake_case")]
320#[derive(Clone, PartialEq, ::prost::Message)]
321pub struct CreateSloResponse {
322    #[prost(message, optional, tag = "1")]
323    pub slo: ::core::option::Option<Slo>,
324}
325#[derive(serde::Serialize, serde::Deserialize)]
326#[serde(rename_all = "snake_case")]
327#[derive(Clone, PartialEq, ::prost::Message)]
328pub struct ReplaceSloRequest {
329    #[prost(message, optional, tag = "1")]
330    pub slo: ::core::option::Option<Slo>,
331}
332#[derive(serde::Serialize, serde::Deserialize)]
333#[serde(rename_all = "snake_case")]
334#[derive(Clone, PartialEq, ::prost::Message)]
335pub struct ReplaceSloResponse {
336    #[prost(message, optional, tag = "1")]
337    pub slo: ::core::option::Option<Slo>,
338    #[prost(string, repeated, tag = "2")]
339    pub effected_slo_alert_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
340}
341#[derive(serde::Serialize, serde::Deserialize)]
342#[serde(rename_all = "snake_case")]
343#[derive(Clone, PartialEq, ::prost::Message)]
344pub struct DeleteSloRequest {
345    #[prost(string, tag = "1")]
346    pub id: ::prost::alloc::string::String,
347}
348#[derive(serde::Serialize, serde::Deserialize)]
349#[serde(rename_all = "snake_case")]
350#[derive(Clone, PartialEq, ::prost::Message)]
351pub struct DeleteSloResponse {
352    #[prost(string, repeated, tag = "1")]
353    pub effected_slo_alert_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
354}
355#[derive(serde::Serialize, serde::Deserialize)]
356#[serde(rename_all = "snake_case")]
357#[derive(Clone, PartialEq, ::prost::Message)]
358pub struct GetSloRequest {
359    #[prost(string, tag = "1")]
360    pub id: ::prost::alloc::string::String,
361}
362#[derive(serde::Serialize, serde::Deserialize)]
363#[serde(rename_all = "snake_case")]
364#[derive(Clone, PartialEq, ::prost::Message)]
365pub struct GetSloResponse {
366    #[prost(message, optional, tag = "1")]
367    pub slo: ::core::option::Option<Slo>,
368}
369#[derive(serde::Serialize, serde::Deserialize)]
370#[serde(rename_all = "snake_case")]
371#[derive(Clone, PartialEq, ::prost::Message)]
372pub struct ListSlosRequest {
373    #[prost(message, optional, tag = "1")]
374    pub filters: ::core::option::Option<SloFilters>,
375}
376#[derive(serde::Serialize, serde::Deserialize)]
377#[serde(rename_all = "snake_case")]
378#[derive(Clone, PartialEq, ::prost::Message)]
379pub struct ListSlosResponse {
380    #[prost(message, repeated, tag = "1")]
381    pub slos: ::prost::alloc::vec::Vec<Slo>,
382}
383#[derive(serde::Serialize, serde::Deserialize)]
384#[serde(rename_all = "snake_case")]
385#[derive(Clone, PartialEq, ::prost::Message)]
386pub struct BatchGetSlosRequest {
387    #[prost(string, repeated, tag = "1")]
388    pub ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
389}
390#[derive(serde::Serialize, serde::Deserialize)]
391#[serde(rename_all = "snake_case")]
392#[derive(Clone, PartialEq, ::prost::Message)]
393pub struct BatchGetSlosResponse {
394    #[prost(message, repeated, tag = "1")]
395    pub slos: ::prost::alloc::vec::Vec<Slo>,
396    #[prost(string, repeated, tag = "2")]
397    pub not_found_ids: ::prost::alloc::vec::Vec<::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 SloExecutionRequest {
403    #[prost(oneof = "slo_execution_request::Request", tags = "1, 2, 3")]
404    pub request: ::core::option::Option<slo_execution_request::Request>,
405}
406/// Nested message and enum types in `SloExecutionRequest`.
407pub mod slo_execution_request {
408    #[derive(serde::Serialize, serde::Deserialize)]
409    #[serde(rename_all = "snake_case")]
410    #[derive(Clone, PartialEq, ::prost::Oneof)]
411    pub enum Request {
412        #[prost(message, tag = "1")]
413        CreateSloRequest(super::CreateSloRequest),
414        #[prost(message, tag = "2")]
415        ReplaceSloRequest(super::ReplaceSloRequest),
416        #[prost(message, tag = "3")]
417        DeleteSloRequest(super::DeleteSloRequest),
418    }
419}
420#[derive(serde::Serialize, serde::Deserialize)]
421#[serde(rename_all = "snake_case")]
422#[derive(Clone, PartialEq, ::prost::Message)]
423pub struct SloExecutionResponse {
424    #[prost(oneof = "slo_execution_response::Response", tags = "1, 2, 3")]
425    pub response: ::core::option::Option<slo_execution_response::Response>,
426}
427/// Nested message and enum types in `SloExecutionResponse`.
428pub mod slo_execution_response {
429    #[derive(serde::Serialize, serde::Deserialize)]
430    #[serde(rename_all = "snake_case")]
431    #[derive(Clone, PartialEq, ::prost::Oneof)]
432    pub enum Response {
433        #[prost(message, tag = "1")]
434        CreateSloResponse(super::CreateSloResponse),
435        #[prost(message, tag = "2")]
436        ReplaceSloResponse(super::ReplaceSloResponse),
437        #[prost(message, tag = "3")]
438        DeleteSloResponse(super::DeleteSloResponse),
439    }
440}
441#[derive(serde::Serialize, serde::Deserialize)]
442#[serde(rename_all = "snake_case")]
443#[derive(Clone, PartialEq, ::prost::Message)]
444pub struct BatchExecuteSloRequest {
445    #[prost(message, repeated, tag = "1")]
446    pub requests: ::prost::alloc::vec::Vec<SloExecutionRequest>,
447}
448#[derive(serde::Serialize, serde::Deserialize)]
449#[serde(rename_all = "snake_case")]
450#[derive(Clone, PartialEq, ::prost::Message)]
451pub struct BatchExecuteSloResponse {
452    #[prost(message, repeated, tag = "1")]
453    pub matching_responses: ::prost::alloc::vec::Vec<SloExecutionResponse>,
454    #[prost(message, optional, tag = "2")]
455    pub status: ::core::option::Option<ResponseStatus>,
456}
457/// Generated client implementations.
458pub mod slos_service_client {
459    #![allow(
460        unused_variables,
461        dead_code,
462        missing_docs,
463        clippy::wildcard_imports,
464        clippy::let_unit_value,
465    )]
466    use tonic::codegen::*;
467    use tonic::codegen::http::Uri;
468    #[derive(Debug, Clone)]
469    pub struct SlosServiceClient<T> {
470        inner: tonic::client::Grpc<T>,
471    }
472    impl SlosServiceClient<tonic::transport::Channel> {
473        /// Attempt to create a new client by connecting to a given endpoint.
474        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
475        where
476            D: TryInto<tonic::transport::Endpoint>,
477            D::Error: Into<StdError>,
478        {
479            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
480            Ok(Self::new(conn))
481        }
482    }
483    impl<T> SlosServiceClient<T>
484    where
485        T: tonic::client::GrpcService<tonic::body::BoxBody>,
486        T::Error: Into<StdError>,
487        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
488        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
489    {
490        pub fn new(inner: T) -> Self {
491            let inner = tonic::client::Grpc::new(inner);
492            Self { inner }
493        }
494        pub fn with_origin(inner: T, origin: Uri) -> Self {
495            let inner = tonic::client::Grpc::with_origin(inner, origin);
496            Self { inner }
497        }
498        pub fn with_interceptor<F>(
499            inner: T,
500            interceptor: F,
501        ) -> SlosServiceClient<InterceptedService<T, F>>
502        where
503            F: tonic::service::Interceptor,
504            T::ResponseBody: Default,
505            T: tonic::codegen::Service<
506                http::Request<tonic::body::BoxBody>,
507                Response = http::Response<
508                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
509                >,
510            >,
511            <T as tonic::codegen::Service<
512                http::Request<tonic::body::BoxBody>,
513            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
514        {
515            SlosServiceClient::new(InterceptedService::new(inner, interceptor))
516        }
517        /// Compress requests with the given encoding.
518        ///
519        /// This requires the server to support it otherwise it might respond with an
520        /// error.
521        #[must_use]
522        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
523            self.inner = self.inner.send_compressed(encoding);
524            self
525        }
526        /// Enable decompressing responses.
527        #[must_use]
528        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
529            self.inner = self.inner.accept_compressed(encoding);
530            self
531        }
532        /// Limits the maximum size of a decoded message.
533        ///
534        /// Default: `4MB`
535        #[must_use]
536        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
537            self.inner = self.inner.max_decoding_message_size(limit);
538            self
539        }
540        /// Limits the maximum size of an encoded message.
541        ///
542        /// Default: `usize::MAX`
543        #[must_use]
544        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
545            self.inner = self.inner.max_encoding_message_size(limit);
546            self
547        }
548        pub async fn create_slo(
549            &mut self,
550            request: impl tonic::IntoRequest<super::CreateSloRequest>,
551        ) -> std::result::Result<
552            tonic::Response<super::CreateSloResponse>,
553            tonic::Status,
554        > {
555            self.inner
556                .ready()
557                .await
558                .map_err(|e| {
559                    tonic::Status::unknown(
560                        format!("Service was not ready: {}", e.into()),
561                    )
562                })?;
563            let codec = tonic::codec::ProstCodec::default();
564            let path = http::uri::PathAndQuery::from_static(
565                "/com.coralogixapis.slo.v1.SlosService/CreateSlo",
566            );
567            let mut req = request.into_request();
568            req.extensions_mut()
569                .insert(
570                    GrpcMethod::new("com.coralogixapis.slo.v1.SlosService", "CreateSlo"),
571                );
572            self.inner.unary(req, path, codec).await
573        }
574        pub async fn replace_slo(
575            &mut self,
576            request: impl tonic::IntoRequest<super::ReplaceSloRequest>,
577        ) -> std::result::Result<
578            tonic::Response<super::ReplaceSloResponse>,
579            tonic::Status,
580        > {
581            self.inner
582                .ready()
583                .await
584                .map_err(|e| {
585                    tonic::Status::unknown(
586                        format!("Service was not ready: {}", e.into()),
587                    )
588                })?;
589            let codec = tonic::codec::ProstCodec::default();
590            let path = http::uri::PathAndQuery::from_static(
591                "/com.coralogixapis.slo.v1.SlosService/ReplaceSlo",
592            );
593            let mut req = request.into_request();
594            req.extensions_mut()
595                .insert(
596                    GrpcMethod::new("com.coralogixapis.slo.v1.SlosService", "ReplaceSlo"),
597                );
598            self.inner.unary(req, path, codec).await
599        }
600        pub async fn delete_slo(
601            &mut self,
602            request: impl tonic::IntoRequest<super::DeleteSloRequest>,
603        ) -> std::result::Result<
604            tonic::Response<super::DeleteSloResponse>,
605            tonic::Status,
606        > {
607            self.inner
608                .ready()
609                .await
610                .map_err(|e| {
611                    tonic::Status::unknown(
612                        format!("Service was not ready: {}", e.into()),
613                    )
614                })?;
615            let codec = tonic::codec::ProstCodec::default();
616            let path = http::uri::PathAndQuery::from_static(
617                "/com.coralogixapis.slo.v1.SlosService/DeleteSlo",
618            );
619            let mut req = request.into_request();
620            req.extensions_mut()
621                .insert(
622                    GrpcMethod::new("com.coralogixapis.slo.v1.SlosService", "DeleteSlo"),
623                );
624            self.inner.unary(req, path, codec).await
625        }
626        pub async fn get_slo(
627            &mut self,
628            request: impl tonic::IntoRequest<super::GetSloRequest>,
629        ) -> std::result::Result<tonic::Response<super::GetSloResponse>, tonic::Status> {
630            self.inner
631                .ready()
632                .await
633                .map_err(|e| {
634                    tonic::Status::unknown(
635                        format!("Service was not ready: {}", e.into()),
636                    )
637                })?;
638            let codec = tonic::codec::ProstCodec::default();
639            let path = http::uri::PathAndQuery::from_static(
640                "/com.coralogixapis.slo.v1.SlosService/GetSlo",
641            );
642            let mut req = request.into_request();
643            req.extensions_mut()
644                .insert(
645                    GrpcMethod::new("com.coralogixapis.slo.v1.SlosService", "GetSlo"),
646                );
647            self.inner.unary(req, path, codec).await
648        }
649        pub async fn list_slos(
650            &mut self,
651            request: impl tonic::IntoRequest<super::ListSlosRequest>,
652        ) -> std::result::Result<
653            tonic::Response<super::ListSlosResponse>,
654            tonic::Status,
655        > {
656            self.inner
657                .ready()
658                .await
659                .map_err(|e| {
660                    tonic::Status::unknown(
661                        format!("Service was not ready: {}", e.into()),
662                    )
663                })?;
664            let codec = tonic::codec::ProstCodec::default();
665            let path = http::uri::PathAndQuery::from_static(
666                "/com.coralogixapis.slo.v1.SlosService/ListSlos",
667            );
668            let mut req = request.into_request();
669            req.extensions_mut()
670                .insert(
671                    GrpcMethod::new("com.coralogixapis.slo.v1.SlosService", "ListSlos"),
672                );
673            self.inner.unary(req, path, codec).await
674        }
675        pub async fn batch_get_slos(
676            &mut self,
677            request: impl tonic::IntoRequest<super::BatchGetSlosRequest>,
678        ) -> std::result::Result<
679            tonic::Response<super::BatchGetSlosResponse>,
680            tonic::Status,
681        > {
682            self.inner
683                .ready()
684                .await
685                .map_err(|e| {
686                    tonic::Status::unknown(
687                        format!("Service was not ready: {}", e.into()),
688                    )
689                })?;
690            let codec = tonic::codec::ProstCodec::default();
691            let path = http::uri::PathAndQuery::from_static(
692                "/com.coralogixapis.slo.v1.SlosService/BatchGetSlos",
693            );
694            let mut req = request.into_request();
695            req.extensions_mut()
696                .insert(
697                    GrpcMethod::new(
698                        "com.coralogixapis.slo.v1.SlosService",
699                        "BatchGetSlos",
700                    ),
701                );
702            self.inner.unary(req, path, codec).await
703        }
704        pub async fn batch_execute_slo(
705            &mut self,
706            request: impl tonic::IntoRequest<super::BatchExecuteSloRequest>,
707        ) -> std::result::Result<
708            tonic::Response<super::BatchExecuteSloResponse>,
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.coralogixapis.slo.v1.SlosService/BatchExecuteSlo",
722            );
723            let mut req = request.into_request();
724            req.extensions_mut()
725                .insert(
726                    GrpcMethod::new(
727                        "com.coralogixapis.slo.v1.SlosService",
728                        "BatchExecuteSlo",
729                    ),
730                );
731            self.inner.unary(req, path, codec).await
732        }
733    }
734}