ydb_grpc_bindings/generated/
ydb.topic.rs

1/// Description of supported codecs.
2#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct SupportedCodecs {
5    /// List of supported codecs.
6    /// See enum Codec above for values.
7    #[prost(int32, repeated, packed = "false", tag = "1")]
8    pub codecs: ::prost::alloc::vec::Vec<i32>,
9}
10/// Represents range [start, end).
11/// I.e. (end - 1) is the greatest of offsets, included in non-empty range.
12#[allow(clippy::derive_partial_eq_without_eq)]
13#[derive(Clone, PartialEq, ::prost::Message)]
14pub struct OffsetsRange {
15    #[prost(int64, tag = "1")]
16    pub start: i64,
17    #[prost(int64, tag = "2")]
18    pub end: i64,
19}
20/// In-session reauthentication and reauthorization, lets user increase session
21/// lifetime. Client should wait for UpdateTokenResponse before sending next
22/// UpdateTokenRequest.
23#[allow(clippy::derive_partial_eq_without_eq)]
24#[derive(Clone, PartialEq, ::prost::Message)]
25pub struct UpdateTokenRequest {
26    #[prost(string, tag = "1")]
27    pub token: ::prost::alloc::string::String,
28}
29#[allow(clippy::derive_partial_eq_without_eq)]
30#[derive(Clone, PartialEq, ::prost::Message)]
31pub struct UpdateTokenResponse {}
32/// Messages for bidirectional streaming rpc StreamWrite
33#[allow(clippy::derive_partial_eq_without_eq)]
34#[derive(Clone, PartialEq, ::prost::Message)]
35pub struct StreamWriteMessage {}
36/// Nested message and enum types in `StreamWriteMessage`.
37pub mod stream_write_message {
38    /// Client-server message for write session. Contains one of:
39    ///      InitRequest - handshake request.
40    ///      WriteRequest - portion of data to be written.
41    ///      UpdateTokenRequest - user credentials if update is needed.
42    #[allow(clippy::derive_partial_eq_without_eq)]
43    #[derive(Clone, PartialEq, ::prost::Message)]
44    pub struct FromClient {
45        #[prost(oneof = "from_client::ClientMessage", tags = "1, 2, 3")]
46        pub client_message: ::core::option::Option<from_client::ClientMessage>,
47    }
48    /// Nested message and enum types in `FromClient`.
49    pub mod from_client {
50        #[allow(clippy::derive_partial_eq_without_eq)]
51        #[derive(Clone, PartialEq, ::prost::Oneof)]
52        pub enum ClientMessage {
53            #[prost(message, tag = "1")]
54            InitRequest(super::InitRequest),
55            #[prost(message, tag = "2")]
56            WriteRequest(super::WriteRequest),
57            #[prost(message, tag = "3")]
58            UpdateTokenRequest(super::super::UpdateTokenRequest),
59        }
60    }
61    /// Server-client message for write session. Contains either non-success
62    /// status, or one of:
63    ///      InitResponse - correct handshake response.
64    ///      WriteResponse - acknowledgment of storing client messages.
65    ///      UpdateTokenResponse - acknowledgment of reauthentication and
66    ///      reauthorization.
67    #[allow(clippy::derive_partial_eq_without_eq)]
68    #[derive(Clone, PartialEq, ::prost::Message)]
69    pub struct FromServer {
70        /// Server status of response.
71        #[prost(enumeration = "super::super::status_ids::StatusCode", tag = "1")]
72        pub status: i32,
73        /// Issues if any.
74        #[prost(message, repeated, tag = "2")]
75        pub issues: ::prost::alloc::vec::Vec<super::super::issue::IssueMessage>,
76        #[prost(oneof = "from_server::ServerMessage", tags = "3, 4, 5")]
77        pub server_message: ::core::option::Option<from_server::ServerMessage>,
78    }
79    /// Nested message and enum types in `FromServer`.
80    pub mod from_server {
81        #[allow(clippy::derive_partial_eq_without_eq)]
82        #[derive(Clone, PartialEq, ::prost::Oneof)]
83        pub enum ServerMessage {
84            #[prost(message, tag = "3")]
85            InitResponse(super::InitResponse),
86            #[prost(message, tag = "4")]
87            WriteResponse(super::WriteResponse),
88            #[prost(message, tag = "5")]
89            UpdateTokenResponse(super::super::UpdateTokenResponse),
90        }
91    }
92    /// Handshake request that must be sent to server first.
93    #[allow(clippy::derive_partial_eq_without_eq)]
94    #[derive(Clone, PartialEq, ::prost::Message)]
95    pub struct InitRequest {
96        /// Full path of topic to write to.
97        #[prost(string, tag = "1")]
98        pub path: ::prost::alloc::string::String,
99        /// Producer identifier of client data stream.
100        /// Used for message deduplication by sequence numbers.
101        #[prost(string, tag = "2")]
102        pub producer_id: ::prost::alloc::string::String,
103        /// User metadata attached to this write session.
104        /// Reader will get this session meta data with each message read.
105        #[prost(map = "string, string", tag = "3")]
106        pub write_session_meta: ::std::collections::HashMap<
107            ::prost::alloc::string::String,
108            ::prost::alloc::string::String,
109        >,
110        /// Explicitly request for last sequential number
111        /// It may be expensive, if producer wrote to many partitions before.
112        #[prost(bool, tag = "6")]
113        pub get_last_seq_no: bool,
114        /// Option for setting order on messages.
115        /// If neither is set, no guarantees on ordering or partitions to write
116        /// to.
117        #[prost(oneof = "init_request::Partitioning", tags = "4, 5")]
118        pub partitioning: ::core::option::Option<init_request::Partitioning>,
119    }
120    /// Nested message and enum types in `InitRequest`.
121    pub mod init_request {
122        /// Option for setting order on messages.
123        /// If neither is set, no guarantees on ordering or partitions to write
124        /// to.
125        #[allow(clippy::derive_partial_eq_without_eq)]
126        #[derive(Clone, PartialEq, ::prost::Oneof)]
127        pub enum Partitioning {
128            /// All messages with given pair (producer_id, message_group_id) go
129            /// to single partition in order of writes.
130            #[prost(string, tag = "4")]
131            MessageGroupId(::prost::alloc::string::String),
132            /// Explicit partition id to write to.
133            #[prost(int64, tag = "5")]
134            PartitionId(i64),
135        }
136    }
137    /// Response for handshake.
138    #[allow(clippy::derive_partial_eq_without_eq)]
139    #[derive(Clone, PartialEq, ::prost::Message)]
140    pub struct InitResponse {
141        /// Last persisted message's sequence number for this producer.
142        /// Zero for new producer.
143        #[prost(int64, tag = "1")]
144        pub last_seq_no: i64,
145        /// Unique identifier of write session. Used for debug purposes.
146        #[prost(string, tag = "2")]
147        pub session_id: ::prost::alloc::string::String,
148        /// Identifier of partition that is matched for this write session.
149        #[prost(int64, tag = "3")]
150        pub partition_id: i64,
151        /// Client can only use compression codecs from this set to write
152        /// messages to topic. Otherwise session will be closed with BAD_REQUEST.
153        #[prost(message, optional, tag = "4")]
154        pub supported_codecs: ::core::option::Option<super::SupportedCodecs>,
155    }
156    /// Represents portion of client messages.
157    #[allow(clippy::derive_partial_eq_without_eq)]
158    #[derive(Clone, PartialEq, ::prost::Message)]
159    pub struct WriteRequest {
160        #[prost(message, repeated, tag = "1")]
161        pub messages: ::prost::alloc::vec::Vec<write_request::MessageData>,
162        /// Codec that is used for data compression.
163        /// See enum Codec above for values.
164        #[prost(int32, tag = "2")]
165        pub codec: i32,
166    }
167    /// Nested message and enum types in `WriteRequest`.
168    pub mod write_request {
169        #[allow(clippy::derive_partial_eq_without_eq)]
170        #[derive(Clone, PartialEq, ::prost::Message)]
171        pub struct MessageData {
172            /// Message sequence number, provided by client for deduplication.
173            /// Starts at 1
174            #[prost(int64, tag = "1")]
175            pub seq_no: i64,
176            /// Creation timestamp
177            #[prost(message, optional, tag = "2")]
178            pub created_at: ::core::option::Option<
179                super::super::super::super::google::protobuf::Timestamp,
180            >,
181            /// Compressed client message body.
182            #[prost(bytes = "vec", tag = "3")]
183            pub data: ::prost::alloc::vec::Vec<u8>,
184            /// Uncompressed size of client message body.
185            #[prost(int64, tag = "4")]
186            pub uncompressed_size: i64,
187            /// Per-message override for respective write session settings.
188            #[prost(oneof = "message_data::Partitioning", tags = "5, 6")]
189            pub partitioning: ::core::option::Option<message_data::Partitioning>,
190        }
191        /// Nested message and enum types in `MessageData`.
192        pub mod message_data {
193            /// Per-message override for respective write session settings.
194            #[allow(clippy::derive_partial_eq_without_eq)]
195            #[derive(Clone, PartialEq, ::prost::Oneof)]
196            pub enum Partitioning {
197                /// All messages with given pair (producer_id, message_group_id)
198                /// go to single partition in order of writes.
199                #[prost(string, tag = "5")]
200                MessageGroupId(::prost::alloc::string::String),
201                /// Explicit partition id to write to.
202                #[prost(int64, tag = "6")]
203                PartitionId(i64),
204            }
205        }
206    }
207    /// Message that represents acknowledgment for sequence of client messages.
208    /// This sequence is persisted together so write statistics is for messages
209    /// batch.
210    #[allow(clippy::derive_partial_eq_without_eq)]
211    #[derive(Clone, PartialEq, ::prost::Message)]
212    pub struct WriteResponse {
213        /// Number of acks is equal to number of messages in the corresponding
214        /// WriteRequests.
215        #[prost(message, repeated, tag = "1")]
216        pub acks: ::prost::alloc::vec::Vec<write_response::WriteAck>,
217        /// Assigned partition for all client messages inside this batch.
218        /// This actual partition may differ from that returned in InitResponse
219        /// or other WriteResponses in this write session.
220        #[prost(int64, tag = "2")]
221        pub partition_id: i64,
222        /// Write statistics for this sequence of client messages.
223        #[prost(message, optional, tag = "3")]
224        pub write_statistics: ::core::option::Option<write_response::WriteStatistics>,
225    }
226    /// Nested message and enum types in `WriteResponse`.
227    pub mod write_response {
228        /// Acknowledgment for one persistently written message.
229        #[allow(clippy::derive_partial_eq_without_eq)]
230        #[derive(Clone, PartialEq, ::prost::Message)]
231        pub struct WriteAck {
232            /// Sequence number as in WriteRequest.
233            #[prost(int64, tag = "1")]
234            pub seq_no: i64,
235            /// Either message is written for the first time or duplicate.
236            #[prost(oneof = "write_ack::MessageWriteStatus", tags = "2, 3")]
237            pub message_write_status: ::core::option::Option<
238                write_ack::MessageWriteStatus,
239            >,
240        }
241        /// Nested message and enum types in `WriteAck`.
242        pub mod write_ack {
243            #[allow(clippy::derive_partial_eq_without_eq)]
244            #[derive(Clone, PartialEq, ::prost::Message)]
245            pub struct Written {
246                /// Assigned partition offset.
247                #[prost(int64, tag = "1")]
248                pub offset: i64,
249            }
250            #[allow(clippy::derive_partial_eq_without_eq)]
251            #[derive(Clone, PartialEq, ::prost::Message)]
252            pub struct Skipped {
253                #[prost(enumeration = "skipped::Reason", tag = "1")]
254                pub reason: i32,
255            }
256            /// Nested message and enum types in `Skipped`.
257            pub mod skipped {
258                #[derive(
259                    Clone,
260                    Copy,
261                    Debug,
262                    PartialEq,
263                    Eq,
264                    Hash,
265                    PartialOrd,
266                    Ord,
267                    ::prost::Enumeration
268                )]
269                #[repr(i32)]
270                pub enum Reason {
271                    Unspecified = 0,
272                    AlreadyWritten = 1,
273                }
274                impl Reason {
275                    /// String value of the enum field names used in the ProtoBuf definition.
276                    ///
277                    /// The values are not transformed in any way and thus are considered stable
278                    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
279                    pub fn as_str_name(&self) -> &'static str {
280                        match self {
281                            Reason::Unspecified => "REASON_UNSPECIFIED",
282                            Reason::AlreadyWritten => "REASON_ALREADY_WRITTEN",
283                        }
284                    }
285                    /// Creates an enum from field names used in the ProtoBuf definition.
286                    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
287                        match value {
288                            "REASON_UNSPECIFIED" => Some(Self::Unspecified),
289                            "REASON_ALREADY_WRITTEN" => Some(Self::AlreadyWritten),
290                            _ => None,
291                        }
292                    }
293                }
294            }
295            /// Either message is written for the first time or duplicate.
296            #[allow(clippy::derive_partial_eq_without_eq)]
297            #[derive(Clone, PartialEq, ::prost::Oneof)]
298            pub enum MessageWriteStatus {
299                #[prost(message, tag = "2")]
300                Written(Written),
301                #[prost(message, tag = "3")]
302                Skipped(Skipped),
303            }
304        }
305        /// Message with write statistics.
306        #[allow(clippy::derive_partial_eq_without_eq)]
307        #[derive(Clone, PartialEq, ::prost::Message)]
308        pub struct WriteStatistics {
309            /// Time spent in persisting of data. Same for each message in
310            /// response.
311            #[prost(message, optional, tag = "1")]
312            pub persisting_time: ::core::option::Option<
313                super::super::super::super::google::protobuf::Duration,
314            >,
315            /// Time spent in queue before persisting, minimal of all messages in
316            /// response.
317            #[prost(message, optional, tag = "2")]
318            pub min_queue_wait_time: ::core::option::Option<
319                super::super::super::super::google::protobuf::Duration,
320            >,
321            /// Time spent in queue before persisting, maximal of all messages in
322            /// response.
323            #[prost(message, optional, tag = "3")]
324            pub max_queue_wait_time: ::core::option::Option<
325                super::super::super::super::google::protobuf::Duration,
326            >,
327            /// Time spent awaiting for partition write quota. Same for each
328            /// message in response.
329            #[prost(message, optional, tag = "4")]
330            pub partition_quota_wait_time: ::core::option::Option<
331                super::super::super::super::google::protobuf::Duration,
332            >,
333            /// Time spent awaiting for topic write quota. Same for each message
334            /// in response.
335            #[prost(message, optional, tag = "5")]
336            pub topic_quota_wait_time: ::core::option::Option<
337                super::super::super::super::google::protobuf::Duration,
338            >,
339        }
340    }
341}
342/// Messages for bidirectional streaming rpc StreamRead
343#[allow(clippy::derive_partial_eq_without_eq)]
344#[derive(Clone, PartialEq, ::prost::Message)]
345pub struct StreamReadMessage {}
346/// Nested message and enum types in `StreamReadMessage`.
347pub mod stream_read_message {
348    /// Within a StreamRead session delivered messages are separated by
349    /// partition. Reads from a single partition are represented by a partition
350    /// session.
351    #[allow(clippy::derive_partial_eq_without_eq)]
352    #[derive(Clone, PartialEq, ::prost::Message)]
353    pub struct PartitionSession {
354        /// Identitifier of partition session. Unique inside one RPC call.
355        #[prost(int64, tag = "1")]
356        pub partition_session_id: i64,
357        /// Topic path of partition.
358        #[prost(string, tag = "2")]
359        pub path: ::prost::alloc::string::String,
360        /// Partition identifier.
361        #[prost(int64, tag = "3")]
362        pub partition_id: i64,
363    }
364    /// Client-server message for read session. Contains one of:
365    ///      InitRequest - handshake request.
366    ///      ReadRequest - request for data.
367    ///      CommitOffsetRequest - request for commit of some read data.
368    ///      PartitionSessionStatusRequest - request for session status
369    ///      UpdateTokenRequest - request to update auth token
370    ///
371    ///      StartPartitionSessionResponse - Response to
372    ///      StreamReadServerMessage.StartPartitionSessionRequest.
373    ///          Client signals it is ready to get data from partition.
374    ///      StopPartitionSessionResponse - Response to
375    ///      StreamReadServerMessage.StopPartitionSessionRequest.
376    ///          Client signals it has finished working with partition. Mandatory
377    ///          for graceful stop,  otherwise.
378    #[allow(clippy::derive_partial_eq_without_eq)]
379    #[derive(Clone, PartialEq, ::prost::Message)]
380    pub struct FromClient {
381        #[prost(oneof = "from_client::ClientMessage", tags = "1, 2, 3, 4, 5, 6, 7")]
382        pub client_message: ::core::option::Option<from_client::ClientMessage>,
383    }
384    /// Nested message and enum types in `FromClient`.
385    pub mod from_client {
386        #[allow(clippy::derive_partial_eq_without_eq)]
387        #[derive(Clone, PartialEq, ::prost::Oneof)]
388        pub enum ClientMessage {
389            /// Client requests.
390            #[prost(message, tag = "1")]
391            InitRequest(super::InitRequest),
392            #[prost(message, tag = "2")]
393            ReadRequest(super::ReadRequest),
394            #[prost(message, tag = "3")]
395            CommitOffsetRequest(super::CommitOffsetRequest),
396            #[prost(message, tag = "4")]
397            PartitionSessionStatusRequest(super::PartitionSessionStatusRequest),
398            #[prost(message, tag = "5")]
399            UpdateTokenRequest(super::super::UpdateTokenRequest),
400            /// Responses to respective server commands.
401            #[prost(message, tag = "6")]
402            StartPartitionSessionResponse(super::StartPartitionSessionResponse),
403            #[prost(message, tag = "7")]
404            StopPartitionSessionResponse(super::StopPartitionSessionResponse),
405        }
406    }
407    /// Server-client message for read session. Contains one of:
408    ///      InitResponse - handshake response from server.
409    ///      ReadResponse - portion of data.
410    ///      CommitOffsetResponse - acknowledgment for commit.
411    ///      PartitionSessionStatusResponse - server response with partition
412    ///      session status. UpdateTokenResponse - acknowledgment of token update.
413    ///
414    ///      StartPartitionSessionRequest - command from server to create a
415    ///      partition session. StopPartitionSessionRequest - command from server
416    ///      to destroy a partition session.
417    #[allow(clippy::derive_partial_eq_without_eq)]
418    #[derive(Clone, PartialEq, ::prost::Message)]
419    pub struct FromServer {
420        /// Server status of response.
421        #[prost(enumeration = "super::super::status_ids::StatusCode", tag = "1")]
422        pub status: i32,
423        /// Issues if any.
424        #[prost(message, repeated, tag = "2")]
425        pub issues: ::prost::alloc::vec::Vec<super::super::issue::IssueMessage>,
426        #[prost(oneof = "from_server::ServerMessage", tags = "3, 4, 5, 6, 7, 8, 9")]
427        pub server_message: ::core::option::Option<from_server::ServerMessage>,
428    }
429    /// Nested message and enum types in `FromServer`.
430    pub mod from_server {
431        #[allow(clippy::derive_partial_eq_without_eq)]
432        #[derive(Clone, PartialEq, ::prost::Oneof)]
433        pub enum ServerMessage {
434            /// Responses to respective client requests.
435            #[prost(message, tag = "3")]
436            InitResponse(super::InitResponse),
437            #[prost(message, tag = "4")]
438            ReadResponse(super::ReadResponse),
439            #[prost(message, tag = "5")]
440            CommitOffsetResponse(super::CommitOffsetResponse),
441            #[prost(message, tag = "6")]
442            PartitionSessionStatusResponse(super::PartitionSessionStatusResponse),
443            #[prost(message, tag = "7")]
444            UpdateTokenResponse(super::super::UpdateTokenResponse),
445            /// Server commands.
446            #[prost(message, tag = "8")]
447            StartPartitionSessionRequest(super::StartPartitionSessionRequest),
448            #[prost(message, tag = "9")]
449            StopPartitionSessionRequest(super::StopPartitionSessionRequest),
450        }
451    }
452    /// Handshake request.
453    #[allow(clippy::derive_partial_eq_without_eq)]
454    #[derive(Clone, PartialEq, ::prost::Message)]
455    pub struct InitRequest {
456        /// Message that describes topic to read.
457        /// Topics that will be read by this session.
458        #[prost(message, repeated, tag = "1")]
459        pub topics_read_settings: ::prost::alloc::vec::Vec<
460            init_request::TopicReadSettings,
461        >,
462        /// Path of consumer that is used for reading by this session.
463        #[prost(string, tag = "2")]
464        pub consumer: ::prost::alloc::string::String,
465        /// Optional name. Will be shown in debug stat.
466        #[prost(string, tag = "3")]
467        pub reader_name: ::prost::alloc::string::String,
468    }
469    /// Nested message and enum types in `InitRequest`.
470    pub mod init_request {
471        #[allow(clippy::derive_partial_eq_without_eq)]
472        #[derive(Clone, PartialEq, ::prost::Message)]
473        pub struct TopicReadSettings {
474            /// Topic path.
475            #[prost(string, tag = "1")]
476            pub path: ::prost::alloc::string::String,
477            /// Partitions that will be read by this session.
478            /// If list is empty - then session will read all partitions.
479            #[prost(int64, repeated, tag = "2")]
480            pub partition_ids: ::prost::alloc::vec::Vec<i64>,
481            /// Skip all messages that has write timestamp smaller than now -
482            /// max_lag. Zero means infinite lag.
483            #[prost(message, optional, tag = "3")]
484            pub max_lag: ::core::option::Option<
485                super::super::super::super::google::protobuf::Duration,
486            >,
487            /// Read data only after this timestamp from this topic.
488            /// Read only messages with 'written_at' value greater or equal than
489            /// this timestamp.
490            #[prost(message, optional, tag = "4")]
491            pub read_from: ::core::option::Option<
492                super::super::super::super::google::protobuf::Timestamp,
493            >,
494        }
495    }
496    /// Handshake response.
497    #[allow(clippy::derive_partial_eq_without_eq)]
498    #[derive(Clone, PartialEq, ::prost::Message)]
499    pub struct InitResponse {
500        /// Read session identifier for debug purposes.
501        #[prost(string, tag = "1")]
502        pub session_id: ::prost::alloc::string::String,
503    }
504    /// Message that represents client readiness for receiving more data.
505    #[allow(clippy::derive_partial_eq_without_eq)]
506    #[derive(Clone, PartialEq, ::prost::Message)]
507    pub struct ReadRequest {
508        /// Server and client each keep track of total bytes size of all
509        /// ReadResponses. When client is ready to receive N more bytes in
510        /// responses (to increment possible total by N), it sends a ReadRequest
511        /// with bytes_size = N. bytes_size value must be positive. So in
512        /// expression 'A = (sum of bytes_size in all ReadRequests) - (sum of
513        /// bytes_size in all ReadResponses)'
514        ///    server will keep A (available size for responses) non-negative.
515        /// But there is an exception. If server receives ReadRequest, and the
516        /// first message in response exceeds A - then it will still be
517        /// delivered, and A will become negative until enough additional
518        /// ReadRequests.
519        ///
520        /// Example:
521        /// 1) Let client have 200 bytes buffer. It sends ReadRequest with
522        /// bytes_size = 200; 2) Server may return one ReadResponse with
523        /// bytes_size = 70 and than another 80 bytes response;
524        ///     now client buffer has 50 free bytes, server is free to send up to
525        ///     50 bytes in responses.
526        /// 3) Client processes 100 bytes from buffer, now buffer free space is
527        /// 150 bytes,
528        ///     so client sends ReadRequest with bytes_size = 100;
529        /// 4) Server is free to send up to 50 + 100 = 150 bytes. But the next
530        /// read message is too big,
531        ///     and it sends 160 bytes ReadResponse.
532        /// 5) Let's assume client somehow processes it, and its 200 bytes buffer
533        /// is free again.
534        ///     It shoud account for excess 10 bytes and send ReadRequest with
535        ///     bytes_size = 210.
536        #[prost(int64, tag = "1")]
537        pub bytes_size: i64,
538    }
539    /// Data read.
540    #[allow(clippy::derive_partial_eq_without_eq)]
541    #[derive(Clone, PartialEq, ::prost::Message)]
542    pub struct ReadResponse {
543        /// Client messages, divided by partitions.
544        #[prost(message, repeated, tag = "1")]
545        pub partition_data: ::prost::alloc::vec::Vec<read_response::PartitionData>,
546        /// Total size in bytes of this response as calculated by server.
547        /// See ReadRequest comment above.
548        #[prost(int64, tag = "2")]
549        pub bytes_size: i64,
550    }
551    /// Nested message and enum types in `ReadResponse`.
552    pub mod read_response {
553        /// One client message representation.
554        #[allow(clippy::derive_partial_eq_without_eq)]
555        #[derive(Clone, PartialEq, ::prost::Message)]
556        pub struct MessageData {
557            /// Partition offset in partition that assigned for message.
558            ///
559            /// unique value for clientside deduplication -
560            #[prost(int64, tag = "1")]
561            pub offset: i64,
562            /// Topic:Partition:Offset
563            /// Sequence number that provided with message on write from client.
564            #[prost(int64, tag = "2")]
565            pub seq_no: i64,
566            /// Timestamp of creation of message provided on write from client.
567            #[prost(message, optional, tag = "3")]
568            pub created_at: ::core::option::Option<
569                super::super::super::super::google::protobuf::Timestamp,
570            >,
571            /// Compressed client message body.
572            #[prost(bytes = "vec", tag = "5")]
573            pub data: ::prost::alloc::vec::Vec<u8>,
574            /// Uncompressed size of client message body.
575            /// sent as is from WriteRequest, without check on server side. May
576            /// be empty (for writes from old client) or wrong (if bug in
577            /// writer). Use it for optimization purposes only, don't trust it.
578            #[prost(int64, tag = "6")]
579            pub uncompressed_size: i64,
580            /// Filled if message_group_id was set on message write.
581            #[prost(string, tag = "7")]
582            pub message_group_id: ::prost::alloc::string::String,
583        }
584        /// Representation of sequence of client messages from one write session.
585        #[allow(clippy::derive_partial_eq_without_eq)]
586        #[derive(Clone, PartialEq, ::prost::Message)]
587        pub struct Batch {
588            /// List of client messages.
589            #[prost(message, repeated, tag = "1")]
590            pub message_data: ::prost::alloc::vec::Vec<MessageData>,
591            /// Producer identifier provided by client for this batch of client
592            /// messages.
593            #[prost(string, tag = "2")]
594            pub producer_id: ::prost::alloc::string::String,
595            /// Client metadata attached to write session, the same for all
596            /// messages in batch.
597            #[prost(map = "string, string", tag = "3")]
598            pub write_session_meta: ::std::collections::HashMap<
599                ::prost::alloc::string::String,
600                ::prost::alloc::string::String,
601            >,
602            /// Codec that is used for data compression.
603            /// See enum Codec above for values.
604            #[prost(int32, tag = "4")]
605            pub codec: i32,
606            /// Persist timestamp on server for batch.
607            #[prost(message, optional, tag = "5")]
608            pub written_at: ::core::option::Option<
609                super::super::super::super::google::protobuf::Timestamp,
610            >,
611        }
612        /// Representation of sequence of messages from one partition.
613        #[allow(clippy::derive_partial_eq_without_eq)]
614        #[derive(Clone, PartialEq, ::prost::Message)]
615        pub struct PartitionData {
616            #[prost(int64, tag = "1")]
617            pub partition_session_id: i64,
618            /// Client messages, divided by write sessions.
619            #[prost(message, repeated, tag = "2")]
620            pub batches: ::prost::alloc::vec::Vec<Batch>,
621        }
622    }
623    /// Signal for server that client processed some read data.
624    #[allow(clippy::derive_partial_eq_without_eq)]
625    #[derive(Clone, PartialEq, ::prost::Message)]
626    pub struct CommitOffsetRequest {
627        /// Partition offsets that indicates processed data.
628        #[prost(message, repeated, tag = "1")]
629        pub commit_offsets: ::prost::alloc::vec::Vec<
630            commit_offset_request::PartitionCommitOffset,
631        >,
632    }
633    /// Nested message and enum types in `CommitOffsetRequest`.
634    pub mod commit_offset_request {
635        /// Message that is used for describing commit.
636        #[allow(clippy::derive_partial_eq_without_eq)]
637        #[derive(Clone, PartialEq, ::prost::Message)]
638        pub struct PartitionCommitOffset {
639            /// Identifier of partition session with data to commit.
640            #[prost(int64, tag = "1")]
641            pub partition_session_id: i64,
642            /// Processed offsets ranges, repeated in case of disjoint ranges.
643            #[prost(message, repeated, tag = "2")]
644            pub offsets: ::prost::alloc::vec::Vec<super::super::OffsetsRange>,
645        }
646    }
647    /// Acknowledgement for commits.
648    #[allow(clippy::derive_partial_eq_without_eq)]
649    #[derive(Clone, PartialEq, ::prost::Message)]
650    pub struct CommitOffsetResponse {
651        /// Partitions with progress.
652        #[prost(message, repeated, tag = "1")]
653        pub partitions_committed_offsets: ::prost::alloc::vec::Vec<
654            commit_offset_response::PartitionCommittedOffset,
655        >,
656    }
657    /// Nested message and enum types in `CommitOffsetResponse`.
658    pub mod commit_offset_response {
659        /// Per-partition commit representation.
660        #[allow(clippy::derive_partial_eq_without_eq)]
661        #[derive(Clone, PartialEq, ::prost::Message)]
662        pub struct PartitionCommittedOffset {
663            /// Partition session identifier.
664            #[prost(int64, tag = "1")]
665            pub partition_session_id: i64,
666            /// Upper bound for committed offsets.
667            #[prost(int64, tag = "2")]
668            pub committed_offset: i64,
669        }
670    }
671    #[allow(clippy::derive_partial_eq_without_eq)]
672    #[derive(Clone, PartialEq, ::prost::Message)]
673    pub struct PartitionSessionStatusRequest {
674        #[prost(int64, tag = "1")]
675        pub partition_session_id: i64,
676    }
677    /// Response for status request.
678    #[allow(clippy::derive_partial_eq_without_eq)]
679    #[derive(Clone, PartialEq, ::prost::Message)]
680    pub struct PartitionSessionStatusResponse {
681        /// Identifier of partition session whose status was requested.
682        #[prost(int64, tag = "1")]
683        pub partition_session_id: i64,
684        /// Partition contains messages with offsets in range [start, end).
685        #[prost(message, optional, tag = "2")]
686        pub partition_offsets: ::core::option::Option<super::OffsetsRange>,
687        /// Each offset up to and including (committed_offset - 1) was fully
688        /// processed.
689        #[prost(int64, tag = "3")]
690        pub committed_offset: i64,
691        /// Write timestamp of next message written to this partition will be no
692        /// less than write_time_high_watermark.
693        #[prost(message, optional, tag = "4")]
694        pub write_time_high_watermark: ::core::option::Option<
695            super::super::super::google::protobuf::Timestamp,
696        >,
697    }
698    /// Command from server to create and start a partition session.
699    /// Client must respond with StartPartitionSessionResponse when ready to
700    /// receive data from this partition.
701    #[allow(clippy::derive_partial_eq_without_eq)]
702    #[derive(Clone, PartialEq, ::prost::Message)]
703    pub struct StartPartitionSessionRequest {
704        /// Partition session description.
705        #[prost(message, optional, tag = "1")]
706        pub partition_session: ::core::option::Option<PartitionSession>,
707        /// Each offset up to and including (committed_offset - 1) was fully
708        /// processed.
709        #[prost(int64, tag = "2")]
710        pub committed_offset: i64,
711        /// Partition contains messages with offsets in range [start, end).
712        #[prost(message, optional, tag = "3")]
713        pub partition_offsets: ::core::option::Option<super::OffsetsRange>,
714    }
715    /// Signal for server that cient is ready to recive data for partition.
716    #[allow(clippy::derive_partial_eq_without_eq)]
717    #[derive(Clone, PartialEq, ::prost::Message)]
718    pub struct StartPartitionSessionResponse {
719        /// Partition session identifier of partition to start read.
720        #[prost(int64, tag = "1")]
721        pub partition_session_id: i64,
722        /// Reads in this partition session will start from offset no less than
723        /// read_offset. If read_offset is set, server will check that
724        /// read_offset is no less that actual committed offset. If check fails
725        /// then server will send an error message (status != SUCCESS) and close
726        /// stream.
727        ///
728        /// If read_offset is not set, no check will be made.
729        /// InitRequest.max_lag and InitRequest.read_from could lead to skip of
730        /// more messages. Server will return data starting from offset that is
731        /// maximum of actual committed offset, read_offset (if set) and offsets
732        /// calculated from InitRequest.max_lag and InitRequest.read_from.
733        #[prost(int64, tag = "2")]
734        pub read_offset: i64,
735        /// All messages with offset less than commit_offset are processed by
736        /// client. Server will commit this position if this is not done yet.
737        #[prost(int64, tag = "3")]
738        pub commit_offset: i64,
739    }
740    /// Command from server to stop and destroy concrete partition session.
741    #[allow(clippy::derive_partial_eq_without_eq)]
742    #[derive(Clone, PartialEq, ::prost::Message)]
743    pub struct StopPartitionSessionRequest {
744        /// Identifier of partition session that is ready to be closed by server.
745        #[prost(int64, tag = "1")]
746        pub partition_session_id: i64,
747        /// Flag of graceful stop.
748        /// If set, server will wait for response from client before giving this
749        /// partition to other read session. Server will not send more data from
750        /// this partition. Client can process all received data and wait for
751        /// commit and only after send response. If False then server gives
752        /// partition for other session right now. All further commits for this
753        /// partition session has no effect. Server is not waiting for response.
754        #[prost(bool, tag = "2")]
755        pub graceful: bool,
756        /// Upper bound for committed offsets.
757        #[prost(int64, tag = "3")]
758        pub committed_offset: i64,
759    }
760    /// Signal for server that client finished working with this partition.
761    /// Must be sent only after corresponding StopPartitionSessionRequest from
762    /// server. Server will give this partition to other read session only after
763    /// StopPartitionSessionResponse signal.
764    #[allow(clippy::derive_partial_eq_without_eq)]
765    #[derive(Clone, PartialEq, ::prost::Message)]
766    pub struct StopPartitionSessionResponse {
767        /// Partition session identifier of partition session that is released by
768        /// client.
769        #[prost(int64, tag = "1")]
770        pub partition_session_id: i64,
771    }
772}
773/// Add offsets to transaction request sent from client to server.
774#[allow(clippy::derive_partial_eq_without_eq)]
775#[derive(Clone, PartialEq, ::prost::Message)]
776pub struct AddOffsetsToTransactionRequest {
777    #[prost(message, optional, tag = "1")]
778    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
779    /// Session identifier from TableService.
780    #[prost(string, tag = "2")]
781    pub session_id: ::prost::alloc::string::String,
782    /// Transaction identifier from TableService.
783    #[prost(message, optional, tag = "3")]
784    pub tx_control: ::core::option::Option<super::table::TransactionControl>,
785    /// Ranges of offsets by topics.
786    #[prost(message, repeated, tag = "4")]
787    pub topics: ::prost::alloc::vec::Vec<
788        add_offsets_to_transaction_request::TopicOffsets,
789    >,
790    #[prost(string, tag = "5")]
791    pub consumer: ::prost::alloc::string::String,
792}
793/// Nested message and enum types in `AddOffsetsToTransactionRequest`.
794pub mod add_offsets_to_transaction_request {
795    #[allow(clippy::derive_partial_eq_without_eq)]
796    #[derive(Clone, PartialEq, ::prost::Message)]
797    pub struct TopicOffsets {
798        /// Topic path.
799        #[prost(string, tag = "1")]
800        pub path: ::prost::alloc::string::String,
801        /// Ranges of offsets by partitions.
802        #[prost(message, repeated, tag = "2")]
803        pub partitions: ::prost::alloc::vec::Vec<topic_offsets::PartitionOffsets>,
804    }
805    /// Nested message and enum types in `TopicOffsets`.
806    pub mod topic_offsets {
807        #[allow(clippy::derive_partial_eq_without_eq)]
808        #[derive(Clone, PartialEq, ::prost::Message)]
809        pub struct PartitionOffsets {
810            /// Partition identifier.
811            #[prost(int64, tag = "1")]
812            pub partition_id: i64,
813            /// List of offset ranges.
814            #[prost(message, repeated, tag = "2")]
815            pub partition_offsets: ::prost::alloc::vec::Vec<super::super::OffsetsRange>,
816        }
817    }
818}
819/// Add offsets to transaction response sent from server to client.
820#[allow(clippy::derive_partial_eq_without_eq)]
821#[derive(Clone, PartialEq, ::prost::Message)]
822pub struct AddOffsetsToTransactionResponse {
823    /// Result of request will be inside operation.
824    #[prost(message, optional, tag = "1")]
825    pub operation: ::core::option::Option<super::operations::Operation>,
826}
827/// Add offsets to transaction result message that will be inside
828/// AddOffsetsToTransactionResponse.operation.
829#[allow(clippy::derive_partial_eq_without_eq)]
830#[derive(Clone, PartialEq, ::prost::Message)]
831pub struct AddOffsetsToTransactionResult {}
832/// message representing statistics by seleveral windows
833#[allow(clippy::derive_partial_eq_without_eq)]
834#[derive(Clone, PartialEq, ::prost::Message)]
835pub struct MultipleWindowsStat {
836    #[prost(int64, tag = "1")]
837    pub per_minute: i64,
838    #[prost(int64, tag = "2")]
839    pub per_hour: i64,
840    #[prost(int64, tag = "3")]
841    pub per_day: i64,
842}
843/// Consumer description.
844#[allow(clippy::derive_partial_eq_without_eq)]
845#[derive(Clone, PartialEq, ::prost::Message)]
846pub struct Consumer {
847    /// Must have valid not empty name as a key.
848    #[prost(string, tag = "1")]
849    pub name: ::prost::alloc::string::String,
850    /// Consumer may be marked as 'important'. It means messages for this
851    /// consumer will never expire due to retention. User should take care that
852    /// such consumer never stalls, to prevent running out of disk space. Flag
853    /// that this consumer is important.
854    #[prost(bool, tag = "2")]
855    pub important: bool,
856    /// All messages with smaller server written_at timestamp will be skipped.
857    #[prost(message, optional, tag = "3")]
858    pub read_from: ::core::option::Option<super::super::google::protobuf::Timestamp>,
859    /// List of supported codecs by this consumer.
860    /// supported_codecs on topic must be contained inside this list.
861    #[prost(message, optional, tag = "5")]
862    pub supported_codecs: ::core::option::Option<SupportedCodecs>,
863    /// Attributes of consumer
864    #[prost(map = "string, string", tag = "6")]
865    pub attributes: ::std::collections::HashMap<
866        ::prost::alloc::string::String,
867        ::prost::alloc::string::String,
868    >,
869    /// Filled only when requested statistics in Describe*Request.
870    #[prost(message, optional, tag = "7")]
871    pub consumer_stats: ::core::option::Option<consumer::ConsumerStats>,
872}
873/// Nested message and enum types in `Consumer`.
874pub mod consumer {
875    #[allow(clippy::derive_partial_eq_without_eq)]
876    #[derive(Clone, PartialEq, ::prost::Message)]
877    pub struct ConsumerStats {
878        /// Minimal timestamp of last read from partitions.
879        #[prost(message, optional, tag = "1")]
880        pub min_partitions_last_read_time: ::core::option::Option<
881            super::super::super::google::protobuf::Timestamp,
882        >,
883        /// Maximum of differences between timestamp of read and write timestamp
884        /// for all messages, read during last minute.
885        #[prost(message, optional, tag = "2")]
886        pub max_read_time_lag: ::core::option::Option<
887            super::super::super::google::protobuf::Duration,
888        >,
889        /// Maximum of differences between write timestamp and create timestamp
890        /// for all messages, read during last minute.
891        #[prost(message, optional, tag = "3")]
892        pub max_write_time_lag: ::core::option::Option<
893            super::super::super::google::protobuf::Duration,
894        >,
895        /// Bytes read stastics.
896        #[prost(message, optional, tag = "4")]
897        pub bytes_read: ::core::option::Option<super::MultipleWindowsStat>,
898    }
899}
900/// Consumer alter description.
901#[allow(clippy::derive_partial_eq_without_eq)]
902#[derive(Clone, PartialEq, ::prost::Message)]
903pub struct AlterConsumer {
904    /// Must have valid not empty name as a key.
905    #[prost(string, tag = "1")]
906    pub name: ::prost::alloc::string::String,
907    /// Consumer may be marked as 'important'. It means messages for this
908    /// consumer will never expire due to retention. User should take care that
909    /// such consumer never stalls, to prevent running out of disk space. Flag
910    /// that this consumer is important.
911    #[prost(bool, tag = "2")]
912    pub set_important: bool,
913    /// All messages with smaller server written_at timestamp will be skipped.
914    #[prost(message, optional, tag = "3")]
915    pub set_read_from: ::core::option::Option<super::super::google::protobuf::Timestamp>,
916    /// List of supported codecs by this consumer.
917    /// supported_codecs on topic must be contained inside this list.
918    #[prost(message, optional, tag = "5")]
919    pub set_supported_codecs: ::core::option::Option<SupportedCodecs>,
920    /// User and server attributes of consumer. Server attributes starts from "_"
921    /// and will be validated by server. Leave the value blank to drop an
922    /// attribute.
923    #[prost(map = "string, string", tag = "6")]
924    pub alter_attributes: ::std::collections::HashMap<
925        ::prost::alloc::string::String,
926        ::prost::alloc::string::String,
927    >,
928}
929/// Partitioning settings for topic.
930#[allow(clippy::derive_partial_eq_without_eq)]
931#[derive(Clone, PartialEq, ::prost::Message)]
932pub struct PartitioningSettings {
933    /// Minimum partition count auto merge would stop working at.
934    /// Zero value means default - 1.
935    #[prost(int64, tag = "1")]
936    pub min_active_partitions: i64,
937    /// Limit for total partition count, including active (open for write) and
938    /// read-only partitions. Zero value means default - 100.
939    #[prost(int64, tag = "2")]
940    pub partition_count_limit: i64,
941}
942/// Partitioning settings for topic.
943#[allow(clippy::derive_partial_eq_without_eq)]
944#[derive(Clone, PartialEq, ::prost::Message)]
945pub struct AlterPartitioningSettings {
946    /// Minimum partition count auto merge would stop working at.
947    /// Zero value means default - 1.
948    #[prost(int64, tag = "1")]
949    pub set_min_active_partitions: i64,
950    /// Limit for total partition count, including active (open for write) and
951    /// read-only partitions. Zero value means default - 100.
952    #[prost(int64, tag = "2")]
953    pub set_partition_count_limit: i64,
954}
955/// Create topic request sent from client to server.
956#[allow(clippy::derive_partial_eq_without_eq)]
957#[derive(Clone, PartialEq, ::prost::Message)]
958pub struct CreateTopicRequest {
959    #[prost(message, optional, tag = "1")]
960    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
961    /// Topic path.
962    #[prost(string, tag = "2")]
963    pub path: ::prost::alloc::string::String,
964    /// Settings for partitioning
965    #[prost(message, optional, tag = "3")]
966    pub partitioning_settings: ::core::option::Option<PartitioningSettings>,
967    /// Retention settings.
968    /// Currently, only one limit may be set, so other should not be set.
969    ///
970    /// How long data in partition should be stored. Must be greater than 0 and
971    /// less than limit for this database. Default limit - 36 hours.
972    #[prost(message, optional, tag = "4")]
973    pub retention_period: ::core::option::Option<
974        super::super::google::protobuf::Duration,
975    >,
976    /// How much data in partition should be stored. Must be greater than 0 and
977    /// less than limit for this database. Zero value means infinite limit.
978    #[prost(int64, tag = "5")]
979    pub retention_storage_mb: i64,
980    /// List of allowed codecs for writers.
981    /// Writes with codec not from this list are forbidden.
982    #[prost(message, optional, tag = "7")]
983    pub supported_codecs: ::core::option::Option<SupportedCodecs>,
984    /// Partition write speed in bytes per second. Must be less than database
985    /// limit. Zero value means default limit: 1 MB per second.
986    #[prost(int64, tag = "8")]
987    pub partition_write_speed_bytes_per_second: i64,
988    /// Burst size for write in partition, in bytes. Must be less than database
989    /// limit. Zero value means default limit: 1 MB.
990    #[prost(int64, tag = "9")]
991    pub partition_write_burst_bytes: i64,
992    /// User and server attributes of topic. Server attributes starts from "_"
993    /// and will be validated by server.
994    #[prost(map = "string, string", tag = "10")]
995    pub attributes: ::std::collections::HashMap<
996        ::prost::alloc::string::String,
997        ::prost::alloc::string::String,
998    >,
999    /// List of consumers for this topic.
1000    #[prost(message, repeated, tag = "11")]
1001    pub consumers: ::prost::alloc::vec::Vec<Consumer>,
1002    /// Metering mode for the topic in a serverless database.
1003    #[prost(enumeration = "MeteringMode", tag = "12")]
1004    pub metering_mode: i32,
1005}
1006/// Create topic response sent from server to client.
1007/// If topic is already exists then response status will be "ALREADY_EXISTS".
1008#[allow(clippy::derive_partial_eq_without_eq)]
1009#[derive(Clone, PartialEq, ::prost::Message)]
1010pub struct CreateTopicResponse {
1011    /// Result of request will be inside operation.
1012    #[prost(message, optional, tag = "1")]
1013    pub operation: ::core::option::Option<super::operations::Operation>,
1014}
1015/// Create topic result message that will be inside
1016/// CreateTopicResponse.operation.
1017#[allow(clippy::derive_partial_eq_without_eq)]
1018#[derive(Clone, PartialEq, ::prost::Message)]
1019pub struct CreateTopicResult {}
1020/// Describe topic request sent from client to server.
1021#[allow(clippy::derive_partial_eq_without_eq)]
1022#[derive(Clone, PartialEq, ::prost::Message)]
1023pub struct DescribeTopicRequest {
1024    #[prost(message, optional, tag = "1")]
1025    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
1026    /// Topic path.
1027    #[prost(string, tag = "2")]
1028    pub path: ::prost::alloc::string::String,
1029    /// Include topic statistics.
1030    #[prost(bool, tag = "3")]
1031    pub include_stats: bool,
1032}
1033/// Describe topic response sent from server to client.
1034/// If topic is not existed then response status will be "SCHEME_ERROR".
1035#[allow(clippy::derive_partial_eq_without_eq)]
1036#[derive(Clone, PartialEq, ::prost::Message)]
1037pub struct DescribeTopicResponse {
1038    /// Result of request will be inside operation.
1039    #[prost(message, optional, tag = "1")]
1040    pub operation: ::core::option::Option<super::operations::Operation>,
1041}
1042/// Describe topic result message that will be inside
1043/// DescribeTopicResponse.operation.
1044#[allow(clippy::derive_partial_eq_without_eq)]
1045#[derive(Clone, PartialEq, ::prost::Message)]
1046pub struct DescribeTopicResult {
1047    /// Description of scheme object.
1048    #[prost(message, optional, tag = "1")]
1049    pub self_: ::core::option::Option<super::scheme::Entry>,
1050    /// Settings for partitioning
1051    #[prost(message, optional, tag = "2")]
1052    pub partitioning_settings: ::core::option::Option<PartitioningSettings>,
1053    /// Partitions description.
1054    #[prost(message, repeated, tag = "3")]
1055    pub partitions: ::prost::alloc::vec::Vec<describe_topic_result::PartitionInfo>,
1056    /// Retention settings.
1057    /// Currently, only one limit may be set, so other should not be set.
1058    ///
1059    /// How long data in partition should be stored.
1060    #[prost(message, optional, tag = "4")]
1061    pub retention_period: ::core::option::Option<
1062        super::super::google::protobuf::Duration,
1063    >,
1064    /// How much data in partition should be stored.
1065    /// Zero value means infinite limit.
1066    #[prost(int64, tag = "5")]
1067    pub retention_storage_mb: i64,
1068    /// List of allowed codecs for writers.
1069    /// Writes with codec not from this list are forbidden.
1070    #[prost(message, optional, tag = "7")]
1071    pub supported_codecs: ::core::option::Option<SupportedCodecs>,
1072    /// Partition write speed in bytes per second.
1073    /// Zero value means default limit: 1 MB per second.
1074    #[prost(int64, tag = "8")]
1075    pub partition_write_speed_bytes_per_second: i64,
1076    /// Burst size for write in partition, in bytes.
1077    /// Zero value means default limit: 1 MB.
1078    #[prost(int64, tag = "9")]
1079    pub partition_write_burst_bytes: i64,
1080    /// User and server attributes of topic. Server attributes starts from "_"
1081    /// and will be validated by server.
1082    #[prost(map = "string, string", tag = "10")]
1083    pub attributes: ::std::collections::HashMap<
1084        ::prost::alloc::string::String,
1085        ::prost::alloc::string::String,
1086    >,
1087    /// List of consumers for this topic.
1088    #[prost(message, repeated, tag = "11")]
1089    pub consumers: ::prost::alloc::vec::Vec<Consumer>,
1090    /// Metering settings.
1091    #[prost(enumeration = "MeteringMode", tag = "12")]
1092    pub metering_mode: i32,
1093    /// Statistics of topic.
1094    #[prost(message, optional, tag = "13")]
1095    pub topic_stats: ::core::option::Option<describe_topic_result::TopicStats>,
1096}
1097/// Nested message and enum types in `DescribeTopicResult`.
1098pub mod describe_topic_result {
1099    #[allow(clippy::derive_partial_eq_without_eq)]
1100    #[derive(Clone, PartialEq, ::prost::Message)]
1101    pub struct PartitionInfo {
1102        /// Partition identifier.
1103        #[prost(int64, tag = "1")]
1104        pub partition_id: i64,
1105        /// Is partition open for write.
1106        #[prost(bool, tag = "2")]
1107        pub active: bool,
1108        /// Ids of partitions which was formed when this partition was split or
1109        /// merged.
1110        #[prost(int64, repeated, tag = "3")]
1111        pub child_partition_ids: ::prost::alloc::vec::Vec<i64>,
1112        /// Ids of partitions from which this partition was formed by split or
1113        /// merge.
1114        #[prost(int64, repeated, tag = "4")]
1115        pub parent_partition_ids: ::prost::alloc::vec::Vec<i64>,
1116        /// Stats for partition, filled only when include_stats in request is
1117        /// true.
1118        #[prost(message, optional, tag = "5")]
1119        pub partition_stats: ::core::option::Option<super::PartitionStats>,
1120    }
1121    #[allow(clippy::derive_partial_eq_without_eq)]
1122    #[derive(Clone, PartialEq, ::prost::Message)]
1123    pub struct TopicStats {
1124        /// Approximate size of topic.
1125        #[prost(int64, tag = "1")]
1126        pub store_size_bytes: i64,
1127        /// Minimum of timestamps of last write among all partitions.
1128        #[prost(message, optional, tag = "2")]
1129        pub min_last_write_time: ::core::option::Option<
1130            super::super::super::google::protobuf::Timestamp,
1131        >,
1132        /// Maximum of differences between write timestamp and create timestamp
1133        /// for all messages, written during last minute.
1134        #[prost(message, optional, tag = "3")]
1135        pub max_write_time_lag: ::core::option::Option<
1136            super::super::super::google::protobuf::Duration,
1137        >,
1138        /// How much bytes were written statistics.
1139        #[prost(message, optional, tag = "4")]
1140        pub bytes_written: ::core::option::Option<super::MultipleWindowsStat>,
1141    }
1142}
1143/// Describe topic's consumer request sent from client to server.
1144#[allow(clippy::derive_partial_eq_without_eq)]
1145#[derive(Clone, PartialEq, ::prost::Message)]
1146pub struct DescribeConsumerRequest {
1147    #[prost(message, optional, tag = "1")]
1148    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
1149    /// Topic path.
1150    #[prost(string, tag = "2")]
1151    pub path: ::prost::alloc::string::String,
1152    /// Consumer name;
1153    #[prost(string, tag = "3")]
1154    pub consumer: ::prost::alloc::string::String,
1155    /// Include consumer statistics.
1156    #[prost(bool, tag = "4")]
1157    pub include_stats: bool,
1158}
1159/// Describe topic's consumer response sent from server to client.
1160/// If topic is not existed then response status will be "SCHEME_ERROR".
1161#[allow(clippy::derive_partial_eq_without_eq)]
1162#[derive(Clone, PartialEq, ::prost::Message)]
1163pub struct DescribeConsumerResponse {
1164    /// Result of request will be inside operation.
1165    #[prost(message, optional, tag = "1")]
1166    pub operation: ::core::option::Option<super::operations::Operation>,
1167}
1168/// Describe topic's consumer result message that will be inside
1169/// DescribeConsumerResponse.operation.
1170#[allow(clippy::derive_partial_eq_without_eq)]
1171#[derive(Clone, PartialEq, ::prost::Message)]
1172pub struct DescribeConsumerResult {
1173    /// Description of scheme object.
1174    #[prost(message, optional, tag = "1")]
1175    pub self_: ::core::option::Option<super::scheme::Entry>,
1176    #[prost(message, optional, tag = "2")]
1177    pub consumer: ::core::option::Option<Consumer>,
1178    #[prost(message, repeated, tag = "3")]
1179    pub partitions: ::prost::alloc::vec::Vec<describe_consumer_result::PartitionInfo>,
1180}
1181/// Nested message and enum types in `DescribeConsumerResult`.
1182pub mod describe_consumer_result {
1183    #[allow(clippy::derive_partial_eq_without_eq)]
1184    #[derive(Clone, PartialEq, ::prost::Message)]
1185    pub struct PartitionInfo {
1186        /// Partition identifier.
1187        #[prost(int64, tag = "1")]
1188        pub partition_id: i64,
1189        /// Is partition open for write.
1190        #[prost(bool, tag = "2")]
1191        pub active: bool,
1192        /// Ids of partitions which was formed when this partition was split or
1193        /// merged.
1194        #[prost(int64, repeated, tag = "3")]
1195        pub child_partition_ids: ::prost::alloc::vec::Vec<i64>,
1196        /// Ids of partitions from which this partition was formed by split or
1197        /// merge.
1198        #[prost(int64, repeated, tag = "4")]
1199        pub parent_partition_ids: ::prost::alloc::vec::Vec<i64>,
1200        /// Stats for partition, filled only when include_stats in request is
1201        /// true.
1202        #[prost(message, optional, tag = "5")]
1203        pub partition_stats: ::core::option::Option<super::PartitionStats>,
1204        /// Stats for consumer of this partition, filled only when include_stats
1205        /// in request is true.
1206        #[prost(message, optional, tag = "6")]
1207        pub partition_consumer_stats: ::core::option::Option<PartitionConsumerStats>,
1208    }
1209    #[allow(clippy::derive_partial_eq_without_eq)]
1210    #[derive(Clone, PartialEq, ::prost::Message)]
1211    pub struct PartitionConsumerStats {
1212        /// Last read offset from this partition.
1213        #[prost(int64, tag = "1")]
1214        pub last_read_offset: i64,
1215        /// Committed offset for this partition.
1216        #[prost(int64, tag = "2")]
1217        pub committed_offset: i64,
1218        /// Reading this partition read session identifier.
1219        #[prost(string, tag = "3")]
1220        pub read_session_id: ::prost::alloc::string::String,
1221        /// Timestamp of providing this partition to this session by server.
1222        #[prost(message, optional, tag = "4")]
1223        pub partition_read_session_create_time: ::core::option::Option<
1224            super::super::super::google::protobuf::Timestamp,
1225        >,
1226        /// Timestamp of last read from this partition.
1227        #[prost(message, optional, tag = "5")]
1228        pub last_read_time: ::core::option::Option<
1229            super::super::super::google::protobuf::Timestamp,
1230        >,
1231        /// Maximum of differences between timestamp of read and write timestamp
1232        /// for all messages, read during last minute.
1233        #[prost(message, optional, tag = "6")]
1234        pub max_read_time_lag: ::core::option::Option<
1235            super::super::super::google::protobuf::Duration,
1236        >,
1237        /// Maximum of differences between write timestamp and create timestamp
1238        /// for all messages, read during last minute.
1239        #[prost(message, optional, tag = "7")]
1240        pub max_write_time_lag: ::core::option::Option<
1241            super::super::super::google::protobuf::Duration,
1242        >,
1243        /// How much bytes were read during several windows statistics from this
1244        /// partiton.
1245        #[prost(message, optional, tag = "8")]
1246        pub bytes_read: ::core::option::Option<super::MultipleWindowsStat>,
1247        /// Read session name, provided by client.
1248        #[prost(string, tag = "11")]
1249        pub reader_name: ::prost::alloc::string::String,
1250        /// Host where read session connected.
1251        #[prost(int32, tag = "12")]
1252        pub connection_node_id: i32,
1253    }
1254}
1255#[allow(clippy::derive_partial_eq_without_eq)]
1256#[derive(Clone, PartialEq, ::prost::Message)]
1257pub struct PartitionStats {
1258    /// Partition contains messages with offsets in range [start, end).
1259    #[prost(message, optional, tag = "1")]
1260    pub partition_offsets: ::core::option::Option<OffsetsRange>,
1261    /// Approximate size of partition.
1262    #[prost(int64, tag = "2")]
1263    pub store_size_bytes: i64,
1264    /// Timestamp of last write.
1265    #[prost(message, optional, tag = "3")]
1266    pub last_write_time: ::core::option::Option<
1267        super::super::google::protobuf::Timestamp,
1268    >,
1269    /// Maximum of differences between write timestamp and create timestamp for
1270    /// all messages, written during last minute.
1271    #[prost(message, optional, tag = "4")]
1272    pub max_write_time_lag: ::core::option::Option<
1273        super::super::google::protobuf::Duration,
1274    >,
1275    /// How much bytes were written during several windows in this partition.
1276    #[prost(message, optional, tag = "5")]
1277    pub bytes_written: ::core::option::Option<MultipleWindowsStat>,
1278    /// Host where tablet for this partition works. Useful for debugging
1279    /// purposes.
1280    #[prost(int32, tag = "8")]
1281    pub partition_node_id: i32,
1282}
1283/// Update existing topic request sent from client to server.
1284#[allow(clippy::derive_partial_eq_without_eq)]
1285#[derive(Clone, PartialEq, ::prost::Message)]
1286pub struct AlterTopicRequest {
1287    #[prost(message, optional, tag = "1")]
1288    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
1289    /// Topic path.
1290    #[prost(string, tag = "2")]
1291    pub path: ::prost::alloc::string::String,
1292    /// partitioning_settings
1293    #[prost(message, optional, tag = "3")]
1294    pub alter_partitioning_settings: ::core::option::Option<AlterPartitioningSettings>,
1295    /// Retention settings.
1296    /// Currently, only one limit may be set, so other should not be set.
1297    ///
1298    /// How long data in partition should be stored. Must be greater than 0 and
1299    /// less than limit for this database. Default limit - 36 hours.
1300    #[prost(message, optional, tag = "4")]
1301    pub set_retention_period: ::core::option::Option<
1302        super::super::google::protobuf::Duration,
1303    >,
1304    /// How much data in partition should be stored. Must be greater than 0 and
1305    /// less than limit for this database.
1306    #[prost(int64, tag = "5")]
1307    pub set_retention_storage_mb: i64,
1308    /// List of allowed codecs for writers.
1309    /// Writes with codec not from this list are forbidden.
1310    #[prost(message, optional, tag = "7")]
1311    pub set_supported_codecs: ::core::option::Option<SupportedCodecs>,
1312    /// Partition write speed in bytes per second. Must be less than database
1313    /// limit. Default limit - 1 MB/s.
1314    #[prost(int64, tag = "8")]
1315    pub set_partition_write_speed_bytes_per_second: i64,
1316    /// Burst size for write in partition, in bytes. Must be less than database
1317    /// limit. Default limit - 1 MB.
1318    #[prost(int64, tag = "9")]
1319    pub set_partition_write_burst_bytes: i64,
1320    /// User and server attributes of topic. Server attributes starts from "_"
1321    /// and will be validated by server. Leave the value blank to drop an
1322    /// attribute.
1323    #[prost(map = "string, string", tag = "10")]
1324    pub alter_attributes: ::std::collections::HashMap<
1325        ::prost::alloc::string::String,
1326        ::prost::alloc::string::String,
1327    >,
1328    /// Add consumers.
1329    #[prost(message, repeated, tag = "11")]
1330    pub add_consumers: ::prost::alloc::vec::Vec<Consumer>,
1331    /// Remove consumers (by their names)
1332    #[prost(string, repeated, tag = "12")]
1333    pub drop_consumers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1334    /// Alter consumers
1335    #[prost(message, repeated, tag = "13")]
1336    pub alter_consumers: ::prost::alloc::vec::Vec<AlterConsumer>,
1337    /// Set metering mode for topic in serverless database.
1338    #[prost(enumeration = "MeteringMode", tag = "14")]
1339    pub set_metering_mode: i32,
1340}
1341/// Update topic response sent from server to client.
1342#[allow(clippy::derive_partial_eq_without_eq)]
1343#[derive(Clone, PartialEq, ::prost::Message)]
1344pub struct AlterTopicResponse {
1345    /// Result of request will be inside operation.
1346    #[prost(message, optional, tag = "1")]
1347    pub operation: ::core::option::Option<super::operations::Operation>,
1348}
1349/// Update topic result message that will be inside
1350/// UpdateTopicResponse.operation.
1351#[allow(clippy::derive_partial_eq_without_eq)]
1352#[derive(Clone, PartialEq, ::prost::Message)]
1353pub struct AlterTopicResult {}
1354/// Drop topic request sent from client to server.
1355#[allow(clippy::derive_partial_eq_without_eq)]
1356#[derive(Clone, PartialEq, ::prost::Message)]
1357pub struct DropTopicRequest {
1358    #[prost(message, optional, tag = "1")]
1359    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
1360    /// Topic path.
1361    #[prost(string, tag = "2")]
1362    pub path: ::prost::alloc::string::String,
1363}
1364/// Drop topic response sent from server to client.
1365/// If topic not exists then response status will be "SCHEME_ERROR".
1366#[allow(clippy::derive_partial_eq_without_eq)]
1367#[derive(Clone, PartialEq, ::prost::Message)]
1368pub struct DropTopicResponse {
1369    /// Result of request will be inside operation.
1370    #[prost(message, optional, tag = "1")]
1371    pub operation: ::core::option::Option<super::operations::Operation>,
1372}
1373/// Drop topic result message that will be inside DropTopicResponse.operation.
1374#[allow(clippy::derive_partial_eq_without_eq)]
1375#[derive(Clone, PartialEq, ::prost::Message)]
1376pub struct DropTopicResult {}
1377#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1378#[repr(i32)]
1379pub enum Codec {
1380    Unspecified = 0,
1381    Raw = 1,
1382    Gzip = 2,
1383    Lzop = 3,
1384    Zstd = 4,
1385    /// User-defined codecs from 10000 to 19999
1386    Custom = 10000,
1387}
1388impl Codec {
1389    /// String value of the enum field names used in the ProtoBuf definition.
1390    ///
1391    /// The values are not transformed in any way and thus are considered stable
1392    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1393    pub fn as_str_name(&self) -> &'static str {
1394        match self {
1395            Codec::Unspecified => "CODEC_UNSPECIFIED",
1396            Codec::Raw => "CODEC_RAW",
1397            Codec::Gzip => "CODEC_GZIP",
1398            Codec::Lzop => "CODEC_LZOP",
1399            Codec::Zstd => "CODEC_ZSTD",
1400            Codec::Custom => "CODEC_CUSTOM",
1401        }
1402    }
1403    /// Creates an enum from field names used in the ProtoBuf definition.
1404    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1405        match value {
1406            "CODEC_UNSPECIFIED" => Some(Self::Unspecified),
1407            "CODEC_RAW" => Some(Self::Raw),
1408            "CODEC_GZIP" => Some(Self::Gzip),
1409            "CODEC_LZOP" => Some(Self::Lzop),
1410            "CODEC_ZSTD" => Some(Self::Zstd),
1411            "CODEC_CUSTOM" => Some(Self::Custom),
1412            _ => None,
1413        }
1414    }
1415}
1416/// Metering mode specifies the method used to determine consumption of resources
1417/// by the topic. This settings will have an effect only in a serverless
1418/// database.
1419#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1420#[repr(i32)]
1421pub enum MeteringMode {
1422    /// Use default
1423    Unspecified = 0,
1424    /// Metering based on resource reservation
1425    ReservedCapacity = 1,
1426    /// Metering based on actual consumption. Default.
1427    RequestUnits = 2,
1428}
1429impl MeteringMode {
1430    /// String value of the enum field names used in the ProtoBuf definition.
1431    ///
1432    /// The values are not transformed in any way and thus are considered stable
1433    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1434    pub fn as_str_name(&self) -> &'static str {
1435        match self {
1436            MeteringMode::Unspecified => "METERING_MODE_UNSPECIFIED",
1437            MeteringMode::ReservedCapacity => "METERING_MODE_RESERVED_CAPACITY",
1438            MeteringMode::RequestUnits => "METERING_MODE_REQUEST_UNITS",
1439        }
1440    }
1441    /// Creates an enum from field names used in the ProtoBuf definition.
1442    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1443        match value {
1444            "METERING_MODE_UNSPECIFIED" => Some(Self::Unspecified),
1445            "METERING_MODE_RESERVED_CAPACITY" => Some(Self::ReservedCapacity),
1446            "METERING_MODE_REQUEST_UNITS" => Some(Self::RequestUnits),
1447            _ => None,
1448        }
1449    }
1450}