ydb_grpc/generated/
ydb.topic.rs

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