yandex_cloud/
yandex.cloud.logging.v1.rs

1/// Log entry resource specification.
2///
3/// May be used either by services and by user.
4#[allow(clippy::derive_partial_eq_without_eq)]
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct LogEntryResource {
7    /// Resource type, i.e., `serverless.function`
8    #[prost(string, tag = "1")]
9    pub r#type: ::prost::alloc::string::String,
10    /// Resource ID, i.e., ID of the function producing logs.
11    #[prost(string, tag = "2")]
12    pub id: ::prost::alloc::string::String,
13}
14/// Log group resource.
15#[allow(clippy::derive_partial_eq_without_eq)]
16#[derive(Clone, PartialEq, ::prost::Message)]
17pub struct LogGroupResource {
18    /// Resource type.
19    ///
20    /// Collected from log entries inside log group.
21    #[prost(string, tag = "1")]
22    pub r#type: ::prost::alloc::string::String,
23    /// List of resource IDs with the same resource type.
24    #[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    /// Unique entry ID.
31    ///
32    /// Useful for logs deduplication.
33    #[prost(string, tag = "1")]
34    pub uid: ::prost::alloc::string::String,
35    /// Entry resource specification.
36    ///
37    /// May contain information about source service and resource ID.
38    /// Also may be provided by the user.
39    #[prost(message, optional, tag = "2")]
40    pub resource: ::core::option::Option<LogEntryResource>,
41    /// Timestamp of the entry.
42    #[prost(message, optional, tag = "3")]
43    pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
44    /// Entry ingestion time observed by \[LogIngestionService\].
45    #[prost(message, optional, tag = "4")]
46    pub ingested_at: ::core::option::Option<::prost_types::Timestamp>,
47    /// Entry save time.
48    ///
49    /// Entry is ready to be read since this moment.
50    #[prost(message, optional, tag = "5")]
51    pub saved_at: ::core::option::Option<::prost_types::Timestamp>,
52    /// Entry severity.
53    ///
54    /// See \[LogLevel.Level\] for details.
55    #[prost(enumeration = "log_level::Level", tag = "6")]
56    pub level: i32,
57    /// Entry text message.
58    #[prost(string, tag = "7")]
59    pub message: ::prost::alloc::string::String,
60    /// Entry annotation.
61    #[prost(message, optional, tag = "8")]
62    pub json_payload: ::core::option::Option<::prost_types::Struct>,
63    /// Entry stream name.
64    #[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    /// Timestamp of the entry.
71    #[prost(message, optional, tag = "1")]
72    pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
73    /// Entry severity.
74    ///
75    /// See \[LogLevel.Level\] for details.
76    #[prost(enumeration = "log_level::Level", tag = "2")]
77    pub level: i32,
78    /// Entry text message.
79    #[prost(string, tag = "3")]
80    pub message: ::prost::alloc::string::String,
81    /// Entry annotation.
82    #[prost(message, optional, tag = "4")]
83    pub json_payload: ::core::option::Option<::prost_types::Struct>,
84    /// Entry stream name.
85    #[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    /// Default entry severity.
92    /// Will be applied if entry level is unspecified.
93    ///
94    /// See \[LogLevel.Level\] for details.
95    #[prost(enumeration = "log_level::Level", tag = "2")]
96    pub level: i32,
97    /// Default entry annotation.
98    /// Will be merged with entry annotation.
99    /// Any conflict will be resolved in favor of entry own annotation.
100    #[prost(message, optional, tag = "4")]
101    pub json_payload: ::core::option::Option<::prost_types::Struct>,
102    /// Entry stream name.
103    #[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    /// Entry destination.
110    #[prost(oneof = "destination::Destination", tags = "1, 2")]
111    pub destination: ::core::option::Option<destination::Destination>,
112}
113/// Nested message and enum types in `Destination`.
114pub mod destination {
115    /// Entry destination.
116    #[allow(clippy::derive_partial_eq_without_eq)]
117    #[derive(Clone, PartialEq, ::prost::Oneof)]
118    pub enum Destination {
119        /// Entry should be written to log group resolved by ID.
120        #[prost(string, tag = "1")]
121        LogGroupId(::prost::alloc::string::String),
122        /// Entry should be written to default log group for the folder.
123        #[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    /// Entry level.
131    ///
132    /// See \[Level\] for possible values.
133    #[prost(enumeration = "log_level::Level", tag = "1")]
134    pub level: i32,
135}
136/// Nested message and enum types in `LogLevel`.
137pub mod log_level {
138    /// Possible log levels for entries.
139    #[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        /// Default log level.
153        ///
154        /// Equivalent to not specifying log level at all.
155        Unspecified = 0,
156        /// Trace log level.
157        ///
158        /// Possible use case: verbose logging of some business logic.
159        Trace = 1,
160        /// Debug log level.
161        ///
162        /// Possible use case: debugging special cases in application logic.
163        Debug = 2,
164        /// Info log level.
165        ///
166        /// Mostly used for information messages.
167        Info = 3,
168        /// Warn log level.
169        ///
170        /// May be used to alert about significant events.
171        Warn = 4,
172        /// Error log level.
173        ///
174        /// May be used to alert about errors in infrastructure, logic, etc.
175        Error = 5,
176        /// Fatal log level.
177        ///
178        /// May be used to alert about unrecoverable failures and events.
179        Fatal = 6,
180    }
181    impl Level {
182        /// String value of the enum field names used in the ProtoBuf definition.
183        ///
184        /// The values are not transformed in any way and thus are considered stable
185        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
186        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        /// Creates an enum from field names used in the ProtoBuf definition.
198        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    /// Export ID.
216    #[prost(string, tag = "1")]
217    pub id: ::prost::alloc::string::String,
218    /// Export folder ID.
219    #[prost(string, tag = "2")]
220    pub folder_id: ::prost::alloc::string::String,
221    /// Export cloud ID.
222    #[prost(string, tag = "3")]
223    pub cloud_id: ::prost::alloc::string::String,
224    /// Export creation time.
225    #[prost(message, optional, tag = "4")]
226    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
227    /// Export name.
228    #[prost(string, tag = "5")]
229    pub name: ::prost::alloc::string::String,
230    /// Export description.
231    #[prost(string, tag = "6")]
232    pub description: ::prost::alloc::string::String,
233    /// Export lables.
234    #[prost(map = "string, string", tag = "7")]
235    pub labels: ::std::collections::HashMap<
236        ::prost::alloc::string::String,
237        ::prost::alloc::string::String,
238    >,
239    /// Group logs are exported from.
240    #[prost(string, tag = "8")]
241    pub group_id: ::prost::alloc::string::String,
242    /// Sink logs are exported to.
243    #[prost(string, tag = "9")]
244    pub sink_id: ::prost::alloc::string::String,
245    /// Parameters of logs filtration.
246    #[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    /// ID of the export to return.
309    ///
310    /// To get a export ID make a \[ExportService.List\] request.
311    #[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    /// Folder ID of the exports to return.
318    ///
319    /// To get a folder ID make a \[yandex.cloud.resourcemanager.v1.FolderService.List\] request.
320    #[prost(string, tag = "1")]
321    pub folder_id: ::prost::alloc::string::String,
322    /// The maximum number of results per page to return. If the number of available
323    /// results is larger than `page_size`, the service returns a \[ListExportssResponse.next_page_token\]
324    /// that can be used to get the next page of results in subsequent list requests.
325    ///
326    /// Default value: 100.
327    #[prost(int64, tag = "3")]
328    pub page_size: i64,
329    /// Page token. To get the next page of results, set `page_token` to the
330    /// \[ListExportsResponse.next_page_token\] returned by a previous list request.
331    #[prost(string, tag = "4")]
332    pub page_token: ::prost::alloc::string::String,
333    /// A filter expression that filters exports listed in the response.
334    ///
335    /// The expression must specify:
336    /// 1. The field name. Currently filtering can only be applied to the \[Export.name\] field.
337    /// 2. An `=` operator.
338    /// 3. The value in double quotes (`"`). Must be 3-63 characters long and match the regular expression `\[a-z][-a-z0-9]{1,61}[a-z0-9\]`.
339    /// Example of a filter: `name="my-export"`.
340    #[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    /// List of exports in the specified folder.
347    #[prost(message, repeated, tag = "1")]
348    pub exports: ::prost::alloc::vec::Vec<Export>,
349    /// Token for getting the next page of the list. If the number of results is greater than
350    /// the specified \[ListExportsRequest.page_size\], use `next_page_token` as the value
351    /// for the \[ListExportsRequest.page_token\] parameter in the next list request.
352    ///
353    /// Each subsequent page will have its own `next_page_token` to continue paging through the results.
354    #[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    /// ID of the folder to create a export in.
361    ///
362    /// To get a folder ID make a \[yandex.cloud.resourcemanager.v1.FolderService.List\] request.
363    #[prost(string, tag = "1")]
364    pub folder_id: ::prost::alloc::string::String,
365    /// Name of the export.
366    /// The name must be unique within the folder.
367    #[prost(string, tag = "2")]
368    pub name: ::prost::alloc::string::String,
369    /// Description of the export.
370    #[prost(string, tag = "3")]
371    pub description: ::prost::alloc::string::String,
372    /// Export labels as `key:value` pairs.
373    #[prost(map = "string, string", tag = "4")]
374    pub labels: ::std::collections::HashMap<
375        ::prost::alloc::string::String,
376        ::prost::alloc::string::String,
377    >,
378    /// Logging Group ID logs exported from
379    #[prost(string, tag = "5")]
380    pub group_id: ::prost::alloc::string::String,
381    /// Logging Sink ID logs exported to
382    #[prost(string, tag = "6")]
383    pub sink_id: ::prost::alloc::string::String,
384    /// Parameters for logs filtration
385    #[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    /// ID of the export being created.
392    #[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    /// ID of the export to update.
399    ///
400    /// To get a export ID make a \[ExportService.List\] request.
401    #[prost(string, tag = "1")]
402    pub export_id: ::prost::alloc::string::String,
403    /// Field mask that specifies which attributes of the function should be updated.
404    #[prost(message, optional, tag = "2")]
405    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
406    /// New name of the export.
407    /// The name must be unique within the folder.
408    #[prost(string, tag = "3")]
409    pub name: ::prost::alloc::string::String,
410    /// New Description of the export.
411    #[prost(string, tag = "4")]
412    pub description: ::prost::alloc::string::String,
413    /// New export labels as `key:value` pairs.
414    #[prost(map = "string, string", tag = "5")]
415    pub labels: ::std::collections::HashMap<
416        ::prost::alloc::string::String,
417        ::prost::alloc::string::String,
418    >,
419    /// New logging Group ID logs exported from
420    #[prost(string, tag = "6")]
421    pub group_id: ::prost::alloc::string::String,
422    /// New logging Sink ID logs exported to
423    #[prost(string, tag = "7")]
424    pub sink_id: ::prost::alloc::string::String,
425    /// New parameters for logs filtration
426    #[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    /// ID of the export being updated.
433    #[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    /// ID of the export to delete.
440    ///
441    /// To get a export ID make a \[ExportService.List\] request.
442    #[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    /// ID of the export being deleted.
449    #[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    /// ID of the export to list operations for.
456    ///
457    /// To get a export ID make a \[ExportService.List\] request.
458    #[prost(string, tag = "1")]
459    pub export_id: ::prost::alloc::string::String,
460    /// The maximum number of results per page to return. If the number of available
461    /// results is larger than `page_size`, the service returns a \[ListExportOperationsResponse.next_page_token\]
462    /// that can be used to get the next page of results in subsequent list requests.
463    ///
464    /// Default value: 100.
465    #[prost(int64, tag = "2")]
466    pub page_size: i64,
467    /// Page token. To get the next page of results, set `page_token` to the
468    /// \[ListExportOperationsResponse.next_page_token\] returned by a previous list request.
469    #[prost(string, tag = "3")]
470    pub page_token: ::prost::alloc::string::String,
471    /// A filter expression that filters resources listed in the response.
472    ///
473    /// The expression must specify:
474    /// 1. The field name. Currently filtering can be applied to the \[operation.Operation.description\], \[operation.Operation.created_at\], \[operation.Operation.modified_at\], \[operation.Operation.created_by\], \[operation.Operation.done\] fields.
475    /// 2. An `=` operator.
476    /// 3. The value in double quotes (`"`). Must be 3-63 characters long and match the regular expression `\[a-z][-a-z0-9]{1,61}[a-z0-9\]`.
477    /// Examples of a filter: `done=false`, `created_by='John.Doe'`.
478    #[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    /// List of operations for the specified export.
485    #[prost(message, repeated, tag = "1")]
486    pub operations: ::prost::alloc::vec::Vec<super::super::operation::Operation>,
487    /// Token for getting the next page of the list. If the number of results is greater than
488    /// the specified \[ListOExportperationsRequest.page_size\], use `next_page_token` as the value
489    /// for the \[ListExportOperationsRequest.page_token\] parameter in the next list request.
490    ///
491    /// Each subsequent page will have its own `next_page_token` to continue paging through the results.
492    #[prost(string, tag = "2")]
493    pub next_page_token: ::prost::alloc::string::String,
494}
495/// Generated client implementations.
496pub 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    /// A set of methods for managing log exports.
501    #[derive(Debug, Clone)]
502    pub struct ExportServiceClient<T> {
503        inner: tonic::client::Grpc<T>,
504    }
505    impl ExportServiceClient<tonic::transport::Channel> {
506        /// Attempt to create a new client by connecting to a given endpoint.
507        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        /// Compress requests with the given encoding.
551        ///
552        /// This requires the server to support it otherwise it might respond with an
553        /// error.
554        #[must_use]
555        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
556            self.inner = self.inner.send_compressed(encoding);
557            self
558        }
559        /// Enable decompressing responses.
560        #[must_use]
561        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
562            self.inner = self.inner.accept_compressed(encoding);
563            self
564        }
565        /// Limits the maximum size of a decoded message.
566        ///
567        /// Default: `4MB`
568        #[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        /// Limits the maximum size of an encoded message.
574        ///
575        /// Default: `usize::MAX`
576        #[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        /// Run new logs export from log group to sink
582        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        /// Returns the specified export.
608        ///
609        /// To get the list of all available exports, make a [List] request.
610        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        /// Retrieves the list of exports in the specified folder.
633        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        /// Creates a export in the specified folder.
661        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        /// Updates the specified export.
689        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        /// Deletes the specified export.
717        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        /// Lists operations for the specified export.
745        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        /// Lists existing access bindings for the specified export.
776        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        /// Sets access bindings for the specified export.
809        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        /// Updates access bindings for the specified export.
842        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    /// Log group ID.
880    #[prost(string, tag = "1")]
881    pub id: ::prost::alloc::string::String,
882    /// Log group folder ID.
883    #[prost(string, tag = "2")]
884    pub folder_id: ::prost::alloc::string::String,
885    /// Log group cloud ID.
886    #[prost(string, tag = "3")]
887    pub cloud_id: ::prost::alloc::string::String,
888    /// Log group creation time.
889    #[prost(message, optional, tag = "4")]
890    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
891    /// Log group name.
892    #[prost(string, tag = "5")]
893    pub name: ::prost::alloc::string::String,
894    /// Log group description.
895    #[prost(string, tag = "6")]
896    pub description: ::prost::alloc::string::String,
897    /// Log group labels.
898    #[prost(map = "string, string", tag = "7")]
899    pub labels: ::std::collections::HashMap<
900        ::prost::alloc::string::String,
901        ::prost::alloc::string::String,
902    >,
903    /// Status of the log group.
904    #[prost(enumeration = "log_group::Status", tag = "8")]
905    pub status: i32,
906    /// Log group entry retention period.
907    ///
908    /// Entries will be present in group during this period.
909    #[prost(message, optional, tag = "9")]
910    pub retention_period: ::core::option::Option<::prost_types::Duration>,
911    /// Data stream name
912    #[prost(string, tag = "10")]
913    pub data_stream: ::prost::alloc::string::String,
914}
915/// Nested message and enum types in `LogGroup`.
916pub mod log_group {
917    /// Possible log group statuses.
918    #[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        /// Unknown status.
932        ///
933        /// Should never occur.
934        Unspecified = 0,
935        /// Log group is creating.
936        Creating = 1,
937        /// Log group is ready to accept messages,
938        Active = 2,
939        /// Log group is being deleted.
940        ///
941        /// No messages will be accepted.
942        Deleting = 3,
943        /// Log group is in failed state.
944        Error = 4,
945    }
946    impl Status {
947        /// String value of the enum field names used in the ProtoBuf definition.
948        ///
949        /// The values are not transformed in any way and thus are considered stable
950        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
951        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        /// Creates an enum from field names used in the ProtoBuf definition.
961        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    /// ID of the log group to return.
977    ///
978    /// To get a log group ID make a \[LogGroupService.List\] request.
979    #[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    /// ID of the log group to return stats for.
986    ///
987    /// To get a log group ID make a \[LogGroupService.List\] request.
988    #[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    /// Folder ID of the log groups to return.
995    ///
996    /// To get a folder ID make a \[yandex.cloud.resourcemanager.v1.FolderService.List\] request.
997    #[prost(string, tag = "1")]
998    pub folder_id: ::prost::alloc::string::String,
999    /// The maximum number of results per page to return. If the number of available
1000    /// results is larger than `page_size`, the service returns a \[ListLogGroupsResponse.next_page_token\]
1001    /// that can be used to get the next page of results in subsequent list requests.
1002    ///
1003    /// Default value: 100.
1004    #[prost(int64, tag = "2")]
1005    pub page_size: i64,
1006    /// Page token. To get the next page of results, set `page_token` to the
1007    /// \[ListLogGroupsResponse.next_page_token\] returned by a previous list request.
1008    #[prost(string, tag = "3")]
1009    pub page_token: ::prost::alloc::string::String,
1010    /// A filter expression that filters log groups listed in the response.
1011    ///
1012    /// The expression must specify:
1013    /// 1. The field name. Currently filtering can only be applied to the \[LogGroup.name\] field.
1014    /// 2. An `=` operator.
1015    /// 3. The value in double quotes (`"`). Must be 3-63 characters long and match the regular expression `\[a-z][-a-z0-9]{1,61}[a-z0-9\]`.
1016    /// Example of a filter: `name=my-log-group`.
1017    #[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    /// List of log groups in the specified folder.
1024    #[prost(message, repeated, tag = "1")]
1025    pub groups: ::prost::alloc::vec::Vec<LogGroup>,
1026    /// Token for getting the next page of the list. If the number of results is greater than
1027    /// the specified \[ListLogGroupsRequest.page_size\], use `next_page_token` as the value
1028    /// for the \[ListLogGroupsRequest.page_token\] parameter in the next list request.
1029    ///
1030    /// Each subsequent page will have its own `next_page_token` to continue paging through the results.
1031    #[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    /// ID of the folder to create a log group in.
1038    ///
1039    /// To get a folder ID make a \[yandex.cloud.resourcemanager.v1.FolderService.List\] request.
1040    #[prost(string, tag = "1")]
1041    pub folder_id: ::prost::alloc::string::String,
1042    /// Name of the log group.
1043    /// The name must be unique within the folder.
1044    #[prost(string, tag = "2")]
1045    pub name: ::prost::alloc::string::String,
1046    /// Description of the log group.
1047    #[prost(string, tag = "3")]
1048    pub description: ::prost::alloc::string::String,
1049    /// Log group labels as `key:value` pairs.
1050    #[prost(map = "string, string", tag = "4")]
1051    pub labels: ::std::collections::HashMap<
1052        ::prost::alloc::string::String,
1053        ::prost::alloc::string::String,
1054    >,
1055    /// Log group entry retention period.
1056    ///
1057    /// Entries will be present in group during this period.
1058    /// If specified, must be non-negative.
1059    /// Empty or zero value is treated as no limit.
1060    ///
1061    /// Data stream name
1062    #[prost(message, optional, tag = "5")]
1063    pub retention_period: ::core::option::Option<::prost_types::Duration>,
1064    /// If specified, all log records will be written to this data stream
1065    #[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    /// ID of the log group being created.
1072    #[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    /// ID of the log group to update.
1079    ///
1080    /// To get a log group ID make a \[LogGroupService.List\] request.
1081    #[prost(string, tag = "1")]
1082    pub log_group_id: ::prost::alloc::string::String,
1083    /// Field mask that specifies which attributes of the function should be updated.
1084    #[prost(message, optional, tag = "2")]
1085    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
1086    /// New name of the log group.
1087    /// The name must be unique within the folder.
1088    #[prost(string, tag = "3")]
1089    pub name: ::prost::alloc::string::String,
1090    /// New Description of the log group.
1091    #[prost(string, tag = "4")]
1092    pub description: ::prost::alloc::string::String,
1093    /// New log group labels as `key:value` pairs.
1094    #[prost(map = "string, string", tag = "5")]
1095    pub labels: ::std::collections::HashMap<
1096        ::prost::alloc::string::String,
1097        ::prost::alloc::string::String,
1098    >,
1099    /// New log group entry retention period.
1100    ///
1101    /// Entries will be present in group during this period.
1102    /// If specified, must be non-negative.
1103    /// Empty or zero value is treated as no limit.
1104    #[prost(message, optional, tag = "6")]
1105    pub retention_period: ::core::option::Option<::prost_types::Duration>,
1106    /// If specified, log records will be written to this data stream
1107    #[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    /// ID of the log group being updated.
1114    #[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    /// ID of the log group to delete.
1121    ///
1122    /// To get a log group ID make a \[LogGroupService.List\] request.
1123    #[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    /// ID of the log group being deleted.
1130    #[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    /// ID of the log group to list resources for.
1137    ///
1138    /// To get a log group ID make a \[LogGroupService.List\] request.
1139    #[prost(string, tag = "1")]
1140    pub log_group_id: ::prost::alloc::string::String,
1141    /// Resource type to return resources for.
1142    ///
1143    /// If not specified, \[ListResourcesResponse\] will contain information about all resource types.
1144    #[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    /// List of resources present in log group.
1151    #[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    /// ID of the log group to list operations for.
1158    ///
1159    /// To get a log group ID make a \[LogGroupService.List\] request.
1160    #[prost(string, tag = "1")]
1161    pub log_group_id: ::prost::alloc::string::String,
1162    /// The maximum number of results per page to return. If the number of available
1163    /// results is larger than `page_size`, the service returns a \[ListOperationsResponse.next_page_token\]
1164    /// that can be used to get the next page of results in subsequent list requests.
1165    ///
1166    /// Default value: 100.
1167    #[prost(int64, tag = "2")]
1168    pub page_size: i64,
1169    /// Page token. To get the next page of results, set `page_token` to the
1170    /// \[ListOperationsResponse.next_page_token\] returned by a previous list request.
1171    #[prost(string, tag = "3")]
1172    pub page_token: ::prost::alloc::string::String,
1173    /// A filter expression that filters resources listed in the response.
1174    ///
1175    /// The expression must specify:
1176    /// 1. The field name. Currently filtering can be applied to the \[operation.Operation.description\], \[operation.Operation.created_at\], \[operation.Operation.modified_at\], \[operation.Operation.created_by\], \[operation.Operation.done\] fields.
1177    /// 2. An `=` operator.
1178    /// 3. The value in double quotes (`"`). Must be 3-63 characters long and match the regular expression `\[a-z][-a-z0-9]{1,61}[a-z0-9\]`.
1179    /// Examples of a filter: `done=false`, `created_by='John.Doe'`.
1180    #[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    /// List of operations for the specified log group.
1187    #[prost(message, repeated, tag = "1")]
1188    pub operations: ::prost::alloc::vec::Vec<super::super::operation::Operation>,
1189    /// Token for getting the next page of the list. If the number of results is greater than
1190    /// the specified \[ListOperationsRequest.page_size\], use `next_page_token` as the value
1191    /// for the \[ListOperationsRequest.page_token\] parameter in the next list request.
1192    ///
1193    /// Each subsequent page will have its own `next_page_token` to continue paging through the results.
1194    #[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    /// Log group ID the stats are returned for.
1201    #[prost(string, tag = "1")]
1202    pub log_group_id: ::prost::alloc::string::String,
1203    /// Size of data in log group in bytes.
1204    #[prost(int64, tag = "2")]
1205    pub bytes: i64,
1206    /// Amount of records in log group.
1207    #[prost(int64, tag = "3")]
1208    pub records: i64,
1209}
1210/// Generated client implementations.
1211pub 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    /// A set of methods for managing log groups.
1216    #[derive(Debug, Clone)]
1217    pub struct LogGroupServiceClient<T> {
1218        inner: tonic::client::Grpc<T>,
1219    }
1220    impl LogGroupServiceClient<tonic::transport::Channel> {
1221        /// Attempt to create a new client by connecting to a given endpoint.
1222        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        /// Compress requests with the given encoding.
1266        ///
1267        /// This requires the server to support it otherwise it might respond with an
1268        /// error.
1269        #[must_use]
1270        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1271            self.inner = self.inner.send_compressed(encoding);
1272            self
1273        }
1274        /// Enable decompressing responses.
1275        #[must_use]
1276        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1277            self.inner = self.inner.accept_compressed(encoding);
1278            self
1279        }
1280        /// Limits the maximum size of a decoded message.
1281        ///
1282        /// Default: `4MB`
1283        #[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        /// Limits the maximum size of an encoded message.
1289        ///
1290        /// Default: `usize::MAX`
1291        #[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        /// Returns the specified log group.
1297        ///
1298        /// To get the list of all available log groups, make a [List] request.
1299        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        /// Returns stats for the specified log group.
1324        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        /// Retrieves the list of log groups in the specified folder.
1352        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        /// Creates a log group in the specified folder.
1380        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        /// Updates the specified log group.
1408        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        /// Deletes the specified log group.
1436        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        /// Retrieves the resources (type and IDs) in the specified log group.
1464        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        /// Lists operations for the specified log group.
1495        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        /// Lists existing access bindings for the specified log group.
1526        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        /// Sets access bindings for the specified log group.
1559        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        /// Updates access bindings for the specified log group.
1592        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    /// Log entries destination.
1630    ///
1631    /// See \[Destination\] for details.
1632    #[prost(message, optional, tag = "1")]
1633    pub destination: ::core::option::Option<Destination>,
1634    /// Common resource (type, ID) specification for log entries.
1635    #[prost(message, optional, tag = "2")]
1636    pub resource: ::core::option::Option<LogEntryResource>,
1637    /// List of log entries.
1638    #[prost(message, repeated, tag = "3")]
1639    pub entries: ::prost::alloc::vec::Vec<IncomingLogEntry>,
1640    /// Log entries defaults.
1641    ///
1642    /// See \[LogEntryDefaults\] for details.
1643    #[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    /// Map<idx, status> of ingest failures.
1650    ///
1651    /// If entry with idx N is absent, it was ingested successfully.
1652    #[prost(map = "int64, message", tag = "1")]
1653    pub errors: ::std::collections::HashMap<
1654        i64,
1655        super::super::super::super::google::rpc::Status,
1656    >,
1657}
1658/// Generated client implementations.
1659pub 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    /// A set of methods for writing to log groups.
1664    #[derive(Debug, Clone)]
1665    pub struct LogIngestionServiceClient<T> {
1666        inner: tonic::client::Grpc<T>,
1667    }
1668    impl LogIngestionServiceClient<tonic::transport::Channel> {
1669        /// Attempt to create a new client by connecting to a given endpoint.
1670        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        /// Compress requests with the given encoding.
1714        ///
1715        /// This requires the server to support it otherwise it might respond with an
1716        /// error.
1717        #[must_use]
1718        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1719            self.inner = self.inner.send_compressed(encoding);
1720            self
1721        }
1722        /// Enable decompressing responses.
1723        #[must_use]
1724        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1725            self.inner = self.inner.accept_compressed(encoding);
1726            self
1727        }
1728        /// Limits the maximum size of a decoded message.
1729        ///
1730        /// Default: `4MB`
1731        #[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        /// Limits the maximum size of an encoded message.
1737        ///
1738        /// Default: `usize::MAX`
1739        #[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        /// Write log entries to specified destination.
1745        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    /// Read selector.
1778    #[prost(oneof = "read_request::Selector", tags = "1, 2")]
1779    pub selector: ::core::option::Option<read_request::Selector>,
1780}
1781/// Nested message and enum types in `ReadRequest`.
1782pub mod read_request {
1783    /// Read selector.
1784    #[allow(clippy::derive_partial_eq_without_eq)]
1785    #[derive(Clone, PartialEq, ::prost::Oneof)]
1786    pub enum Selector {
1787        /// Page token. To get the next page of results, set `page_token` to the
1788        /// \[ReadResponse.next_page_token\] or \[ReadResponse.previous_page_token\] returned by a previous read request.
1789        #[prost(string, tag = "1")]
1790        PageToken(::prost::alloc::string::String),
1791        /// Read criteria.
1792        ///
1793        /// See \[Criteria\] for details.
1794        #[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    /// Log group ID the read was performed from.
1802    #[prost(string, tag = "1")]
1803    pub log_group_id: ::prost::alloc::string::String,
1804    /// List of matching log entries.
1805    #[prost(message, repeated, tag = "2")]
1806    pub entries: ::prost::alloc::vec::Vec<LogEntry>,
1807    /// Token for getting the next page of the log entries.
1808    ///
1809    /// After getting log entries initially with \[Criteria\], you can use `next_page_token` as the value
1810    /// for the \[ReadRequest.page_token\] parameter in the next read request.
1811    ///
1812    /// Each subsequent page will have its own `next_page_token` to continue paging through the results.
1813    #[prost(string, tag = "3")]
1814    pub next_page_token: ::prost::alloc::string::String,
1815    /// Token for getting the previous page of the log entries.
1816    ///
1817    /// After getting log entries initially with \[Criteria\], you can use `previous_page_token` as the value
1818    /// for the \[ReadRequest.page_token\] parameter in the next read request.
1819    ///
1820    /// Each subsequent page will have its own `next_page_token` to continue paging through the results.
1821    #[prost(string, tag = "4")]
1822    pub previous_page_token: ::prost::alloc::string::String,
1823}
1824/// Read criteria. Should be used in initial \[ReadRequest\].
1825#[allow(clippy::derive_partial_eq_without_eq)]
1826#[derive(Clone, PartialEq, ::prost::Message)]
1827pub struct Criteria {
1828    /// ID of the log group to return.
1829    ///
1830    /// To get a log group ID make a \[LogGroupService.List\] request.
1831    #[prost(string, tag = "1")]
1832    pub log_group_id: ::prost::alloc::string::String,
1833    /// List of resource types to limit log entries to.
1834    ///
1835    /// Empty list disables filter.
1836    #[prost(string, repeated, tag = "2")]
1837    pub resource_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1838    /// List of resource IDs to limit log entries to.
1839    ///
1840    /// Empty list disables filter.
1841    #[prost(string, repeated, tag = "3")]
1842    pub resource_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1843    /// Lower bound of log entries timestamps.
1844    #[prost(message, optional, tag = "4")]
1845    pub since: ::core::option::Option<::prost_types::Timestamp>,
1846    /// Upper bound of log entries timestamps.
1847    #[prost(message, optional, tag = "5")]
1848    pub until: ::core::option::Option<::prost_types::Timestamp>,
1849    /// List of log levels to limit log entries to.
1850    ///
1851    /// Empty list disables filter.
1852    #[prost(enumeration = "log_level::Level", repeated, packed = "false", tag = "6")]
1853    pub levels: ::prost::alloc::vec::Vec<i32>,
1854    /// Filter expression. For details about filtering, see \[documentation\](/docs/logging/concepts/filter).
1855    #[prost(string, tag = "7")]
1856    pub filter: ::prost::alloc::string::String,
1857    /// List of stream names to limit log entries to.
1858    ///
1859    /// Empty list disables filter.
1860    #[prost(string, repeated, tag = "10")]
1861    pub stream_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1862    /// The maximum number of results per page to return.
1863    #[prost(int64, tag = "8")]
1864    pub page_size: i64,
1865    /// Limits response to maximum size in bytes. Prevents gRPC resource exhaustion.
1866    ///
1867    /// Default value for max response size is 3.5 MiB
1868    #[prost(int64, tag = "9")]
1869    pub max_response_size: i64,
1870}
1871/// Generated client implementations.
1872pub 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    /// A set of methods for reading from log groups.
1877    #[derive(Debug, Clone)]
1878    pub struct LogReadingServiceClient<T> {
1879        inner: tonic::client::Grpc<T>,
1880    }
1881    impl LogReadingServiceClient<tonic::transport::Channel> {
1882        /// Attempt to create a new client by connecting to a given endpoint.
1883        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        /// Compress requests with the given encoding.
1927        ///
1928        /// This requires the server to support it otherwise it might respond with an
1929        /// error.
1930        #[must_use]
1931        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1932            self.inner = self.inner.send_compressed(encoding);
1933            self
1934        }
1935        /// Enable decompressing responses.
1936        #[must_use]
1937        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1938            self.inner = self.inner.accept_compressed(encoding);
1939            self
1940        }
1941        /// Limits the maximum size of a decoded message.
1942        ///
1943        /// Default: `4MB`
1944        #[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        /// Limits the maximum size of an encoded message.
1950        ///
1951        /// Default: `usize::MAX`
1952        #[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        /// Read log entries from the specified log group.
1958        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    /// Sink ID.
1988    #[prost(string, tag = "1")]
1989    pub id: ::prost::alloc::string::String,
1990    /// Sink folder ID.
1991    #[prost(string, tag = "2")]
1992    pub folder_id: ::prost::alloc::string::String,
1993    /// Sink cloud ID.
1994    #[prost(string, tag = "3")]
1995    pub cloud_id: ::prost::alloc::string::String,
1996    /// Sink creation time.
1997    #[prost(message, optional, tag = "4")]
1998    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
1999    /// Sink name.
2000    #[prost(string, tag = "5")]
2001    pub name: ::prost::alloc::string::String,
2002    /// Sink description.
2003    #[prost(string, tag = "6")]
2004    pub description: ::prost::alloc::string::String,
2005    /// Sink labels.
2006    #[prost(map = "string, string", tag = "7")]
2007    pub labels: ::std::collections::HashMap<
2008        ::prost::alloc::string::String,
2009        ::prost::alloc::string::String,
2010    >,
2011    /// Logs will be written to the sink on behalf of this service account
2012    #[prost(string, tag = "8")]
2013    pub service_account_id: ::prost::alloc::string::String,
2014    /// Logs destination
2015    #[prost(oneof = "sink::Sink", tags = "9, 10")]
2016    pub sink: ::core::option::Option<sink::Sink>,
2017}
2018/// Nested message and enum types in `Sink`.
2019pub mod sink {
2020    #[allow(clippy::derive_partial_eq_without_eq)]
2021    #[derive(Clone, PartialEq, ::prost::Message)]
2022    pub struct Yds {
2023        /// Fully qualified name of data stream
2024        #[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        /// Object storage bucket
2031        #[prost(string, tag = "1")]
2032        pub bucket: ::prost::alloc::string::String,
2033        /// Prefix to use for saved log object names
2034        #[prost(string, tag = "2")]
2035        pub prefix: ::prost::alloc::string::String,
2036    }
2037    /// Logs destination
2038    #[allow(clippy::derive_partial_eq_without_eq)]
2039    #[derive(Clone, PartialEq, ::prost::Oneof)]
2040    pub enum Sink {
2041        /// Yandex data stream
2042        #[prost(message, tag = "9")]
2043        Yds(Yds),
2044        /// Object storage
2045        #[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    /// ID of the sink to return.
2053    ///
2054    /// To get a sink ID make a \[SinkService.List\] request.
2055    #[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    /// Folder ID of the sinks to return.
2062    ///
2063    /// To get a folder ID make a \[yandex.cloud.resourcemanager.v1.FolderService.List\] request.
2064    #[prost(string, tag = "1")]
2065    pub folder_id: ::prost::alloc::string::String,
2066    /// The maximum number of results per page to return. If the number of available
2067    /// results is larger than `page_size`, the service returns a \[ListSinkssResponse.next_page_token\]
2068    /// that can be used to get the next page of results in subsequent list requests.
2069    ///
2070    /// Default value: 100.
2071    #[prost(int64, tag = "3")]
2072    pub page_size: i64,
2073    /// Page token. To get the next page of results, set `page_token` to the
2074    /// \[ListSinksResponse.next_page_token\] returned by a previous list request.
2075    #[prost(string, tag = "4")]
2076    pub page_token: ::prost::alloc::string::String,
2077    /// A filter expression that filters sinks listed in the response.
2078    ///
2079    /// The expression must specify:
2080    /// 1. The field name. Currently filtering can only be applied to the \[Sink.name\] field.
2081    /// 2. An `=` operator.
2082    /// 3. The value in double quotes (`"`). Must be 3-63 characters long and match the regular expression `\[a-z][-a-z0-9]{1,61}[a-z0-9\]`.
2083    /// Example of a filter: `name="my-sink"`.
2084    #[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    /// List of sinks in the specified folder.
2091    #[prost(message, repeated, tag = "1")]
2092    pub sinks: ::prost::alloc::vec::Vec<Sink>,
2093    /// Token for getting the next page of the list. If the number of results is greater than
2094    /// the specified \[ListSinksRequest.page_size\], use `next_page_token` as the value
2095    /// for the \[ListSinksRequest.page_token\] parameter in the next list request.
2096    ///
2097    /// Each subsequent page will have its own `next_page_token` to continue paging through the results.
2098    #[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    /// ID of the folder to create a sink in.
2105    ///
2106    /// To get a folder ID make a \[yandex.cloud.resourcemanager.v1.FolderService.List\] request.
2107    #[prost(string, tag = "1")]
2108    pub folder_id: ::prost::alloc::string::String,
2109    /// Name of the sink.
2110    /// The name must be unique within the folder.
2111    #[prost(string, tag = "2")]
2112    pub name: ::prost::alloc::string::String,
2113    /// Description of the sink.
2114    #[prost(string, tag = "3")]
2115    pub description: ::prost::alloc::string::String,
2116    /// Sink labels as `key:value` pairs.
2117    #[prost(map = "string, string", tag = "4")]
2118    pub labels: ::std::collections::HashMap<
2119        ::prost::alloc::string::String,
2120        ::prost::alloc::string::String,
2121    >,
2122    /// Logs will be written to the sink on behalf of this service account
2123    #[prost(string, tag = "5")]
2124    pub service_account_id: ::prost::alloc::string::String,
2125    /// Logs destination
2126    #[prost(oneof = "create_sink_request::Sink", tags = "6, 7")]
2127    pub sink: ::core::option::Option<create_sink_request::Sink>,
2128}
2129/// Nested message and enum types in `CreateSinkRequest`.
2130pub mod create_sink_request {
2131    /// Logs destination
2132    #[allow(clippy::derive_partial_eq_without_eq)]
2133    #[derive(Clone, PartialEq, ::prost::Oneof)]
2134    pub enum Sink {
2135        /// Yandex data stream
2136        #[prost(message, tag = "6")]
2137        Yds(super::sink::Yds),
2138        /// Object storage
2139        #[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    /// ID of the sink being created.
2147    #[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    /// ID of the sink to update.
2154    ///
2155    /// To get a sink ID make a \[SinkService.List\] request.
2156    #[prost(string, tag = "1")]
2157    pub sink_id: ::prost::alloc::string::String,
2158    /// Field mask that specifies which attributes of the function should be updated.
2159    #[prost(message, optional, tag = "2")]
2160    pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
2161    /// New name of the sink.
2162    /// The name must be unique within the folder.
2163    #[prost(string, tag = "3")]
2164    pub name: ::prost::alloc::string::String,
2165    /// New Description of the sink.
2166    #[prost(string, tag = "4")]
2167    pub description: ::prost::alloc::string::String,
2168    /// New sink labels as `key:value` pairs.
2169    #[prost(map = "string, string", tag = "5")]
2170    pub labels: ::std::collections::HashMap<
2171        ::prost::alloc::string::String,
2172        ::prost::alloc::string::String,
2173    >,
2174    /// new service account to use for logs writing to the sink.
2175    #[prost(string, tag = "6")]
2176    pub service_account_id: ::prost::alloc::string::String,
2177    /// New logs destination
2178    #[prost(oneof = "update_sink_request::Sink", tags = "7, 8")]
2179    pub sink: ::core::option::Option<update_sink_request::Sink>,
2180}
2181/// Nested message and enum types in `UpdateSinkRequest`.
2182pub mod update_sink_request {
2183    /// New logs destination
2184    #[allow(clippy::derive_partial_eq_without_eq)]
2185    #[derive(Clone, PartialEq, ::prost::Oneof)]
2186    pub enum Sink {
2187        /// Yandex data stream
2188        #[prost(message, tag = "7")]
2189        Yds(super::sink::Yds),
2190        /// Object storage
2191        #[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    /// ID of the sink being updated.
2199    #[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    /// ID of the sink to delete.
2206    ///
2207    /// To get a sink ID make a \[SinkService.List\] request.
2208    #[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    /// ID of the sink being deleted.
2215    #[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    /// ID of the sink to list operations for.
2222    ///
2223    /// To get a sink ID make a \[SinkService.List\] request.
2224    #[prost(string, tag = "1")]
2225    pub sink_id: ::prost::alloc::string::String,
2226    /// The maximum number of results per page to return. If the number of available
2227    /// results is larger than `page_size`, the service returns a \[ListSinkOperationsResponse.next_page_token\]
2228    /// that can be used to get the next page of results in subsequent list requests.
2229    ///
2230    /// Default value: 100.
2231    #[prost(int64, tag = "2")]
2232    pub page_size: i64,
2233    /// Page token. To get the next page of results, set `page_token` to the
2234    /// \[ListSinkOperationsResponse.next_page_token\] returned by a previous list request.
2235    #[prost(string, tag = "3")]
2236    pub page_token: ::prost::alloc::string::String,
2237    /// A filter expression that filters resources listed in the response.
2238    ///
2239    /// The expression must specify:
2240    /// 1. The field name. Currently filtering can be applied to the \[operation.Operation.description\], \[operation.Operation.created_at\], \[operation.Operation.modified_at\], \[operation.Operation.created_by\], \[operation.Operation.done\] fields.
2241    /// 2. An `=` operator.
2242    /// 3. The value in double quotes (`"`). Must be 3-63 characters long and match the regular expression `\[a-z][-a-z0-9]{1,61}[a-z0-9\]`.
2243    /// Examples of a filter: `done=false`, `created_by='John.Doe'`.
2244    #[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    /// List of operations for the specified sink.
2251    #[prost(message, repeated, tag = "1")]
2252    pub operations: ::prost::alloc::vec::Vec<super::super::operation::Operation>,
2253    /// Token for getting the next page of the list. If the number of results is greater than
2254    /// the specified \[ListOSinkperationsRequest.page_size\], use `next_page_token` as the value
2255    /// for the \[ListSinkOperationsRequest.page_token\] parameter in the next list request.
2256    ///
2257    /// Each subsequent page will have its own `next_page_token` to continue paging through the results.
2258    #[prost(string, tag = "2")]
2259    pub next_page_token: ::prost::alloc::string::String,
2260}
2261/// Generated client implementations.
2262pub 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    /// A set of methods for managing log sinks.
2267    #[derive(Debug, Clone)]
2268    pub struct SinkServiceClient<T> {
2269        inner: tonic::client::Grpc<T>,
2270    }
2271    impl SinkServiceClient<tonic::transport::Channel> {
2272        /// Attempt to create a new client by connecting to a given endpoint.
2273        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        /// Compress requests with the given encoding.
2317        ///
2318        /// This requires the server to support it otherwise it might respond with an
2319        /// error.
2320        #[must_use]
2321        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2322            self.inner = self.inner.send_compressed(encoding);
2323            self
2324        }
2325        /// Enable decompressing responses.
2326        #[must_use]
2327        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2328            self.inner = self.inner.accept_compressed(encoding);
2329            self
2330        }
2331        /// Limits the maximum size of a decoded message.
2332        ///
2333        /// Default: `4MB`
2334        #[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        /// Limits the maximum size of an encoded message.
2340        ///
2341        /// Default: `usize::MAX`
2342        #[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        /// Returns the specified sink.
2348        ///
2349        /// To get the list of all available sinks, make a [List] request.
2350        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        /// Retrieves the list of sinks in the specified folder.
2373        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        /// Creates a sink in the specified folder.
2399        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        /// Updates the specified sink.
2427        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        /// Deletes the specified sink.
2455        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        /// Lists operations for the specified sink.
2483        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        /// Lists existing access bindings for the specified sink.
2514        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        /// Sets access bindings for the specified sink.
2547        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        /// Updates access bindings for the specified sink.
2580        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}