1#[allow(clippy::derive_partial_eq_without_eq)]
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct LogEntryResource {
7 #[prost(string, tag = "1")]
9 pub r#type: ::prost::alloc::string::String,
10 #[prost(string, tag = "2")]
12 pub id: ::prost::alloc::string::String,
13}
14#[allow(clippy::derive_partial_eq_without_eq)]
16#[derive(Clone, PartialEq, ::prost::Message)]
17pub struct LogGroupResource {
18 #[prost(string, tag = "1")]
22 pub r#type: ::prost::alloc::string::String,
23 #[prost(string, repeated, tag = "2")]
25 pub ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
26}
27#[allow(clippy::derive_partial_eq_without_eq)]
28#[derive(Clone, PartialEq, ::prost::Message)]
29pub struct LogEntry {
30 #[prost(string, tag = "1")]
34 pub uid: ::prost::alloc::string::String,
35 #[prost(message, optional, tag = "2")]
40 pub resource: ::core::option::Option<LogEntryResource>,
41 #[prost(message, optional, tag = "3")]
43 pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
44 #[prost(message, optional, tag = "4")]
46 pub ingested_at: ::core::option::Option<::prost_types::Timestamp>,
47 #[prost(message, optional, tag = "5")]
51 pub saved_at: ::core::option::Option<::prost_types::Timestamp>,
52 #[prost(enumeration = "log_level::Level", tag = "6")]
56 pub level: i32,
57 #[prost(string, tag = "7")]
59 pub message: ::prost::alloc::string::String,
60 #[prost(message, optional, tag = "8")]
62 pub json_payload: ::core::option::Option<::prost_types::Struct>,
63 #[prost(string, tag = "9")]
65 pub stream_name: ::prost::alloc::string::String,
66}
67#[allow(clippy::derive_partial_eq_without_eq)]
68#[derive(Clone, PartialEq, ::prost::Message)]
69pub struct IncomingLogEntry {
70 #[prost(message, optional, tag = "1")]
72 pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
73 #[prost(enumeration = "log_level::Level", tag = "2")]
77 pub level: i32,
78 #[prost(string, tag = "3")]
80 pub message: ::prost::alloc::string::String,
81 #[prost(message, optional, tag = "4")]
83 pub json_payload: ::core::option::Option<::prost_types::Struct>,
84 #[prost(string, tag = "5")]
86 pub stream_name: ::prost::alloc::string::String,
87}
88#[allow(clippy::derive_partial_eq_without_eq)]
89#[derive(Clone, PartialEq, ::prost::Message)]
90pub struct LogEntryDefaults {
91 #[prost(enumeration = "log_level::Level", tag = "2")]
96 pub level: i32,
97 #[prost(message, optional, tag = "4")]
101 pub json_payload: ::core::option::Option<::prost_types::Struct>,
102 #[prost(string, tag = "5")]
104 pub stream_name: ::prost::alloc::string::String,
105}
106#[allow(clippy::derive_partial_eq_without_eq)]
107#[derive(Clone, PartialEq, ::prost::Message)]
108pub struct Destination {
109 #[prost(oneof = "destination::Destination", tags = "1, 2")]
111 pub destination: ::core::option::Option<destination::Destination>,
112}
113pub mod destination {
115 #[allow(clippy::derive_partial_eq_without_eq)]
117 #[derive(Clone, PartialEq, ::prost::Oneof)]
118 pub enum Destination {
119 #[prost(string, tag = "1")]
121 LogGroupId(::prost::alloc::string::String),
122 #[prost(string, tag = "2")]
124 FolderId(::prost::alloc::string::String),
125 }
126}
127#[allow(clippy::derive_partial_eq_without_eq)]
128#[derive(Clone, PartialEq, ::prost::Message)]
129pub struct LogLevel {
130 #[prost(enumeration = "log_level::Level", tag = "1")]
134 pub level: i32,
135}
136pub mod log_level {
138 #[derive(
140 Clone,
141 Copy,
142 Debug,
143 PartialEq,
144 Eq,
145 Hash,
146 PartialOrd,
147 Ord,
148 ::prost::Enumeration
149 )]
150 #[repr(i32)]
151 pub enum Level {
152 Unspecified = 0,
156 Trace = 1,
160 Debug = 2,
164 Info = 3,
168 Warn = 4,
172 Error = 5,
176 Fatal = 6,
180 }
181 impl Level {
182 pub fn as_str_name(&self) -> &'static str {
187 match self {
188 Level::Unspecified => "LEVEL_UNSPECIFIED",
189 Level::Trace => "TRACE",
190 Level::Debug => "DEBUG",
191 Level::Info => "INFO",
192 Level::Warn => "WARN",
193 Level::Error => "ERROR",
194 Level::Fatal => "FATAL",
195 }
196 }
197 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
199 match value {
200 "LEVEL_UNSPECIFIED" => Some(Self::Unspecified),
201 "TRACE" => Some(Self::Trace),
202 "DEBUG" => Some(Self::Debug),
203 "INFO" => Some(Self::Info),
204 "WARN" => Some(Self::Warn),
205 "ERROR" => Some(Self::Error),
206 "FATAL" => Some(Self::Fatal),
207 _ => None,
208 }
209 }
210 }
211}
212#[allow(clippy::derive_partial_eq_without_eq)]
213#[derive(Clone, PartialEq, ::prost::Message)]
214pub struct Export {
215 #[prost(string, tag = "1")]
217 pub id: ::prost::alloc::string::String,
218 #[prost(string, tag = "2")]
220 pub folder_id: ::prost::alloc::string::String,
221 #[prost(string, tag = "3")]
223 pub cloud_id: ::prost::alloc::string::String,
224 #[prost(message, optional, tag = "4")]
226 pub created_at: ::core::option::Option<::prost_types::Timestamp>,
227 #[prost(string, tag = "5")]
229 pub name: ::prost::alloc::string::String,
230 #[prost(string, tag = "6")]
232 pub description: ::prost::alloc::string::String,
233 #[prost(map = "string, string", tag = "7")]
235 pub labels: ::std::collections::HashMap<
236 ::prost::alloc::string::String,
237 ::prost::alloc::string::String,
238 >,
239 #[prost(string, tag = "8")]
241 pub group_id: ::prost::alloc::string::String,
242 #[prost(string, tag = "9")]
244 pub sink_id: ::prost::alloc::string::String,
245 #[prost(message, optional, tag = "10")]
247 pub params: ::core::option::Option<ExportParams>,
248}
249#[allow(clippy::derive_partial_eq_without_eq)]
250#[derive(Clone, PartialEq, ::prost::Message)]
251pub struct ExportParams {
252 #[prost(string, repeated, tag = "1")]
253 pub resource_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
254 #[prost(string, repeated, tag = "2")]
255 pub resource_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
256 #[prost(string, repeated, tag = "3")]
257 pub stream_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
258 #[prost(enumeration = "log_level::Level", repeated, packed = "false", tag = "4")]
259 pub levels: ::prost::alloc::vec::Vec<i32>,
260 #[prost(string, tag = "5")]
261 pub filter: ::prost::alloc::string::String,
262}
263#[allow(clippy::derive_partial_eq_without_eq)]
264#[derive(Clone, PartialEq, ::prost::Message)]
265pub struct RunExportRequest {
266 #[prost(string, tag = "1")]
267 pub group_id: ::prost::alloc::string::String,
268 #[prost(string, tag = "2")]
269 pub sink_id: ::prost::alloc::string::String,
270 #[prost(message, optional, tag = "3")]
271 pub params: ::core::option::Option<ExportParams>,
272 #[prost(string, tag = "4")]
273 pub result_filename: ::prost::alloc::string::String,
274 #[prost(message, optional, tag = "5")]
275 pub since: ::core::option::Option<::prost_types::Timestamp>,
276 #[prost(message, optional, tag = "6")]
277 pub until: ::core::option::Option<::prost_types::Timestamp>,
278}
279#[allow(clippy::derive_partial_eq_without_eq)]
280#[derive(Clone, PartialEq, ::prost::Message)]
281pub struct RunExportDetails {
282 #[prost(string, tag = "1")]
283 pub group_id: ::prost::alloc::string::String,
284 #[prost(string, tag = "2")]
285 pub sink_id: ::prost::alloc::string::String,
286 #[prost(message, optional, tag = "3")]
287 pub params: ::core::option::Option<ExportParams>,
288 #[prost(string, tag = "4")]
289 pub result_filename: ::prost::alloc::string::String,
290 #[prost(message, optional, tag = "5")]
291 pub since: ::core::option::Option<::prost_types::Timestamp>,
292 #[prost(message, optional, tag = "6")]
293 pub until: ::core::option::Option<::prost_types::Timestamp>,
294}
295#[allow(clippy::derive_partial_eq_without_eq)]
296#[derive(Clone, PartialEq, ::prost::Message)]
297pub struct RunExportMetadata {
298 #[prost(string, tag = "1")]
299 pub group_id: ::prost::alloc::string::String,
300 #[prost(string, tag = "2")]
301 pub sink_id: ::prost::alloc::string::String,
302 #[prost(string, tag = "3")]
303 pub result_filename: ::prost::alloc::string::String,
304}
305#[allow(clippy::derive_partial_eq_without_eq)]
306#[derive(Clone, PartialEq, ::prost::Message)]
307pub struct GetExportRequest {
308 #[prost(string, tag = "1")]
312 pub export_id: ::prost::alloc::string::String,
313}
314#[allow(clippy::derive_partial_eq_without_eq)]
315#[derive(Clone, PartialEq, ::prost::Message)]
316pub struct ListExportsRequest {
317 #[prost(string, tag = "1")]
321 pub folder_id: ::prost::alloc::string::String,
322 #[prost(int64, tag = "3")]
328 pub page_size: i64,
329 #[prost(string, tag = "4")]
332 pub page_token: ::prost::alloc::string::String,
333 #[prost(string, tag = "5")]
341 pub filter: ::prost::alloc::string::String,
342}
343#[allow(clippy::derive_partial_eq_without_eq)]
344#[derive(Clone, PartialEq, ::prost::Message)]
345pub struct ListExportsResponse {
346 #[prost(message, repeated, tag = "1")]
348 pub exports: ::prost::alloc::vec::Vec<Export>,
349 #[prost(string, tag = "2")]
355 pub next_page_token: ::prost::alloc::string::String,
356}
357#[allow(clippy::derive_partial_eq_without_eq)]
358#[derive(Clone, PartialEq, ::prost::Message)]
359pub struct CreateExportRequest {
360 #[prost(string, tag = "1")]
364 pub folder_id: ::prost::alloc::string::String,
365 #[prost(string, tag = "2")]
368 pub name: ::prost::alloc::string::String,
369 #[prost(string, tag = "3")]
371 pub description: ::prost::alloc::string::String,
372 #[prost(map = "string, string", tag = "4")]
374 pub labels: ::std::collections::HashMap<
375 ::prost::alloc::string::String,
376 ::prost::alloc::string::String,
377 >,
378 #[prost(string, tag = "5")]
380 pub group_id: ::prost::alloc::string::String,
381 #[prost(string, tag = "6")]
383 pub sink_id: ::prost::alloc::string::String,
384 #[prost(message, optional, tag = "7")]
386 pub params: ::core::option::Option<ExportParams>,
387}
388#[allow(clippy::derive_partial_eq_without_eq)]
389#[derive(Clone, PartialEq, ::prost::Message)]
390pub struct CreateExportMetadata {
391 #[prost(string, tag = "1")]
393 pub export_id: ::prost::alloc::string::String,
394}
395#[allow(clippy::derive_partial_eq_without_eq)]
396#[derive(Clone, PartialEq, ::prost::Message)]
397pub struct UpdateExportRequest {
398 #[prost(string, tag = "1")]
402 pub export_id: ::prost::alloc::string::String,
403 #[prost(message, optional, tag = "2")]
405 pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
406 #[prost(string, tag = "3")]
409 pub name: ::prost::alloc::string::String,
410 #[prost(string, tag = "4")]
412 pub description: ::prost::alloc::string::String,
413 #[prost(map = "string, string", tag = "5")]
415 pub labels: ::std::collections::HashMap<
416 ::prost::alloc::string::String,
417 ::prost::alloc::string::String,
418 >,
419 #[prost(string, tag = "6")]
421 pub group_id: ::prost::alloc::string::String,
422 #[prost(string, tag = "7")]
424 pub sink_id: ::prost::alloc::string::String,
425 #[prost(message, optional, tag = "8")]
427 pub params: ::core::option::Option<ExportParams>,
428}
429#[allow(clippy::derive_partial_eq_without_eq)]
430#[derive(Clone, PartialEq, ::prost::Message)]
431pub struct UpdateExportMetadata {
432 #[prost(string, tag = "1")]
434 pub export_id: ::prost::alloc::string::String,
435}
436#[allow(clippy::derive_partial_eq_without_eq)]
437#[derive(Clone, PartialEq, ::prost::Message)]
438pub struct DeleteExportRequest {
439 #[prost(string, tag = "1")]
443 pub export_id: ::prost::alloc::string::String,
444}
445#[allow(clippy::derive_partial_eq_without_eq)]
446#[derive(Clone, PartialEq, ::prost::Message)]
447pub struct DeleteExportMetadata {
448 #[prost(string, tag = "1")]
450 pub export_id: ::prost::alloc::string::String,
451}
452#[allow(clippy::derive_partial_eq_without_eq)]
453#[derive(Clone, PartialEq, ::prost::Message)]
454pub struct ListExportOperationsRequest {
455 #[prost(string, tag = "1")]
459 pub export_id: ::prost::alloc::string::String,
460 #[prost(int64, tag = "2")]
466 pub page_size: i64,
467 #[prost(string, tag = "3")]
470 pub page_token: ::prost::alloc::string::String,
471 #[prost(string, tag = "4")]
479 pub filter: ::prost::alloc::string::String,
480}
481#[allow(clippy::derive_partial_eq_without_eq)]
482#[derive(Clone, PartialEq, ::prost::Message)]
483pub struct ListExportOperationsResponse {
484 #[prost(message, repeated, tag = "1")]
486 pub operations: ::prost::alloc::vec::Vec<super::super::operation::Operation>,
487 #[prost(string, tag = "2")]
493 pub next_page_token: ::prost::alloc::string::String,
494}
495pub mod export_service_client {
497 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
498 use tonic::codegen::*;
499 use tonic::codegen::http::Uri;
500 #[derive(Debug, Clone)]
502 pub struct ExportServiceClient<T> {
503 inner: tonic::client::Grpc<T>,
504 }
505 impl ExportServiceClient<tonic::transport::Channel> {
506 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
508 where
509 D: TryInto<tonic::transport::Endpoint>,
510 D::Error: Into<StdError>,
511 {
512 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
513 Ok(Self::new(conn))
514 }
515 }
516 impl<T> ExportServiceClient<T>
517 where
518 T: tonic::client::GrpcService<tonic::body::BoxBody>,
519 T::Error: Into<StdError>,
520 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
521 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
522 {
523 pub fn new(inner: T) -> Self {
524 let inner = tonic::client::Grpc::new(inner);
525 Self { inner }
526 }
527 pub fn with_origin(inner: T, origin: Uri) -> Self {
528 let inner = tonic::client::Grpc::with_origin(inner, origin);
529 Self { inner }
530 }
531 pub fn with_interceptor<F>(
532 inner: T,
533 interceptor: F,
534 ) -> ExportServiceClient<InterceptedService<T, F>>
535 where
536 F: tonic::service::Interceptor,
537 T::ResponseBody: Default,
538 T: tonic::codegen::Service<
539 http::Request<tonic::body::BoxBody>,
540 Response = http::Response<
541 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
542 >,
543 >,
544 <T as tonic::codegen::Service<
545 http::Request<tonic::body::BoxBody>,
546 >>::Error: Into<StdError> + Send + Sync,
547 {
548 ExportServiceClient::new(InterceptedService::new(inner, interceptor))
549 }
550 #[must_use]
555 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
556 self.inner = self.inner.send_compressed(encoding);
557 self
558 }
559 #[must_use]
561 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
562 self.inner = self.inner.accept_compressed(encoding);
563 self
564 }
565 #[must_use]
569 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
570 self.inner = self.inner.max_decoding_message_size(limit);
571 self
572 }
573 #[must_use]
577 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
578 self.inner = self.inner.max_encoding_message_size(limit);
579 self
580 }
581 pub async fn run(
583 &mut self,
584 request: impl tonic::IntoRequest<super::RunExportRequest>,
585 ) -> std::result::Result<
586 tonic::Response<super::super::super::operation::Operation>,
587 tonic::Status,
588 > {
589 self.inner
590 .ready()
591 .await
592 .map_err(|e| {
593 tonic::Status::new(
594 tonic::Code::Unknown,
595 format!("Service was not ready: {}", e.into()),
596 )
597 })?;
598 let codec = tonic::codec::ProstCodec::default();
599 let path = http::uri::PathAndQuery::from_static(
600 "/yandex.cloud.logging.v1.ExportService/Run",
601 );
602 let mut req = request.into_request();
603 req.extensions_mut()
604 .insert(GrpcMethod::new("yandex.cloud.logging.v1.ExportService", "Run"));
605 self.inner.unary(req, path, codec).await
606 }
607 pub async fn get(
611 &mut self,
612 request: impl tonic::IntoRequest<super::GetExportRequest>,
613 ) -> std::result::Result<tonic::Response<super::Export>, tonic::Status> {
614 self.inner
615 .ready()
616 .await
617 .map_err(|e| {
618 tonic::Status::new(
619 tonic::Code::Unknown,
620 format!("Service was not ready: {}", e.into()),
621 )
622 })?;
623 let codec = tonic::codec::ProstCodec::default();
624 let path = http::uri::PathAndQuery::from_static(
625 "/yandex.cloud.logging.v1.ExportService/Get",
626 );
627 let mut req = request.into_request();
628 req.extensions_mut()
629 .insert(GrpcMethod::new("yandex.cloud.logging.v1.ExportService", "Get"));
630 self.inner.unary(req, path, codec).await
631 }
632 pub async fn list(
634 &mut self,
635 request: impl tonic::IntoRequest<super::ListExportsRequest>,
636 ) -> std::result::Result<
637 tonic::Response<super::ListExportsResponse>,
638 tonic::Status,
639 > {
640 self.inner
641 .ready()
642 .await
643 .map_err(|e| {
644 tonic::Status::new(
645 tonic::Code::Unknown,
646 format!("Service was not ready: {}", e.into()),
647 )
648 })?;
649 let codec = tonic::codec::ProstCodec::default();
650 let path = http::uri::PathAndQuery::from_static(
651 "/yandex.cloud.logging.v1.ExportService/List",
652 );
653 let mut req = request.into_request();
654 req.extensions_mut()
655 .insert(
656 GrpcMethod::new("yandex.cloud.logging.v1.ExportService", "List"),
657 );
658 self.inner.unary(req, path, codec).await
659 }
660 pub async fn create(
662 &mut self,
663 request: impl tonic::IntoRequest<super::CreateExportRequest>,
664 ) -> std::result::Result<
665 tonic::Response<super::super::super::operation::Operation>,
666 tonic::Status,
667 > {
668 self.inner
669 .ready()
670 .await
671 .map_err(|e| {
672 tonic::Status::new(
673 tonic::Code::Unknown,
674 format!("Service was not ready: {}", e.into()),
675 )
676 })?;
677 let codec = tonic::codec::ProstCodec::default();
678 let path = http::uri::PathAndQuery::from_static(
679 "/yandex.cloud.logging.v1.ExportService/Create",
680 );
681 let mut req = request.into_request();
682 req.extensions_mut()
683 .insert(
684 GrpcMethod::new("yandex.cloud.logging.v1.ExportService", "Create"),
685 );
686 self.inner.unary(req, path, codec).await
687 }
688 pub async fn update(
690 &mut self,
691 request: impl tonic::IntoRequest<super::UpdateExportRequest>,
692 ) -> std::result::Result<
693 tonic::Response<super::super::super::operation::Operation>,
694 tonic::Status,
695 > {
696 self.inner
697 .ready()
698 .await
699 .map_err(|e| {
700 tonic::Status::new(
701 tonic::Code::Unknown,
702 format!("Service was not ready: {}", e.into()),
703 )
704 })?;
705 let codec = tonic::codec::ProstCodec::default();
706 let path = http::uri::PathAndQuery::from_static(
707 "/yandex.cloud.logging.v1.ExportService/Update",
708 );
709 let mut req = request.into_request();
710 req.extensions_mut()
711 .insert(
712 GrpcMethod::new("yandex.cloud.logging.v1.ExportService", "Update"),
713 );
714 self.inner.unary(req, path, codec).await
715 }
716 pub async fn delete(
718 &mut self,
719 request: impl tonic::IntoRequest<super::DeleteExportRequest>,
720 ) -> std::result::Result<
721 tonic::Response<super::super::super::operation::Operation>,
722 tonic::Status,
723 > {
724 self.inner
725 .ready()
726 .await
727 .map_err(|e| {
728 tonic::Status::new(
729 tonic::Code::Unknown,
730 format!("Service was not ready: {}", e.into()),
731 )
732 })?;
733 let codec = tonic::codec::ProstCodec::default();
734 let path = http::uri::PathAndQuery::from_static(
735 "/yandex.cloud.logging.v1.ExportService/Delete",
736 );
737 let mut req = request.into_request();
738 req.extensions_mut()
739 .insert(
740 GrpcMethod::new("yandex.cloud.logging.v1.ExportService", "Delete"),
741 );
742 self.inner.unary(req, path, codec).await
743 }
744 pub async fn list_operations(
746 &mut self,
747 request: impl tonic::IntoRequest<super::ListExportOperationsRequest>,
748 ) -> std::result::Result<
749 tonic::Response<super::ListExportOperationsResponse>,
750 tonic::Status,
751 > {
752 self.inner
753 .ready()
754 .await
755 .map_err(|e| {
756 tonic::Status::new(
757 tonic::Code::Unknown,
758 format!("Service was not ready: {}", e.into()),
759 )
760 })?;
761 let codec = tonic::codec::ProstCodec::default();
762 let path = http::uri::PathAndQuery::from_static(
763 "/yandex.cloud.logging.v1.ExportService/ListOperations",
764 );
765 let mut req = request.into_request();
766 req.extensions_mut()
767 .insert(
768 GrpcMethod::new(
769 "yandex.cloud.logging.v1.ExportService",
770 "ListOperations",
771 ),
772 );
773 self.inner.unary(req, path, codec).await
774 }
775 pub async fn list_access_bindings(
777 &mut self,
778 request: impl tonic::IntoRequest<
779 super::super::super::access::ListAccessBindingsRequest,
780 >,
781 ) -> std::result::Result<
782 tonic::Response<super::super::super::access::ListAccessBindingsResponse>,
783 tonic::Status,
784 > {
785 self.inner
786 .ready()
787 .await
788 .map_err(|e| {
789 tonic::Status::new(
790 tonic::Code::Unknown,
791 format!("Service was not ready: {}", e.into()),
792 )
793 })?;
794 let codec = tonic::codec::ProstCodec::default();
795 let path = http::uri::PathAndQuery::from_static(
796 "/yandex.cloud.logging.v1.ExportService/ListAccessBindings",
797 );
798 let mut req = request.into_request();
799 req.extensions_mut()
800 .insert(
801 GrpcMethod::new(
802 "yandex.cloud.logging.v1.ExportService",
803 "ListAccessBindings",
804 ),
805 );
806 self.inner.unary(req, path, codec).await
807 }
808 pub async fn set_access_bindings(
810 &mut self,
811 request: impl tonic::IntoRequest<
812 super::super::super::access::SetAccessBindingsRequest,
813 >,
814 ) -> std::result::Result<
815 tonic::Response<super::super::super::operation::Operation>,
816 tonic::Status,
817 > {
818 self.inner
819 .ready()
820 .await
821 .map_err(|e| {
822 tonic::Status::new(
823 tonic::Code::Unknown,
824 format!("Service was not ready: {}", e.into()),
825 )
826 })?;
827 let codec = tonic::codec::ProstCodec::default();
828 let path = http::uri::PathAndQuery::from_static(
829 "/yandex.cloud.logging.v1.ExportService/SetAccessBindings",
830 );
831 let mut req = request.into_request();
832 req.extensions_mut()
833 .insert(
834 GrpcMethod::new(
835 "yandex.cloud.logging.v1.ExportService",
836 "SetAccessBindings",
837 ),
838 );
839 self.inner.unary(req, path, codec).await
840 }
841 pub async fn update_access_bindings(
843 &mut self,
844 request: impl tonic::IntoRequest<
845 super::super::super::access::UpdateAccessBindingsRequest,
846 >,
847 ) -> std::result::Result<
848 tonic::Response<super::super::super::operation::Operation>,
849 tonic::Status,
850 > {
851 self.inner
852 .ready()
853 .await
854 .map_err(|e| {
855 tonic::Status::new(
856 tonic::Code::Unknown,
857 format!("Service was not ready: {}", e.into()),
858 )
859 })?;
860 let codec = tonic::codec::ProstCodec::default();
861 let path = http::uri::PathAndQuery::from_static(
862 "/yandex.cloud.logging.v1.ExportService/UpdateAccessBindings",
863 );
864 let mut req = request.into_request();
865 req.extensions_mut()
866 .insert(
867 GrpcMethod::new(
868 "yandex.cloud.logging.v1.ExportService",
869 "UpdateAccessBindings",
870 ),
871 );
872 self.inner.unary(req, path, codec).await
873 }
874 }
875}
876#[allow(clippy::derive_partial_eq_without_eq)]
877#[derive(Clone, PartialEq, ::prost::Message)]
878pub struct LogGroup {
879 #[prost(string, tag = "1")]
881 pub id: ::prost::alloc::string::String,
882 #[prost(string, tag = "2")]
884 pub folder_id: ::prost::alloc::string::String,
885 #[prost(string, tag = "3")]
887 pub cloud_id: ::prost::alloc::string::String,
888 #[prost(message, optional, tag = "4")]
890 pub created_at: ::core::option::Option<::prost_types::Timestamp>,
891 #[prost(string, tag = "5")]
893 pub name: ::prost::alloc::string::String,
894 #[prost(string, tag = "6")]
896 pub description: ::prost::alloc::string::String,
897 #[prost(map = "string, string", tag = "7")]
899 pub labels: ::std::collections::HashMap<
900 ::prost::alloc::string::String,
901 ::prost::alloc::string::String,
902 >,
903 #[prost(enumeration = "log_group::Status", tag = "8")]
905 pub status: i32,
906 #[prost(message, optional, tag = "9")]
910 pub retention_period: ::core::option::Option<::prost_types::Duration>,
911 #[prost(string, tag = "10")]
913 pub data_stream: ::prost::alloc::string::String,
914}
915pub mod log_group {
917 #[derive(
919 Clone,
920 Copy,
921 Debug,
922 PartialEq,
923 Eq,
924 Hash,
925 PartialOrd,
926 Ord,
927 ::prost::Enumeration
928 )]
929 #[repr(i32)]
930 pub enum Status {
931 Unspecified = 0,
935 Creating = 1,
937 Active = 2,
939 Deleting = 3,
943 Error = 4,
945 }
946 impl Status {
947 pub fn as_str_name(&self) -> &'static str {
952 match self {
953 Status::Unspecified => "STATUS_UNSPECIFIED",
954 Status::Creating => "CREATING",
955 Status::Active => "ACTIVE",
956 Status::Deleting => "DELETING",
957 Status::Error => "ERROR",
958 }
959 }
960 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
962 match value {
963 "STATUS_UNSPECIFIED" => Some(Self::Unspecified),
964 "CREATING" => Some(Self::Creating),
965 "ACTIVE" => Some(Self::Active),
966 "DELETING" => Some(Self::Deleting),
967 "ERROR" => Some(Self::Error),
968 _ => None,
969 }
970 }
971 }
972}
973#[allow(clippy::derive_partial_eq_without_eq)]
974#[derive(Clone, PartialEq, ::prost::Message)]
975pub struct GetLogGroupRequest {
976 #[prost(string, tag = "1")]
980 pub log_group_id: ::prost::alloc::string::String,
981}
982#[allow(clippy::derive_partial_eq_without_eq)]
983#[derive(Clone, PartialEq, ::prost::Message)]
984pub struct GetLogGroupStatsRequest {
985 #[prost(string, tag = "1")]
989 pub log_group_id: ::prost::alloc::string::String,
990}
991#[allow(clippy::derive_partial_eq_without_eq)]
992#[derive(Clone, PartialEq, ::prost::Message)]
993pub struct ListLogGroupsRequest {
994 #[prost(string, tag = "1")]
998 pub folder_id: ::prost::alloc::string::String,
999 #[prost(int64, tag = "2")]
1005 pub page_size: i64,
1006 #[prost(string, tag = "3")]
1009 pub page_token: ::prost::alloc::string::String,
1010 #[prost(string, tag = "4")]
1018 pub filter: ::prost::alloc::string::String,
1019}
1020#[allow(clippy::derive_partial_eq_without_eq)]
1021#[derive(Clone, PartialEq, ::prost::Message)]
1022pub struct ListLogGroupsResponse {
1023 #[prost(message, repeated, tag = "1")]
1025 pub groups: ::prost::alloc::vec::Vec<LogGroup>,
1026 #[prost(string, tag = "2")]
1032 pub next_page_token: ::prost::alloc::string::String,
1033}
1034#[allow(clippy::derive_partial_eq_without_eq)]
1035#[derive(Clone, PartialEq, ::prost::Message)]
1036pub struct CreateLogGroupRequest {
1037 #[prost(string, tag = "1")]
1041 pub folder_id: ::prost::alloc::string::String,
1042 #[prost(string, tag = "2")]
1045 pub name: ::prost::alloc::string::String,
1046 #[prost(string, tag = "3")]
1048 pub description: ::prost::alloc::string::String,
1049 #[prost(map = "string, string", tag = "4")]
1051 pub labels: ::std::collections::HashMap<
1052 ::prost::alloc::string::String,
1053 ::prost::alloc::string::String,
1054 >,
1055 #[prost(message, optional, tag = "5")]
1063 pub retention_period: ::core::option::Option<::prost_types::Duration>,
1064 #[prost(string, tag = "6")]
1066 pub data_stream: ::prost::alloc::string::String,
1067}
1068#[allow(clippy::derive_partial_eq_without_eq)]
1069#[derive(Clone, PartialEq, ::prost::Message)]
1070pub struct CreateLogGroupMetadata {
1071 #[prost(string, tag = "1")]
1073 pub log_group_id: ::prost::alloc::string::String,
1074}
1075#[allow(clippy::derive_partial_eq_without_eq)]
1076#[derive(Clone, PartialEq, ::prost::Message)]
1077pub struct UpdateLogGroupRequest {
1078 #[prost(string, tag = "1")]
1082 pub log_group_id: ::prost::alloc::string::String,
1083 #[prost(message, optional, tag = "2")]
1085 pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
1086 #[prost(string, tag = "3")]
1089 pub name: ::prost::alloc::string::String,
1090 #[prost(string, tag = "4")]
1092 pub description: ::prost::alloc::string::String,
1093 #[prost(map = "string, string", tag = "5")]
1095 pub labels: ::std::collections::HashMap<
1096 ::prost::alloc::string::String,
1097 ::prost::alloc::string::String,
1098 >,
1099 #[prost(message, optional, tag = "6")]
1105 pub retention_period: ::core::option::Option<::prost_types::Duration>,
1106 #[prost(string, tag = "7")]
1108 pub data_stream: ::prost::alloc::string::String,
1109}
1110#[allow(clippy::derive_partial_eq_without_eq)]
1111#[derive(Clone, PartialEq, ::prost::Message)]
1112pub struct UpdateLogGroupMetadata {
1113 #[prost(string, tag = "1")]
1115 pub log_group_id: ::prost::alloc::string::String,
1116}
1117#[allow(clippy::derive_partial_eq_without_eq)]
1118#[derive(Clone, PartialEq, ::prost::Message)]
1119pub struct DeleteLogGroupRequest {
1120 #[prost(string, tag = "1")]
1124 pub log_group_id: ::prost::alloc::string::String,
1125}
1126#[allow(clippy::derive_partial_eq_without_eq)]
1127#[derive(Clone, PartialEq, ::prost::Message)]
1128pub struct DeleteLogGroupMetadata {
1129 #[prost(string, tag = "1")]
1131 pub log_group_id: ::prost::alloc::string::String,
1132}
1133#[allow(clippy::derive_partial_eq_without_eq)]
1134#[derive(Clone, PartialEq, ::prost::Message)]
1135pub struct ListResourcesRequest {
1136 #[prost(string, tag = "1")]
1140 pub log_group_id: ::prost::alloc::string::String,
1141 #[prost(string, tag = "2")]
1145 pub r#type: ::prost::alloc::string::String,
1146}
1147#[allow(clippy::derive_partial_eq_without_eq)]
1148#[derive(Clone, PartialEq, ::prost::Message)]
1149pub struct ListResourcesResponse {
1150 #[prost(message, repeated, tag = "1")]
1152 pub resources: ::prost::alloc::vec::Vec<LogGroupResource>,
1153}
1154#[allow(clippy::derive_partial_eq_without_eq)]
1155#[derive(Clone, PartialEq, ::prost::Message)]
1156pub struct ListOperationsRequest {
1157 #[prost(string, tag = "1")]
1161 pub log_group_id: ::prost::alloc::string::String,
1162 #[prost(int64, tag = "2")]
1168 pub page_size: i64,
1169 #[prost(string, tag = "3")]
1172 pub page_token: ::prost::alloc::string::String,
1173 #[prost(string, tag = "4")]
1181 pub filter: ::prost::alloc::string::String,
1182}
1183#[allow(clippy::derive_partial_eq_without_eq)]
1184#[derive(Clone, PartialEq, ::prost::Message)]
1185pub struct ListOperationsResponse {
1186 #[prost(message, repeated, tag = "1")]
1188 pub operations: ::prost::alloc::vec::Vec<super::super::operation::Operation>,
1189 #[prost(string, tag = "2")]
1195 pub next_page_token: ::prost::alloc::string::String,
1196}
1197#[allow(clippy::derive_partial_eq_without_eq)]
1198#[derive(Clone, PartialEq, ::prost::Message)]
1199pub struct GetLogGroupStatsResponse {
1200 #[prost(string, tag = "1")]
1202 pub log_group_id: ::prost::alloc::string::String,
1203 #[prost(int64, tag = "2")]
1205 pub bytes: i64,
1206 #[prost(int64, tag = "3")]
1208 pub records: i64,
1209}
1210pub mod log_group_service_client {
1212 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
1213 use tonic::codegen::*;
1214 use tonic::codegen::http::Uri;
1215 #[derive(Debug, Clone)]
1217 pub struct LogGroupServiceClient<T> {
1218 inner: tonic::client::Grpc<T>,
1219 }
1220 impl LogGroupServiceClient<tonic::transport::Channel> {
1221 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1223 where
1224 D: TryInto<tonic::transport::Endpoint>,
1225 D::Error: Into<StdError>,
1226 {
1227 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1228 Ok(Self::new(conn))
1229 }
1230 }
1231 impl<T> LogGroupServiceClient<T>
1232 where
1233 T: tonic::client::GrpcService<tonic::body::BoxBody>,
1234 T::Error: Into<StdError>,
1235 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
1236 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
1237 {
1238 pub fn new(inner: T) -> Self {
1239 let inner = tonic::client::Grpc::new(inner);
1240 Self { inner }
1241 }
1242 pub fn with_origin(inner: T, origin: Uri) -> Self {
1243 let inner = tonic::client::Grpc::with_origin(inner, origin);
1244 Self { inner }
1245 }
1246 pub fn with_interceptor<F>(
1247 inner: T,
1248 interceptor: F,
1249 ) -> LogGroupServiceClient<InterceptedService<T, F>>
1250 where
1251 F: tonic::service::Interceptor,
1252 T::ResponseBody: Default,
1253 T: tonic::codegen::Service<
1254 http::Request<tonic::body::BoxBody>,
1255 Response = http::Response<
1256 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
1257 >,
1258 >,
1259 <T as tonic::codegen::Service<
1260 http::Request<tonic::body::BoxBody>,
1261 >>::Error: Into<StdError> + Send + Sync,
1262 {
1263 LogGroupServiceClient::new(InterceptedService::new(inner, interceptor))
1264 }
1265 #[must_use]
1270 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1271 self.inner = self.inner.send_compressed(encoding);
1272 self
1273 }
1274 #[must_use]
1276 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1277 self.inner = self.inner.accept_compressed(encoding);
1278 self
1279 }
1280 #[must_use]
1284 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1285 self.inner = self.inner.max_decoding_message_size(limit);
1286 self
1287 }
1288 #[must_use]
1292 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1293 self.inner = self.inner.max_encoding_message_size(limit);
1294 self
1295 }
1296 pub async fn get(
1300 &mut self,
1301 request: impl tonic::IntoRequest<super::GetLogGroupRequest>,
1302 ) -> std::result::Result<tonic::Response<super::LogGroup>, tonic::Status> {
1303 self.inner
1304 .ready()
1305 .await
1306 .map_err(|e| {
1307 tonic::Status::new(
1308 tonic::Code::Unknown,
1309 format!("Service was not ready: {}", e.into()),
1310 )
1311 })?;
1312 let codec = tonic::codec::ProstCodec::default();
1313 let path = http::uri::PathAndQuery::from_static(
1314 "/yandex.cloud.logging.v1.LogGroupService/Get",
1315 );
1316 let mut req = request.into_request();
1317 req.extensions_mut()
1318 .insert(
1319 GrpcMethod::new("yandex.cloud.logging.v1.LogGroupService", "Get"),
1320 );
1321 self.inner.unary(req, path, codec).await
1322 }
1323 pub async fn stats(
1325 &mut self,
1326 request: impl tonic::IntoRequest<super::GetLogGroupStatsRequest>,
1327 ) -> std::result::Result<
1328 tonic::Response<super::GetLogGroupStatsResponse>,
1329 tonic::Status,
1330 > {
1331 self.inner
1332 .ready()
1333 .await
1334 .map_err(|e| {
1335 tonic::Status::new(
1336 tonic::Code::Unknown,
1337 format!("Service was not ready: {}", e.into()),
1338 )
1339 })?;
1340 let codec = tonic::codec::ProstCodec::default();
1341 let path = http::uri::PathAndQuery::from_static(
1342 "/yandex.cloud.logging.v1.LogGroupService/Stats",
1343 );
1344 let mut req = request.into_request();
1345 req.extensions_mut()
1346 .insert(
1347 GrpcMethod::new("yandex.cloud.logging.v1.LogGroupService", "Stats"),
1348 );
1349 self.inner.unary(req, path, codec).await
1350 }
1351 pub async fn list(
1353 &mut self,
1354 request: impl tonic::IntoRequest<super::ListLogGroupsRequest>,
1355 ) -> std::result::Result<
1356 tonic::Response<super::ListLogGroupsResponse>,
1357 tonic::Status,
1358 > {
1359 self.inner
1360 .ready()
1361 .await
1362 .map_err(|e| {
1363 tonic::Status::new(
1364 tonic::Code::Unknown,
1365 format!("Service was not ready: {}", e.into()),
1366 )
1367 })?;
1368 let codec = tonic::codec::ProstCodec::default();
1369 let path = http::uri::PathAndQuery::from_static(
1370 "/yandex.cloud.logging.v1.LogGroupService/List",
1371 );
1372 let mut req = request.into_request();
1373 req.extensions_mut()
1374 .insert(
1375 GrpcMethod::new("yandex.cloud.logging.v1.LogGroupService", "List"),
1376 );
1377 self.inner.unary(req, path, codec).await
1378 }
1379 pub async fn create(
1381 &mut self,
1382 request: impl tonic::IntoRequest<super::CreateLogGroupRequest>,
1383 ) -> std::result::Result<
1384 tonic::Response<super::super::super::operation::Operation>,
1385 tonic::Status,
1386 > {
1387 self.inner
1388 .ready()
1389 .await
1390 .map_err(|e| {
1391 tonic::Status::new(
1392 tonic::Code::Unknown,
1393 format!("Service was not ready: {}", e.into()),
1394 )
1395 })?;
1396 let codec = tonic::codec::ProstCodec::default();
1397 let path = http::uri::PathAndQuery::from_static(
1398 "/yandex.cloud.logging.v1.LogGroupService/Create",
1399 );
1400 let mut req = request.into_request();
1401 req.extensions_mut()
1402 .insert(
1403 GrpcMethod::new("yandex.cloud.logging.v1.LogGroupService", "Create"),
1404 );
1405 self.inner.unary(req, path, codec).await
1406 }
1407 pub async fn update(
1409 &mut self,
1410 request: impl tonic::IntoRequest<super::UpdateLogGroupRequest>,
1411 ) -> std::result::Result<
1412 tonic::Response<super::super::super::operation::Operation>,
1413 tonic::Status,
1414 > {
1415 self.inner
1416 .ready()
1417 .await
1418 .map_err(|e| {
1419 tonic::Status::new(
1420 tonic::Code::Unknown,
1421 format!("Service was not ready: {}", e.into()),
1422 )
1423 })?;
1424 let codec = tonic::codec::ProstCodec::default();
1425 let path = http::uri::PathAndQuery::from_static(
1426 "/yandex.cloud.logging.v1.LogGroupService/Update",
1427 );
1428 let mut req = request.into_request();
1429 req.extensions_mut()
1430 .insert(
1431 GrpcMethod::new("yandex.cloud.logging.v1.LogGroupService", "Update"),
1432 );
1433 self.inner.unary(req, path, codec).await
1434 }
1435 pub async fn delete(
1437 &mut self,
1438 request: impl tonic::IntoRequest<super::DeleteLogGroupRequest>,
1439 ) -> std::result::Result<
1440 tonic::Response<super::super::super::operation::Operation>,
1441 tonic::Status,
1442 > {
1443 self.inner
1444 .ready()
1445 .await
1446 .map_err(|e| {
1447 tonic::Status::new(
1448 tonic::Code::Unknown,
1449 format!("Service was not ready: {}", e.into()),
1450 )
1451 })?;
1452 let codec = tonic::codec::ProstCodec::default();
1453 let path = http::uri::PathAndQuery::from_static(
1454 "/yandex.cloud.logging.v1.LogGroupService/Delete",
1455 );
1456 let mut req = request.into_request();
1457 req.extensions_mut()
1458 .insert(
1459 GrpcMethod::new("yandex.cloud.logging.v1.LogGroupService", "Delete"),
1460 );
1461 self.inner.unary(req, path, codec).await
1462 }
1463 pub async fn list_resources(
1465 &mut self,
1466 request: impl tonic::IntoRequest<super::ListResourcesRequest>,
1467 ) -> std::result::Result<
1468 tonic::Response<super::ListResourcesResponse>,
1469 tonic::Status,
1470 > {
1471 self.inner
1472 .ready()
1473 .await
1474 .map_err(|e| {
1475 tonic::Status::new(
1476 tonic::Code::Unknown,
1477 format!("Service was not ready: {}", e.into()),
1478 )
1479 })?;
1480 let codec = tonic::codec::ProstCodec::default();
1481 let path = http::uri::PathAndQuery::from_static(
1482 "/yandex.cloud.logging.v1.LogGroupService/ListResources",
1483 );
1484 let mut req = request.into_request();
1485 req.extensions_mut()
1486 .insert(
1487 GrpcMethod::new(
1488 "yandex.cloud.logging.v1.LogGroupService",
1489 "ListResources",
1490 ),
1491 );
1492 self.inner.unary(req, path, codec).await
1493 }
1494 pub async fn list_operations(
1496 &mut self,
1497 request: impl tonic::IntoRequest<super::ListOperationsRequest>,
1498 ) -> std::result::Result<
1499 tonic::Response<super::ListOperationsResponse>,
1500 tonic::Status,
1501 > {
1502 self.inner
1503 .ready()
1504 .await
1505 .map_err(|e| {
1506 tonic::Status::new(
1507 tonic::Code::Unknown,
1508 format!("Service was not ready: {}", e.into()),
1509 )
1510 })?;
1511 let codec = tonic::codec::ProstCodec::default();
1512 let path = http::uri::PathAndQuery::from_static(
1513 "/yandex.cloud.logging.v1.LogGroupService/ListOperations",
1514 );
1515 let mut req = request.into_request();
1516 req.extensions_mut()
1517 .insert(
1518 GrpcMethod::new(
1519 "yandex.cloud.logging.v1.LogGroupService",
1520 "ListOperations",
1521 ),
1522 );
1523 self.inner.unary(req, path, codec).await
1524 }
1525 pub async fn list_access_bindings(
1527 &mut self,
1528 request: impl tonic::IntoRequest<
1529 super::super::super::access::ListAccessBindingsRequest,
1530 >,
1531 ) -> std::result::Result<
1532 tonic::Response<super::super::super::access::ListAccessBindingsResponse>,
1533 tonic::Status,
1534 > {
1535 self.inner
1536 .ready()
1537 .await
1538 .map_err(|e| {
1539 tonic::Status::new(
1540 tonic::Code::Unknown,
1541 format!("Service was not ready: {}", e.into()),
1542 )
1543 })?;
1544 let codec = tonic::codec::ProstCodec::default();
1545 let path = http::uri::PathAndQuery::from_static(
1546 "/yandex.cloud.logging.v1.LogGroupService/ListAccessBindings",
1547 );
1548 let mut req = request.into_request();
1549 req.extensions_mut()
1550 .insert(
1551 GrpcMethod::new(
1552 "yandex.cloud.logging.v1.LogGroupService",
1553 "ListAccessBindings",
1554 ),
1555 );
1556 self.inner.unary(req, path, codec).await
1557 }
1558 pub async fn set_access_bindings(
1560 &mut self,
1561 request: impl tonic::IntoRequest<
1562 super::super::super::access::SetAccessBindingsRequest,
1563 >,
1564 ) -> std::result::Result<
1565 tonic::Response<super::super::super::operation::Operation>,
1566 tonic::Status,
1567 > {
1568 self.inner
1569 .ready()
1570 .await
1571 .map_err(|e| {
1572 tonic::Status::new(
1573 tonic::Code::Unknown,
1574 format!("Service was not ready: {}", e.into()),
1575 )
1576 })?;
1577 let codec = tonic::codec::ProstCodec::default();
1578 let path = http::uri::PathAndQuery::from_static(
1579 "/yandex.cloud.logging.v1.LogGroupService/SetAccessBindings",
1580 );
1581 let mut req = request.into_request();
1582 req.extensions_mut()
1583 .insert(
1584 GrpcMethod::new(
1585 "yandex.cloud.logging.v1.LogGroupService",
1586 "SetAccessBindings",
1587 ),
1588 );
1589 self.inner.unary(req, path, codec).await
1590 }
1591 pub async fn update_access_bindings(
1593 &mut self,
1594 request: impl tonic::IntoRequest<
1595 super::super::super::access::UpdateAccessBindingsRequest,
1596 >,
1597 ) -> std::result::Result<
1598 tonic::Response<super::super::super::operation::Operation>,
1599 tonic::Status,
1600 > {
1601 self.inner
1602 .ready()
1603 .await
1604 .map_err(|e| {
1605 tonic::Status::new(
1606 tonic::Code::Unknown,
1607 format!("Service was not ready: {}", e.into()),
1608 )
1609 })?;
1610 let codec = tonic::codec::ProstCodec::default();
1611 let path = http::uri::PathAndQuery::from_static(
1612 "/yandex.cloud.logging.v1.LogGroupService/UpdateAccessBindings",
1613 );
1614 let mut req = request.into_request();
1615 req.extensions_mut()
1616 .insert(
1617 GrpcMethod::new(
1618 "yandex.cloud.logging.v1.LogGroupService",
1619 "UpdateAccessBindings",
1620 ),
1621 );
1622 self.inner.unary(req, path, codec).await
1623 }
1624 }
1625}
1626#[allow(clippy::derive_partial_eq_without_eq)]
1627#[derive(Clone, PartialEq, ::prost::Message)]
1628pub struct WriteRequest {
1629 #[prost(message, optional, tag = "1")]
1633 pub destination: ::core::option::Option<Destination>,
1634 #[prost(message, optional, tag = "2")]
1636 pub resource: ::core::option::Option<LogEntryResource>,
1637 #[prost(message, repeated, tag = "3")]
1639 pub entries: ::prost::alloc::vec::Vec<IncomingLogEntry>,
1640 #[prost(message, optional, tag = "4")]
1644 pub defaults: ::core::option::Option<LogEntryDefaults>,
1645}
1646#[allow(clippy::derive_partial_eq_without_eq)]
1647#[derive(Clone, PartialEq, ::prost::Message)]
1648pub struct WriteResponse {
1649 #[prost(map = "int64, message", tag = "1")]
1653 pub errors: ::std::collections::HashMap<
1654 i64,
1655 super::super::super::super::google::rpc::Status,
1656 >,
1657}
1658pub mod log_ingestion_service_client {
1660 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
1661 use tonic::codegen::*;
1662 use tonic::codegen::http::Uri;
1663 #[derive(Debug, Clone)]
1665 pub struct LogIngestionServiceClient<T> {
1666 inner: tonic::client::Grpc<T>,
1667 }
1668 impl LogIngestionServiceClient<tonic::transport::Channel> {
1669 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1671 where
1672 D: TryInto<tonic::transport::Endpoint>,
1673 D::Error: Into<StdError>,
1674 {
1675 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1676 Ok(Self::new(conn))
1677 }
1678 }
1679 impl<T> LogIngestionServiceClient<T>
1680 where
1681 T: tonic::client::GrpcService<tonic::body::BoxBody>,
1682 T::Error: Into<StdError>,
1683 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
1684 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
1685 {
1686 pub fn new(inner: T) -> Self {
1687 let inner = tonic::client::Grpc::new(inner);
1688 Self { inner }
1689 }
1690 pub fn with_origin(inner: T, origin: Uri) -> Self {
1691 let inner = tonic::client::Grpc::with_origin(inner, origin);
1692 Self { inner }
1693 }
1694 pub fn with_interceptor<F>(
1695 inner: T,
1696 interceptor: F,
1697 ) -> LogIngestionServiceClient<InterceptedService<T, F>>
1698 where
1699 F: tonic::service::Interceptor,
1700 T::ResponseBody: Default,
1701 T: tonic::codegen::Service<
1702 http::Request<tonic::body::BoxBody>,
1703 Response = http::Response<
1704 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
1705 >,
1706 >,
1707 <T as tonic::codegen::Service<
1708 http::Request<tonic::body::BoxBody>,
1709 >>::Error: Into<StdError> + Send + Sync,
1710 {
1711 LogIngestionServiceClient::new(InterceptedService::new(inner, interceptor))
1712 }
1713 #[must_use]
1718 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1719 self.inner = self.inner.send_compressed(encoding);
1720 self
1721 }
1722 #[must_use]
1724 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1725 self.inner = self.inner.accept_compressed(encoding);
1726 self
1727 }
1728 #[must_use]
1732 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1733 self.inner = self.inner.max_decoding_message_size(limit);
1734 self
1735 }
1736 #[must_use]
1740 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1741 self.inner = self.inner.max_encoding_message_size(limit);
1742 self
1743 }
1744 pub async fn write(
1746 &mut self,
1747 request: impl tonic::IntoRequest<super::WriteRequest>,
1748 ) -> std::result::Result<tonic::Response<super::WriteResponse>, tonic::Status> {
1749 self.inner
1750 .ready()
1751 .await
1752 .map_err(|e| {
1753 tonic::Status::new(
1754 tonic::Code::Unknown,
1755 format!("Service was not ready: {}", e.into()),
1756 )
1757 })?;
1758 let codec = tonic::codec::ProstCodec::default();
1759 let path = http::uri::PathAndQuery::from_static(
1760 "/yandex.cloud.logging.v1.LogIngestionService/Write",
1761 );
1762 let mut req = request.into_request();
1763 req.extensions_mut()
1764 .insert(
1765 GrpcMethod::new(
1766 "yandex.cloud.logging.v1.LogIngestionService",
1767 "Write",
1768 ),
1769 );
1770 self.inner.unary(req, path, codec).await
1771 }
1772 }
1773}
1774#[allow(clippy::derive_partial_eq_without_eq)]
1775#[derive(Clone, PartialEq, ::prost::Message)]
1776pub struct ReadRequest {
1777 #[prost(oneof = "read_request::Selector", tags = "1, 2")]
1779 pub selector: ::core::option::Option<read_request::Selector>,
1780}
1781pub mod read_request {
1783 #[allow(clippy::derive_partial_eq_without_eq)]
1785 #[derive(Clone, PartialEq, ::prost::Oneof)]
1786 pub enum Selector {
1787 #[prost(string, tag = "1")]
1790 PageToken(::prost::alloc::string::String),
1791 #[prost(message, tag = "2")]
1795 Criteria(super::Criteria),
1796 }
1797}
1798#[allow(clippy::derive_partial_eq_without_eq)]
1799#[derive(Clone, PartialEq, ::prost::Message)]
1800pub struct ReadResponse {
1801 #[prost(string, tag = "1")]
1803 pub log_group_id: ::prost::alloc::string::String,
1804 #[prost(message, repeated, tag = "2")]
1806 pub entries: ::prost::alloc::vec::Vec<LogEntry>,
1807 #[prost(string, tag = "3")]
1814 pub next_page_token: ::prost::alloc::string::String,
1815 #[prost(string, tag = "4")]
1822 pub previous_page_token: ::prost::alloc::string::String,
1823}
1824#[allow(clippy::derive_partial_eq_without_eq)]
1826#[derive(Clone, PartialEq, ::prost::Message)]
1827pub struct Criteria {
1828 #[prost(string, tag = "1")]
1832 pub log_group_id: ::prost::alloc::string::String,
1833 #[prost(string, repeated, tag = "2")]
1837 pub resource_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1838 #[prost(string, repeated, tag = "3")]
1842 pub resource_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1843 #[prost(message, optional, tag = "4")]
1845 pub since: ::core::option::Option<::prost_types::Timestamp>,
1846 #[prost(message, optional, tag = "5")]
1848 pub until: ::core::option::Option<::prost_types::Timestamp>,
1849 #[prost(enumeration = "log_level::Level", repeated, packed = "false", tag = "6")]
1853 pub levels: ::prost::alloc::vec::Vec<i32>,
1854 #[prost(string, tag = "7")]
1856 pub filter: ::prost::alloc::string::String,
1857 #[prost(string, repeated, tag = "10")]
1861 pub stream_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1862 #[prost(int64, tag = "8")]
1864 pub page_size: i64,
1865 #[prost(int64, tag = "9")]
1869 pub max_response_size: i64,
1870}
1871pub mod log_reading_service_client {
1873 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
1874 use tonic::codegen::*;
1875 use tonic::codegen::http::Uri;
1876 #[derive(Debug, Clone)]
1878 pub struct LogReadingServiceClient<T> {
1879 inner: tonic::client::Grpc<T>,
1880 }
1881 impl LogReadingServiceClient<tonic::transport::Channel> {
1882 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1884 where
1885 D: TryInto<tonic::transport::Endpoint>,
1886 D::Error: Into<StdError>,
1887 {
1888 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1889 Ok(Self::new(conn))
1890 }
1891 }
1892 impl<T> LogReadingServiceClient<T>
1893 where
1894 T: tonic::client::GrpcService<tonic::body::BoxBody>,
1895 T::Error: Into<StdError>,
1896 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
1897 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
1898 {
1899 pub fn new(inner: T) -> Self {
1900 let inner = tonic::client::Grpc::new(inner);
1901 Self { inner }
1902 }
1903 pub fn with_origin(inner: T, origin: Uri) -> Self {
1904 let inner = tonic::client::Grpc::with_origin(inner, origin);
1905 Self { inner }
1906 }
1907 pub fn with_interceptor<F>(
1908 inner: T,
1909 interceptor: F,
1910 ) -> LogReadingServiceClient<InterceptedService<T, F>>
1911 where
1912 F: tonic::service::Interceptor,
1913 T::ResponseBody: Default,
1914 T: tonic::codegen::Service<
1915 http::Request<tonic::body::BoxBody>,
1916 Response = http::Response<
1917 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
1918 >,
1919 >,
1920 <T as tonic::codegen::Service<
1921 http::Request<tonic::body::BoxBody>,
1922 >>::Error: Into<StdError> + Send + Sync,
1923 {
1924 LogReadingServiceClient::new(InterceptedService::new(inner, interceptor))
1925 }
1926 #[must_use]
1931 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1932 self.inner = self.inner.send_compressed(encoding);
1933 self
1934 }
1935 #[must_use]
1937 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1938 self.inner = self.inner.accept_compressed(encoding);
1939 self
1940 }
1941 #[must_use]
1945 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1946 self.inner = self.inner.max_decoding_message_size(limit);
1947 self
1948 }
1949 #[must_use]
1953 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1954 self.inner = self.inner.max_encoding_message_size(limit);
1955 self
1956 }
1957 pub async fn read(
1959 &mut self,
1960 request: impl tonic::IntoRequest<super::ReadRequest>,
1961 ) -> std::result::Result<tonic::Response<super::ReadResponse>, tonic::Status> {
1962 self.inner
1963 .ready()
1964 .await
1965 .map_err(|e| {
1966 tonic::Status::new(
1967 tonic::Code::Unknown,
1968 format!("Service was not ready: {}", e.into()),
1969 )
1970 })?;
1971 let codec = tonic::codec::ProstCodec::default();
1972 let path = http::uri::PathAndQuery::from_static(
1973 "/yandex.cloud.logging.v1.LogReadingService/Read",
1974 );
1975 let mut req = request.into_request();
1976 req.extensions_mut()
1977 .insert(
1978 GrpcMethod::new("yandex.cloud.logging.v1.LogReadingService", "Read"),
1979 );
1980 self.inner.unary(req, path, codec).await
1981 }
1982 }
1983}
1984#[allow(clippy::derive_partial_eq_without_eq)]
1985#[derive(Clone, PartialEq, ::prost::Message)]
1986pub struct Sink {
1987 #[prost(string, tag = "1")]
1989 pub id: ::prost::alloc::string::String,
1990 #[prost(string, tag = "2")]
1992 pub folder_id: ::prost::alloc::string::String,
1993 #[prost(string, tag = "3")]
1995 pub cloud_id: ::prost::alloc::string::String,
1996 #[prost(message, optional, tag = "4")]
1998 pub created_at: ::core::option::Option<::prost_types::Timestamp>,
1999 #[prost(string, tag = "5")]
2001 pub name: ::prost::alloc::string::String,
2002 #[prost(string, tag = "6")]
2004 pub description: ::prost::alloc::string::String,
2005 #[prost(map = "string, string", tag = "7")]
2007 pub labels: ::std::collections::HashMap<
2008 ::prost::alloc::string::String,
2009 ::prost::alloc::string::String,
2010 >,
2011 #[prost(string, tag = "8")]
2013 pub service_account_id: ::prost::alloc::string::String,
2014 #[prost(oneof = "sink::Sink", tags = "9, 10")]
2016 pub sink: ::core::option::Option<sink::Sink>,
2017}
2018pub mod sink {
2020 #[allow(clippy::derive_partial_eq_without_eq)]
2021 #[derive(Clone, PartialEq, ::prost::Message)]
2022 pub struct Yds {
2023 #[prost(string, tag = "1")]
2025 pub stream_name: ::prost::alloc::string::String,
2026 }
2027 #[allow(clippy::derive_partial_eq_without_eq)]
2028 #[derive(Clone, PartialEq, ::prost::Message)]
2029 pub struct S3 {
2030 #[prost(string, tag = "1")]
2032 pub bucket: ::prost::alloc::string::String,
2033 #[prost(string, tag = "2")]
2035 pub prefix: ::prost::alloc::string::String,
2036 }
2037 #[allow(clippy::derive_partial_eq_without_eq)]
2039 #[derive(Clone, PartialEq, ::prost::Oneof)]
2040 pub enum Sink {
2041 #[prost(message, tag = "9")]
2043 Yds(Yds),
2044 #[prost(message, tag = "10")]
2046 S3(S3),
2047 }
2048}
2049#[allow(clippy::derive_partial_eq_without_eq)]
2050#[derive(Clone, PartialEq, ::prost::Message)]
2051pub struct GetSinkRequest {
2052 #[prost(string, tag = "1")]
2056 pub sink_id: ::prost::alloc::string::String,
2057}
2058#[allow(clippy::derive_partial_eq_without_eq)]
2059#[derive(Clone, PartialEq, ::prost::Message)]
2060pub struct ListSinksRequest {
2061 #[prost(string, tag = "1")]
2065 pub folder_id: ::prost::alloc::string::String,
2066 #[prost(int64, tag = "3")]
2072 pub page_size: i64,
2073 #[prost(string, tag = "4")]
2076 pub page_token: ::prost::alloc::string::String,
2077 #[prost(string, tag = "5")]
2085 pub filter: ::prost::alloc::string::String,
2086}
2087#[allow(clippy::derive_partial_eq_without_eq)]
2088#[derive(Clone, PartialEq, ::prost::Message)]
2089pub struct ListSinksResponse {
2090 #[prost(message, repeated, tag = "1")]
2092 pub sinks: ::prost::alloc::vec::Vec<Sink>,
2093 #[prost(string, tag = "2")]
2099 pub next_page_token: ::prost::alloc::string::String,
2100}
2101#[allow(clippy::derive_partial_eq_without_eq)]
2102#[derive(Clone, PartialEq, ::prost::Message)]
2103pub struct CreateSinkRequest {
2104 #[prost(string, tag = "1")]
2108 pub folder_id: ::prost::alloc::string::String,
2109 #[prost(string, tag = "2")]
2112 pub name: ::prost::alloc::string::String,
2113 #[prost(string, tag = "3")]
2115 pub description: ::prost::alloc::string::String,
2116 #[prost(map = "string, string", tag = "4")]
2118 pub labels: ::std::collections::HashMap<
2119 ::prost::alloc::string::String,
2120 ::prost::alloc::string::String,
2121 >,
2122 #[prost(string, tag = "5")]
2124 pub service_account_id: ::prost::alloc::string::String,
2125 #[prost(oneof = "create_sink_request::Sink", tags = "6, 7")]
2127 pub sink: ::core::option::Option<create_sink_request::Sink>,
2128}
2129pub mod create_sink_request {
2131 #[allow(clippy::derive_partial_eq_without_eq)]
2133 #[derive(Clone, PartialEq, ::prost::Oneof)]
2134 pub enum Sink {
2135 #[prost(message, tag = "6")]
2137 Yds(super::sink::Yds),
2138 #[prost(message, tag = "7")]
2140 S3(super::sink::S3),
2141 }
2142}
2143#[allow(clippy::derive_partial_eq_without_eq)]
2144#[derive(Clone, PartialEq, ::prost::Message)]
2145pub struct CreateSinkMetadata {
2146 #[prost(string, tag = "1")]
2148 pub sink_id: ::prost::alloc::string::String,
2149}
2150#[allow(clippy::derive_partial_eq_without_eq)]
2151#[derive(Clone, PartialEq, ::prost::Message)]
2152pub struct UpdateSinkRequest {
2153 #[prost(string, tag = "1")]
2157 pub sink_id: ::prost::alloc::string::String,
2158 #[prost(message, optional, tag = "2")]
2160 pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
2161 #[prost(string, tag = "3")]
2164 pub name: ::prost::alloc::string::String,
2165 #[prost(string, tag = "4")]
2167 pub description: ::prost::alloc::string::String,
2168 #[prost(map = "string, string", tag = "5")]
2170 pub labels: ::std::collections::HashMap<
2171 ::prost::alloc::string::String,
2172 ::prost::alloc::string::String,
2173 >,
2174 #[prost(string, tag = "6")]
2176 pub service_account_id: ::prost::alloc::string::String,
2177 #[prost(oneof = "update_sink_request::Sink", tags = "7, 8")]
2179 pub sink: ::core::option::Option<update_sink_request::Sink>,
2180}
2181pub mod update_sink_request {
2183 #[allow(clippy::derive_partial_eq_without_eq)]
2185 #[derive(Clone, PartialEq, ::prost::Oneof)]
2186 pub enum Sink {
2187 #[prost(message, tag = "7")]
2189 Yds(super::sink::Yds),
2190 #[prost(message, tag = "8")]
2192 S3(super::sink::S3),
2193 }
2194}
2195#[allow(clippy::derive_partial_eq_without_eq)]
2196#[derive(Clone, PartialEq, ::prost::Message)]
2197pub struct UpdateSinkMetadata {
2198 #[prost(string, tag = "1")]
2200 pub sink_id: ::prost::alloc::string::String,
2201}
2202#[allow(clippy::derive_partial_eq_without_eq)]
2203#[derive(Clone, PartialEq, ::prost::Message)]
2204pub struct DeleteSinkRequest {
2205 #[prost(string, tag = "1")]
2209 pub sink_id: ::prost::alloc::string::String,
2210}
2211#[allow(clippy::derive_partial_eq_without_eq)]
2212#[derive(Clone, PartialEq, ::prost::Message)]
2213pub struct DeleteSinkMetadata {
2214 #[prost(string, tag = "1")]
2216 pub sink_id: ::prost::alloc::string::String,
2217}
2218#[allow(clippy::derive_partial_eq_without_eq)]
2219#[derive(Clone, PartialEq, ::prost::Message)]
2220pub struct ListSinkOperationsRequest {
2221 #[prost(string, tag = "1")]
2225 pub sink_id: ::prost::alloc::string::String,
2226 #[prost(int64, tag = "2")]
2232 pub page_size: i64,
2233 #[prost(string, tag = "3")]
2236 pub page_token: ::prost::alloc::string::String,
2237 #[prost(string, tag = "4")]
2245 pub filter: ::prost::alloc::string::String,
2246}
2247#[allow(clippy::derive_partial_eq_without_eq)]
2248#[derive(Clone, PartialEq, ::prost::Message)]
2249pub struct ListSinkOperationsResponse {
2250 #[prost(message, repeated, tag = "1")]
2252 pub operations: ::prost::alloc::vec::Vec<super::super::operation::Operation>,
2253 #[prost(string, tag = "2")]
2259 pub next_page_token: ::prost::alloc::string::String,
2260}
2261pub mod sink_service_client {
2263 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
2264 use tonic::codegen::*;
2265 use tonic::codegen::http::Uri;
2266 #[derive(Debug, Clone)]
2268 pub struct SinkServiceClient<T> {
2269 inner: tonic::client::Grpc<T>,
2270 }
2271 impl SinkServiceClient<tonic::transport::Channel> {
2272 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2274 where
2275 D: TryInto<tonic::transport::Endpoint>,
2276 D::Error: Into<StdError>,
2277 {
2278 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2279 Ok(Self::new(conn))
2280 }
2281 }
2282 impl<T> SinkServiceClient<T>
2283 where
2284 T: tonic::client::GrpcService<tonic::body::BoxBody>,
2285 T::Error: Into<StdError>,
2286 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
2287 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
2288 {
2289 pub fn new(inner: T) -> Self {
2290 let inner = tonic::client::Grpc::new(inner);
2291 Self { inner }
2292 }
2293 pub fn with_origin(inner: T, origin: Uri) -> Self {
2294 let inner = tonic::client::Grpc::with_origin(inner, origin);
2295 Self { inner }
2296 }
2297 pub fn with_interceptor<F>(
2298 inner: T,
2299 interceptor: F,
2300 ) -> SinkServiceClient<InterceptedService<T, F>>
2301 where
2302 F: tonic::service::Interceptor,
2303 T::ResponseBody: Default,
2304 T: tonic::codegen::Service<
2305 http::Request<tonic::body::BoxBody>,
2306 Response = http::Response<
2307 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
2308 >,
2309 >,
2310 <T as tonic::codegen::Service<
2311 http::Request<tonic::body::BoxBody>,
2312 >>::Error: Into<StdError> + Send + Sync,
2313 {
2314 SinkServiceClient::new(InterceptedService::new(inner, interceptor))
2315 }
2316 #[must_use]
2321 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2322 self.inner = self.inner.send_compressed(encoding);
2323 self
2324 }
2325 #[must_use]
2327 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2328 self.inner = self.inner.accept_compressed(encoding);
2329 self
2330 }
2331 #[must_use]
2335 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2336 self.inner = self.inner.max_decoding_message_size(limit);
2337 self
2338 }
2339 #[must_use]
2343 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2344 self.inner = self.inner.max_encoding_message_size(limit);
2345 self
2346 }
2347 pub async fn get(
2351 &mut self,
2352 request: impl tonic::IntoRequest<super::GetSinkRequest>,
2353 ) -> std::result::Result<tonic::Response<super::Sink>, tonic::Status> {
2354 self.inner
2355 .ready()
2356 .await
2357 .map_err(|e| {
2358 tonic::Status::new(
2359 tonic::Code::Unknown,
2360 format!("Service was not ready: {}", e.into()),
2361 )
2362 })?;
2363 let codec = tonic::codec::ProstCodec::default();
2364 let path = http::uri::PathAndQuery::from_static(
2365 "/yandex.cloud.logging.v1.SinkService/Get",
2366 );
2367 let mut req = request.into_request();
2368 req.extensions_mut()
2369 .insert(GrpcMethod::new("yandex.cloud.logging.v1.SinkService", "Get"));
2370 self.inner.unary(req, path, codec).await
2371 }
2372 pub async fn list(
2374 &mut self,
2375 request: impl tonic::IntoRequest<super::ListSinksRequest>,
2376 ) -> std::result::Result<
2377 tonic::Response<super::ListSinksResponse>,
2378 tonic::Status,
2379 > {
2380 self.inner
2381 .ready()
2382 .await
2383 .map_err(|e| {
2384 tonic::Status::new(
2385 tonic::Code::Unknown,
2386 format!("Service was not ready: {}", e.into()),
2387 )
2388 })?;
2389 let codec = tonic::codec::ProstCodec::default();
2390 let path = http::uri::PathAndQuery::from_static(
2391 "/yandex.cloud.logging.v1.SinkService/List",
2392 );
2393 let mut req = request.into_request();
2394 req.extensions_mut()
2395 .insert(GrpcMethod::new("yandex.cloud.logging.v1.SinkService", "List"));
2396 self.inner.unary(req, path, codec).await
2397 }
2398 pub async fn create(
2400 &mut self,
2401 request: impl tonic::IntoRequest<super::CreateSinkRequest>,
2402 ) -> std::result::Result<
2403 tonic::Response<super::super::super::operation::Operation>,
2404 tonic::Status,
2405 > {
2406 self.inner
2407 .ready()
2408 .await
2409 .map_err(|e| {
2410 tonic::Status::new(
2411 tonic::Code::Unknown,
2412 format!("Service was not ready: {}", e.into()),
2413 )
2414 })?;
2415 let codec = tonic::codec::ProstCodec::default();
2416 let path = http::uri::PathAndQuery::from_static(
2417 "/yandex.cloud.logging.v1.SinkService/Create",
2418 );
2419 let mut req = request.into_request();
2420 req.extensions_mut()
2421 .insert(
2422 GrpcMethod::new("yandex.cloud.logging.v1.SinkService", "Create"),
2423 );
2424 self.inner.unary(req, path, codec).await
2425 }
2426 pub async fn update(
2428 &mut self,
2429 request: impl tonic::IntoRequest<super::UpdateSinkRequest>,
2430 ) -> std::result::Result<
2431 tonic::Response<super::super::super::operation::Operation>,
2432 tonic::Status,
2433 > {
2434 self.inner
2435 .ready()
2436 .await
2437 .map_err(|e| {
2438 tonic::Status::new(
2439 tonic::Code::Unknown,
2440 format!("Service was not ready: {}", e.into()),
2441 )
2442 })?;
2443 let codec = tonic::codec::ProstCodec::default();
2444 let path = http::uri::PathAndQuery::from_static(
2445 "/yandex.cloud.logging.v1.SinkService/Update",
2446 );
2447 let mut req = request.into_request();
2448 req.extensions_mut()
2449 .insert(
2450 GrpcMethod::new("yandex.cloud.logging.v1.SinkService", "Update"),
2451 );
2452 self.inner.unary(req, path, codec).await
2453 }
2454 pub async fn delete(
2456 &mut self,
2457 request: impl tonic::IntoRequest<super::DeleteSinkRequest>,
2458 ) -> std::result::Result<
2459 tonic::Response<super::super::super::operation::Operation>,
2460 tonic::Status,
2461 > {
2462 self.inner
2463 .ready()
2464 .await
2465 .map_err(|e| {
2466 tonic::Status::new(
2467 tonic::Code::Unknown,
2468 format!("Service was not ready: {}", e.into()),
2469 )
2470 })?;
2471 let codec = tonic::codec::ProstCodec::default();
2472 let path = http::uri::PathAndQuery::from_static(
2473 "/yandex.cloud.logging.v1.SinkService/Delete",
2474 );
2475 let mut req = request.into_request();
2476 req.extensions_mut()
2477 .insert(
2478 GrpcMethod::new("yandex.cloud.logging.v1.SinkService", "Delete"),
2479 );
2480 self.inner.unary(req, path, codec).await
2481 }
2482 pub async fn list_operations(
2484 &mut self,
2485 request: impl tonic::IntoRequest<super::ListSinkOperationsRequest>,
2486 ) -> std::result::Result<
2487 tonic::Response<super::ListSinkOperationsResponse>,
2488 tonic::Status,
2489 > {
2490 self.inner
2491 .ready()
2492 .await
2493 .map_err(|e| {
2494 tonic::Status::new(
2495 tonic::Code::Unknown,
2496 format!("Service was not ready: {}", e.into()),
2497 )
2498 })?;
2499 let codec = tonic::codec::ProstCodec::default();
2500 let path = http::uri::PathAndQuery::from_static(
2501 "/yandex.cloud.logging.v1.SinkService/ListOperations",
2502 );
2503 let mut req = request.into_request();
2504 req.extensions_mut()
2505 .insert(
2506 GrpcMethod::new(
2507 "yandex.cloud.logging.v1.SinkService",
2508 "ListOperations",
2509 ),
2510 );
2511 self.inner.unary(req, path, codec).await
2512 }
2513 pub async fn list_access_bindings(
2515 &mut self,
2516 request: impl tonic::IntoRequest<
2517 super::super::super::access::ListAccessBindingsRequest,
2518 >,
2519 ) -> std::result::Result<
2520 tonic::Response<super::super::super::access::ListAccessBindingsResponse>,
2521 tonic::Status,
2522 > {
2523 self.inner
2524 .ready()
2525 .await
2526 .map_err(|e| {
2527 tonic::Status::new(
2528 tonic::Code::Unknown,
2529 format!("Service was not ready: {}", e.into()),
2530 )
2531 })?;
2532 let codec = tonic::codec::ProstCodec::default();
2533 let path = http::uri::PathAndQuery::from_static(
2534 "/yandex.cloud.logging.v1.SinkService/ListAccessBindings",
2535 );
2536 let mut req = request.into_request();
2537 req.extensions_mut()
2538 .insert(
2539 GrpcMethod::new(
2540 "yandex.cloud.logging.v1.SinkService",
2541 "ListAccessBindings",
2542 ),
2543 );
2544 self.inner.unary(req, path, codec).await
2545 }
2546 pub async fn set_access_bindings(
2548 &mut self,
2549 request: impl tonic::IntoRequest<
2550 super::super::super::access::SetAccessBindingsRequest,
2551 >,
2552 ) -> std::result::Result<
2553 tonic::Response<super::super::super::operation::Operation>,
2554 tonic::Status,
2555 > {
2556 self.inner
2557 .ready()
2558 .await
2559 .map_err(|e| {
2560 tonic::Status::new(
2561 tonic::Code::Unknown,
2562 format!("Service was not ready: {}", e.into()),
2563 )
2564 })?;
2565 let codec = tonic::codec::ProstCodec::default();
2566 let path = http::uri::PathAndQuery::from_static(
2567 "/yandex.cloud.logging.v1.SinkService/SetAccessBindings",
2568 );
2569 let mut req = request.into_request();
2570 req.extensions_mut()
2571 .insert(
2572 GrpcMethod::new(
2573 "yandex.cloud.logging.v1.SinkService",
2574 "SetAccessBindings",
2575 ),
2576 );
2577 self.inner.unary(req, path, codec).await
2578 }
2579 pub async fn update_access_bindings(
2581 &mut self,
2582 request: impl tonic::IntoRequest<
2583 super::super::super::access::UpdateAccessBindingsRequest,
2584 >,
2585 ) -> std::result::Result<
2586 tonic::Response<super::super::super::operation::Operation>,
2587 tonic::Status,
2588 > {
2589 self.inner
2590 .ready()
2591 .await
2592 .map_err(|e| {
2593 tonic::Status::new(
2594 tonic::Code::Unknown,
2595 format!("Service was not ready: {}", e.into()),
2596 )
2597 })?;
2598 let codec = tonic::codec::ProstCodec::default();
2599 let path = http::uri::PathAndQuery::from_static(
2600 "/yandex.cloud.logging.v1.SinkService/UpdateAccessBindings",
2601 );
2602 let mut req = request.into_request();
2603 req.extensions_mut()
2604 .insert(
2605 GrpcMethod::new(
2606 "yandex.cloud.logging.v1.SinkService",
2607 "UpdateAccessBindings",
2608 ),
2609 );
2610 self.inner.unary(req, path, codec).await
2611 }
2612 }
2613}