1#[derive(serde::Serialize, serde::Deserialize)]
3#[serde(rename_all = "snake_case")]
4#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5pub struct Team {
6 #[prost(message, optional, tag = "2")]
7 pub id: ::core::option::Option<u64>,
8}
9#[derive(serde::Serialize, serde::Deserialize)]
10#[serde(rename_all = "snake_case")]
11#[derive(Clone, Copy, PartialEq, ::prost::Message)]
12pub struct DateRange {
13 #[prost(message, optional, tag = "1")]
14 pub from_date: ::core::option::Option<::prost_wkt_types::Timestamp>,
15 #[prost(message, optional, tag = "2")]
16 pub to_date: ::core::option::Option<::prost_wkt_types::Timestamp>,
17}
18#[derive(serde::Serialize, serde::Deserialize)]
19#[serde(rename_all = "snake_case")]
20#[derive(Clone, PartialEq, ::prost::Message)]
21pub struct GenericDimension {
22 #[prost(string, tag = "1")]
23 pub key: ::prost::alloc::string::String,
24 #[prost(string, tag = "2")]
25 pub value: ::prost::alloc::string::String,
26}
27#[derive(serde::Serialize, serde::Deserialize)]
28#[serde(rename_all = "snake_case")]
29#[derive(Clone, PartialEq, ::prost::Message)]
30pub struct Dimension {
31 #[prost(oneof = "dimension::Dimension", tags = "1, 2, 3, 4, 5")]
32 pub dimension: ::core::option::Option<dimension::Dimension>,
33}
34pub mod dimension {
36 #[derive(serde::Serialize, serde::Deserialize)]
37 #[serde(rename_all = "snake_case")]
38 #[derive(Clone, PartialEq, ::prost::Oneof)]
39 pub enum Dimension {
40 #[prost(enumeration = "super::Pillar", tag = "1")]
41 Pillar(i32),
42 #[prost(message, tag = "2")]
43 GenericDimension(super::GenericDimension),
44 #[prost(enumeration = "super::TcoTier", tag = "3")]
45 Tier(i32),
46 #[prost(enumeration = "super::Severity", tag = "4")]
47 Severity(i32),
48 #[prost(enumeration = "super::Priority", tag = "5")]
49 Priority(i32),
50 }
51}
52#[derive(serde::Serialize, serde::Deserialize)]
53#[serde(rename_all = "snake_case")]
54#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
55#[repr(i32)]
56pub enum Pillar {
57 Unspecified = 0,
58 Metrics = 1,
59 Logs = 2,
60 Spans = 3,
61 Binary = 4,
62}
63impl Pillar {
64 pub fn as_str_name(&self) -> &'static str {
69 match self {
70 Self::Unspecified => "PILLAR_UNSPECIFIED",
71 Self::Metrics => "PILLAR_METRICS",
72 Self::Logs => "PILLAR_LOGS",
73 Self::Spans => "PILLAR_SPANS",
74 Self::Binary => "PILLAR_BINARY",
75 }
76 }
77 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
79 match value {
80 "PILLAR_UNSPECIFIED" => Some(Self::Unspecified),
81 "PILLAR_METRICS" => Some(Self::Metrics),
82 "PILLAR_LOGS" => Some(Self::Logs),
83 "PILLAR_SPANS" => Some(Self::Spans),
84 "PILLAR_BINARY" => Some(Self::Binary),
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 TcoTier {
94 Unspecified = 0,
95 Low = 1,
96 Medium = 2,
97 High = 3,
98 Blocked = 4,
99}
100impl TcoTier {
101 pub fn as_str_name(&self) -> &'static str {
106 match self {
107 Self::Unspecified => "TCO_TIER_UNSPECIFIED",
108 Self::Low => "TCO_TIER_LOW",
109 Self::Medium => "TCO_TIER_MEDIUM",
110 Self::High => "TCO_TIER_HIGH",
111 Self::Blocked => "TCO_TIER_BLOCKED",
112 }
113 }
114 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
116 match value {
117 "TCO_TIER_UNSPECIFIED" => Some(Self::Unspecified),
118 "TCO_TIER_LOW" => Some(Self::Low),
119 "TCO_TIER_MEDIUM" => Some(Self::Medium),
120 "TCO_TIER_HIGH" => Some(Self::High),
121 "TCO_TIER_BLOCKED" => Some(Self::Blocked),
122 _ => None,
123 }
124 }
125}
126#[derive(serde::Serialize, serde::Deserialize)]
127#[serde(rename_all = "snake_case")]
128#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
129#[repr(i32)]
130pub enum Priority {
131 Unspecified = 0,
132 Low = 1,
133 Medium = 2,
134 High = 3,
135 Blocked = 4,
136}
137impl Priority {
138 pub fn as_str_name(&self) -> &'static str {
143 match self {
144 Self::Unspecified => "PRIORITY_UNSPECIFIED",
145 Self::Low => "PRIORITY_LOW",
146 Self::Medium => "PRIORITY_MEDIUM",
147 Self::High => "PRIORITY_HIGH",
148 Self::Blocked => "PRIORITY_BLOCKED",
149 }
150 }
151 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
153 match value {
154 "PRIORITY_UNSPECIFIED" => Some(Self::Unspecified),
155 "PRIORITY_LOW" => Some(Self::Low),
156 "PRIORITY_MEDIUM" => Some(Self::Medium),
157 "PRIORITY_HIGH" => Some(Self::High),
158 "PRIORITY_BLOCKED" => Some(Self::Blocked),
159 _ => None,
160 }
161 }
162}
163#[derive(serde::Serialize, serde::Deserialize)]
164#[serde(rename_all = "snake_case")]
165#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
166#[repr(i32)]
167pub enum Severity {
168 Unspecified = 0,
169 Debug = 1,
170 Verbose = 2,
171 Info = 3,
172 Warning = 4,
173 Error = 5,
174 Critical = 6,
175}
176impl Severity {
177 pub fn as_str_name(&self) -> &'static str {
182 match self {
183 Self::Unspecified => "SEVERITY_UNSPECIFIED",
184 Self::Debug => "SEVERITY_DEBUG",
185 Self::Verbose => "SEVERITY_VERBOSE",
186 Self::Info => "SEVERITY_INFO",
187 Self::Warning => "SEVERITY_WARNING",
188 Self::Error => "SEVERITY_ERROR",
189 Self::Critical => "SEVERITY_CRITICAL",
190 }
191 }
192 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
194 match value {
195 "SEVERITY_UNSPECIFIED" => Some(Self::Unspecified),
196 "SEVERITY_DEBUG" => Some(Self::Debug),
197 "SEVERITY_VERBOSE" => Some(Self::Verbose),
198 "SEVERITY_INFO" => Some(Self::Info),
199 "SEVERITY_WARNING" => Some(Self::Warning),
200 "SEVERITY_ERROR" => Some(Self::Error),
201 "SEVERITY_CRITICAL" => Some(Self::Critical),
202 _ => None,
203 }
204 }
205}
206#[derive(serde::Serialize, serde::Deserialize)]
207#[serde(rename_all = "snake_case")]
208#[derive(Clone, PartialEq, ::prost::Message)]
209pub struct GetTeamDetailedDataUsageRequest {
210 #[prost(message, optional, tag = "2")]
212 pub date_range: ::core::option::Option<DateRange>,
213 #[prost(message, optional, tag = "3")]
221 pub resolution: ::core::option::Option<::prost_wkt_types::Duration>,
222 #[prost(enumeration = "AggregateBy", repeated, tag = "4")]
225 pub aggregate: ::prost::alloc::vec::Vec<i32>,
226}
227#[derive(serde::Serialize, serde::Deserialize)]
228#[serde(rename_all = "snake_case")]
229#[derive(Clone, PartialEq, ::prost::Message)]
230pub struct GetTeamDetailedDataUsageResponse {
231 #[prost(message, optional, tag = "1")]
232 pub timestamp: ::core::option::Option<::prost_wkt_types::Timestamp>,
233 #[prost(message, optional, tag = "2")]
234 pub size_gb: ::core::option::Option<f32>,
235 #[prost(message, optional, tag = "3")]
236 pub units: ::core::option::Option<f32>,
237 #[prost(message, repeated, tag = "4")]
238 pub dimensions: ::prost::alloc::vec::Vec<Dimension>,
239}
240#[derive(serde::Serialize, serde::Deserialize)]
241#[serde(rename_all = "snake_case")]
242#[derive(Clone, PartialEq, ::prost::Message)]
243pub struct GetSpansCountRequest {
244 #[prost(message, optional, tag = "1")]
245 pub date_range: ::core::option::Option<DateRange>,
246 #[prost(message, optional, tag = "2")]
250 pub resolution: ::core::option::Option<::prost_wkt_types::Duration>,
251 #[prost(message, optional, tag = "3")]
254 pub filters: ::core::option::Option<ScopesFilter>,
255}
256#[derive(serde::Serialize, serde::Deserialize)]
257#[serde(rename_all = "snake_case")]
258#[derive(Clone, PartialEq, ::prost::Message)]
259pub struct ScopesFilter {
260 #[prost(string, repeated, tag = "1")]
261 pub application: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
262 #[prost(string, repeated, tag = "2")]
263 pub subsystem: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
264}
265#[derive(serde::Serialize, serde::Deserialize)]
266#[serde(rename_all = "snake_case")]
267#[derive(Clone, Copy, PartialEq, ::prost::Message)]
268pub struct SpansCount {
269 #[prost(message, optional, tag = "1")]
270 pub timestamp: ::core::option::Option<::prost_wkt_types::Timestamp>,
271 #[prost(message, optional, tag = "2")]
272 pub success_span_count: ::core::option::Option<i64>,
273 #[prost(message, optional, tag = "3")]
274 pub error_span_count: ::core::option::Option<i64>,
275 #[prost(message, optional, tag = "4")]
276 pub low_success_span_count: ::core::option::Option<i64>,
277 #[prost(message, optional, tag = "5")]
278 pub low_error_span_count: ::core::option::Option<i64>,
279}
280#[derive(serde::Serialize, serde::Deserialize)]
281#[serde(rename_all = "snake_case")]
282#[derive(Clone, PartialEq, ::prost::Message)]
283pub struct GetSpansCountResponse {
284 #[prost(message, repeated, tag = "1")]
285 pub spans_count: ::prost::alloc::vec::Vec<SpansCount>,
286}
287#[derive(serde::Serialize, serde::Deserialize)]
288#[serde(rename_all = "snake_case")]
289#[derive(Clone, PartialEq, ::prost::Message)]
290pub struct GetLogsCountRequest {
291 #[prost(message, optional, tag = "1")]
292 pub date_range: ::core::option::Option<DateRange>,
293 #[prost(message, optional, tag = "2")]
297 pub resolution: ::core::option::Option<::prost_wkt_types::Duration>,
298 #[prost(message, optional, tag = "3")]
301 pub filters: ::core::option::Option<ScopesFilter>,
302}
303#[derive(serde::Serialize, serde::Deserialize)]
304#[serde(rename_all = "snake_case")]
305#[derive(Clone, Copy, PartialEq, ::prost::Message)]
306pub struct LogsCount {
307 #[prost(message, optional, tag = "1")]
308 pub timestamp: ::core::option::Option<::prost_wkt_types::Timestamp>,
309 #[prost(uint64, tag = "2")]
310 pub logs_count: u64,
311 #[prost(enumeration = "Severity", tag = "3")]
312 pub severity: i32,
313 #[prost(enumeration = "Priority", tag = "4")]
314 pub priority: i32,
315}
316#[derive(serde::Serialize, serde::Deserialize)]
317#[serde(rename_all = "snake_case")]
318#[derive(Clone, PartialEq, ::prost::Message)]
319pub struct GetLogsCountResponse {
320 #[prost(message, repeated, tag = "1")]
321 pub logs_count: ::prost::alloc::vec::Vec<LogsCount>,
322}
323#[derive(serde::Serialize, serde::Deserialize)]
324#[serde(rename_all = "snake_case")]
325#[derive(Clone, Copy, PartialEq, ::prost::Message)]
326pub struct GetDataUsageMetricsExportStatusRequest {}
327#[derive(serde::Serialize, serde::Deserialize)]
328#[serde(rename_all = "snake_case")]
329#[derive(Clone, Copy, PartialEq, ::prost::Message)]
330pub struct GetDataUsageMetricsExportStatusResponse {
331 #[prost(bool, tag = "1")]
332 pub enabled: bool,
333}
334#[derive(serde::Serialize, serde::Deserialize)]
335#[serde(rename_all = "snake_case")]
336#[derive(Clone, Copy, PartialEq, ::prost::Message)]
337pub struct UpdateDataUsageMetricsExportStatusRequest {
338 #[prost(bool, tag = "3")]
339 pub enabled: bool,
340}
341#[derive(serde::Serialize, serde::Deserialize)]
342#[serde(rename_all = "snake_case")]
343#[derive(Clone, Copy, PartialEq, ::prost::Message)]
344pub struct UpdateDataUsageMetricsExportStatusResponse {
345 #[prost(bool, tag = "1")]
346 pub enabled: bool,
347}
348#[derive(serde::Serialize, serde::Deserialize)]
349#[serde(rename_all = "snake_case")]
350#[derive(Clone, PartialEq, ::prost::Message)]
351pub struct GetDataUsageRequest {
352 #[prost(message, optional, tag = "1")]
354 pub date_range: ::core::option::Option<DateRange>,
355 #[prost(message, optional, tag = "2")]
363 pub resolution: ::core::option::Option<::prost_wkt_types::Duration>,
364 #[prost(enumeration = "AggregateBy", repeated, tag = "3")]
367 pub aggregate: ::prost::alloc::vec::Vec<i32>,
368 #[prost(message, repeated, tag = "4")]
373 pub dimension_filters: ::prost::alloc::vec::Vec<Dimension>,
374}
375#[derive(serde::Serialize, serde::Deserialize)]
376#[serde(rename_all = "snake_case")]
377#[derive(Clone, PartialEq, ::prost::Message)]
378pub struct DataUsageEntry {
379 #[prost(message, optional, tag = "1")]
380 pub timestamp: ::core::option::Option<::prost_wkt_types::Timestamp>,
381 #[prost(float, tag = "2")]
382 pub size_gb: f32,
383 #[prost(float, tag = "3")]
384 pub units: f32,
385 #[prost(message, repeated, tag = "4")]
386 pub dimensions: ::prost::alloc::vec::Vec<Dimension>,
387}
388#[derive(serde::Serialize, serde::Deserialize)]
389#[serde(rename_all = "snake_case")]
390#[derive(Clone, PartialEq, ::prost::Message)]
391pub struct GetDataUsageResponse {
392 #[prost(message, repeated, tag = "1")]
393 pub entries: ::prost::alloc::vec::Vec<DataUsageEntry>,
394}
395#[derive(serde::Serialize, serde::Deserialize)]
396#[serde(rename_all = "snake_case")]
397#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
398#[repr(i32)]
399pub enum AggregateBy {
400 Unspecified = 0,
401 Application = 1,
402 Subsystem = 2,
403 Pillar = 3,
404 Priority = 4,
405}
406impl AggregateBy {
407 pub fn as_str_name(&self) -> &'static str {
412 match self {
413 Self::Unspecified => "AGGREGATE_BY_UNSPECIFIED",
414 Self::Application => "AGGREGATE_BY_APPLICATION",
415 Self::Subsystem => "AGGREGATE_BY_SUBSYSTEM",
416 Self::Pillar => "AGGREGATE_BY_PILLAR",
417 Self::Priority => "AGGREGATE_BY_PRIORITY",
418 }
419 }
420 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
422 match value {
423 "AGGREGATE_BY_UNSPECIFIED" => Some(Self::Unspecified),
424 "AGGREGATE_BY_APPLICATION" => Some(Self::Application),
425 "AGGREGATE_BY_SUBSYSTEM" => Some(Self::Subsystem),
426 "AGGREGATE_BY_PILLAR" => Some(Self::Pillar),
427 "AGGREGATE_BY_PRIORITY" => Some(Self::Priority),
428 _ => None,
429 }
430 }
431}
432pub mod data_usage_service_client {
434 #![allow(
435 unused_variables,
436 dead_code,
437 missing_docs,
438 clippy::wildcard_imports,
439 clippy::let_unit_value,
440 )]
441 use tonic::codegen::*;
442 use tonic::codegen::http::Uri;
443 #[derive(Debug, Clone)]
444 pub struct DataUsageServiceClient<T> {
445 inner: tonic::client::Grpc<T>,
446 }
447 impl DataUsageServiceClient<tonic::transport::Channel> {
448 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
450 where
451 D: TryInto<tonic::transport::Endpoint>,
452 D::Error: Into<StdError>,
453 {
454 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
455 Ok(Self::new(conn))
456 }
457 }
458 impl<T> DataUsageServiceClient<T>
459 where
460 T: tonic::client::GrpcService<tonic::body::BoxBody>,
461 T::Error: Into<StdError>,
462 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
463 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
464 {
465 pub fn new(inner: T) -> Self {
466 let inner = tonic::client::Grpc::new(inner);
467 Self { inner }
468 }
469 pub fn with_origin(inner: T, origin: Uri) -> Self {
470 let inner = tonic::client::Grpc::with_origin(inner, origin);
471 Self { inner }
472 }
473 pub fn with_interceptor<F>(
474 inner: T,
475 interceptor: F,
476 ) -> DataUsageServiceClient<InterceptedService<T, F>>
477 where
478 F: tonic::service::Interceptor,
479 T::ResponseBody: Default,
480 T: tonic::codegen::Service<
481 http::Request<tonic::body::BoxBody>,
482 Response = http::Response<
483 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
484 >,
485 >,
486 <T as tonic::codegen::Service<
487 http::Request<tonic::body::BoxBody>,
488 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
489 {
490 DataUsageServiceClient::new(InterceptedService::new(inner, interceptor))
491 }
492 #[must_use]
497 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
498 self.inner = self.inner.send_compressed(encoding);
499 self
500 }
501 #[must_use]
503 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
504 self.inner = self.inner.accept_compressed(encoding);
505 self
506 }
507 #[must_use]
511 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
512 self.inner = self.inner.max_decoding_message_size(limit);
513 self
514 }
515 #[must_use]
519 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
520 self.inner = self.inner.max_encoding_message_size(limit);
521 self
522 }
523 #[deprecated]
525 pub async fn get_team_detailed_data_usage(
526 &mut self,
527 request: impl tonic::IntoRequest<super::GetTeamDetailedDataUsageRequest>,
528 ) -> std::result::Result<
529 tonic::Response<
530 tonic::codec::Streaming<super::GetTeamDetailedDataUsageResponse>,
531 >,
532 tonic::Status,
533 > {
534 self.inner
535 .ready()
536 .await
537 .map_err(|e| {
538 tonic::Status::unknown(
539 format!("Service was not ready: {}", e.into()),
540 )
541 })?;
542 let codec = tonic::codec::ProstCodec::default();
543 let path = http::uri::PathAndQuery::from_static(
544 "/com.coralogix.datausage.v2.DataUsageService/GetTeamDetailedDataUsage",
545 );
546 let mut req = request.into_request();
547 req.extensions_mut()
548 .insert(
549 GrpcMethod::new(
550 "com.coralogix.datausage.v2.DataUsageService",
551 "GetTeamDetailedDataUsage",
552 ),
553 );
554 self.inner.server_streaming(req, path, codec).await
555 }
556 pub async fn get_spans_count(
557 &mut self,
558 request: impl tonic::IntoRequest<super::GetSpansCountRequest>,
559 ) -> std::result::Result<
560 tonic::Response<tonic::codec::Streaming<super::GetSpansCountResponse>>,
561 tonic::Status,
562 > {
563 self.inner
564 .ready()
565 .await
566 .map_err(|e| {
567 tonic::Status::unknown(
568 format!("Service was not ready: {}", e.into()),
569 )
570 })?;
571 let codec = tonic::codec::ProstCodec::default();
572 let path = http::uri::PathAndQuery::from_static(
573 "/com.coralogix.datausage.v2.DataUsageService/GetSpansCount",
574 );
575 let mut req = request.into_request();
576 req.extensions_mut()
577 .insert(
578 GrpcMethod::new(
579 "com.coralogix.datausage.v2.DataUsageService",
580 "GetSpansCount",
581 ),
582 );
583 self.inner.server_streaming(req, path, codec).await
584 }
585 pub async fn get_logs_count(
586 &mut self,
587 request: impl tonic::IntoRequest<super::GetLogsCountRequest>,
588 ) -> std::result::Result<
589 tonic::Response<tonic::codec::Streaming<super::GetLogsCountResponse>>,
590 tonic::Status,
591 > {
592 self.inner
593 .ready()
594 .await
595 .map_err(|e| {
596 tonic::Status::unknown(
597 format!("Service was not ready: {}", e.into()),
598 )
599 })?;
600 let codec = tonic::codec::ProstCodec::default();
601 let path = http::uri::PathAndQuery::from_static(
602 "/com.coralogix.datausage.v2.DataUsageService/GetLogsCount",
603 );
604 let mut req = request.into_request();
605 req.extensions_mut()
606 .insert(
607 GrpcMethod::new(
608 "com.coralogix.datausage.v2.DataUsageService",
609 "GetLogsCount",
610 ),
611 );
612 self.inner.server_streaming(req, path, codec).await
613 }
614 pub async fn get_data_usage_metrics_export_status(
615 &mut self,
616 request: impl tonic::IntoRequest<
617 super::GetDataUsageMetricsExportStatusRequest,
618 >,
619 ) -> std::result::Result<
620 tonic::Response<super::GetDataUsageMetricsExportStatusResponse>,
621 tonic::Status,
622 > {
623 self.inner
624 .ready()
625 .await
626 .map_err(|e| {
627 tonic::Status::unknown(
628 format!("Service was not ready: {}", e.into()),
629 )
630 })?;
631 let codec = tonic::codec::ProstCodec::default();
632 let path = http::uri::PathAndQuery::from_static(
633 "/com.coralogix.datausage.v2.DataUsageService/GetDataUsageMetricsExportStatus",
634 );
635 let mut req = request.into_request();
636 req.extensions_mut()
637 .insert(
638 GrpcMethod::new(
639 "com.coralogix.datausage.v2.DataUsageService",
640 "GetDataUsageMetricsExportStatus",
641 ),
642 );
643 self.inner.unary(req, path, codec).await
644 }
645 pub async fn update_data_usage_metrics_export_status(
646 &mut self,
647 request: impl tonic::IntoRequest<
648 super::UpdateDataUsageMetricsExportStatusRequest,
649 >,
650 ) -> std::result::Result<
651 tonic::Response<super::UpdateDataUsageMetricsExportStatusResponse>,
652 tonic::Status,
653 > {
654 self.inner
655 .ready()
656 .await
657 .map_err(|e| {
658 tonic::Status::unknown(
659 format!("Service was not ready: {}", e.into()),
660 )
661 })?;
662 let codec = tonic::codec::ProstCodec::default();
663 let path = http::uri::PathAndQuery::from_static(
664 "/com.coralogix.datausage.v2.DataUsageService/UpdateDataUsageMetricsExportStatus",
665 );
666 let mut req = request.into_request();
667 req.extensions_mut()
668 .insert(
669 GrpcMethod::new(
670 "com.coralogix.datausage.v2.DataUsageService",
671 "UpdateDataUsageMetricsExportStatus",
672 ),
673 );
674 self.inner.unary(req, path, codec).await
675 }
676 pub async fn get_data_usage(
677 &mut self,
678 request: impl tonic::IntoRequest<super::GetDataUsageRequest>,
679 ) -> std::result::Result<
680 tonic::Response<tonic::codec::Streaming<super::GetDataUsageResponse>>,
681 tonic::Status,
682 > {
683 self.inner
684 .ready()
685 .await
686 .map_err(|e| {
687 tonic::Status::unknown(
688 format!("Service was not ready: {}", e.into()),
689 )
690 })?;
691 let codec = tonic::codec::ProstCodec::default();
692 let path = http::uri::PathAndQuery::from_static(
693 "/com.coralogix.datausage.v2.DataUsageService/GetDataUsage",
694 );
695 let mut req = request.into_request();
696 req.extensions_mut()
697 .insert(
698 GrpcMethod::new(
699 "com.coralogix.datausage.v2.DataUsageService",
700 "GetDataUsage",
701 ),
702 );
703 self.inner.server_streaming(req, path, codec).await
704 }
705 }
706}