ydb_grpc/generated/
ydb.coordination.rs

1// This file is @generated by prost-build.
2/// *
3/// Stub for unsupported messages
4/// Intentionally empty
5#[derive(serde::Serialize, serde::Deserialize)]
6#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
7pub struct Unsupported {}
8/// *
9/// Configuration settings for a coordination node
10#[derive(serde::Serialize, serde::Deserialize)]
11#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
12pub struct Config {
13    /// Initialized on creation, cannot be set
14    #[prost(string, tag = "1")]
15    pub path: ::prost::alloc::string::String,
16    /// Period in milliseconds for self-checks (default 1 second)
17    #[prost(uint32, tag = "2")]
18    pub self_check_period_millis: u32,
19    /// Grace period for sessions on leader change (default 10 seconds)
20    #[prost(uint32, tag = "3")]
21    pub session_grace_period_millis: u32,
22    /// Concistency mode for read operations
23    #[prost(enumeration = "ConsistencyMode", tag = "4")]
24    pub read_consistency_mode: i32,
25    /// Consistency mode for attach operations
26    #[prost(enumeration = "ConsistencyMode", tag = "5")]
27    pub attach_consistency_mode: i32,
28    /// Rate limiter counters mode
29    #[prost(enumeration = "RateLimiterCountersMode", tag = "6")]
30    pub rate_limiter_counters_mode: i32,
31}
32/// *
33/// Describes an active client session
34#[derive(serde::Serialize, serde::Deserialize)]
35#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
36pub struct SessionDescription {
37    /// Session id generated by the server
38    #[prost(uint64, tag = "1")]
39    pub session_id: u64,
40    /// Expiration timeout of the session
41    #[prost(uint64, tag = "2")]
42    pub timeout_millis: u64,
43    /// User-specified description of this session
44    #[prost(string, tag = "3")]
45    pub description: ::prost::alloc::string::String,
46    /// True if this session is currently attached to a client
47    #[prost(bool, tag = "4")]
48    pub attached: bool,
49}
50/// *
51/// Describes an owner or a waiter of this semaphore
52#[derive(serde::Serialize, serde::Deserialize)]
53#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
54pub struct SemaphoreSession {
55    /// A monotonically increasing id which determines locking order
56    #[prost(uint64, tag = "5")]
57    pub order_id: u64,
58    /// An id of the session which tried to acquire the semaphore
59    #[prost(uint64, tag = "1")]
60    pub session_id: u64,
61    /// A timeout in milliseconds for operation in waiters queue
62    #[prost(uint64, tag = "2")]
63    pub timeout_millis: u64,
64    /// Number of tokens for an acquire operation
65    #[prost(uint64, tag = "3")]
66    pub count: u64,
67    /// User-defined data attached to the acquire operation
68    #[prost(bytes = "vec", tag = "4")]
69    pub data: ::prost::alloc::vec::Vec<u8>,
70}
71/// *
72/// Describes the state of a semaphore
73#[derive(serde::Serialize, serde::Deserialize)]
74#[derive(Clone, PartialEq, ::prost::Message)]
75pub struct SemaphoreDescription {
76    /// Name of the semaphore
77    #[prost(string, tag = "1")]
78    pub name: ::prost::alloc::string::String,
79    /// User-defined data attached to the semaphore
80    #[prost(bytes = "vec", tag = "2")]
81    pub data: ::prost::alloc::vec::Vec<u8>,
82    /// Number of tokens currently acquired by owners
83    #[prost(uint64, tag = "7")]
84    pub count: u64,
85    /// Maximum number of tokens that may acquired
86    #[prost(uint64, tag = "3")]
87    pub limit: u64,
88    /// Ephemeral semaphores are deleted when released by all owners and waiters
89    #[prost(bool, tag = "4")]
90    pub ephemeral: bool,
91    /// A list of current owners of the semaphore
92    #[prost(message, repeated, tag = "5")]
93    pub owners: ::prost::alloc::vec::Vec<SemaphoreSession>,
94    /// A list of current waiters on the semaphore
95    #[prost(message, repeated, tag = "6")]
96    pub waiters: ::prost::alloc::vec::Vec<SemaphoreSession>,
97}
98/// *
99/// Session request message sent from client to server
100#[derive(serde::Serialize, serde::Deserialize)]
101#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
102pub struct SessionRequest {
103    #[prost(
104        oneof = "session_request::Request",
105        tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15"
106    )]
107    pub request: ::core::option::Option<session_request::Request>,
108}
109/// Nested message and enum types in `SessionRequest`.
110pub mod session_request {
111    /// *
112    /// Used for checking liveness of the connection
113    #[derive(serde::Serialize, serde::Deserialize)]
114    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
115    pub struct PingPong {
116        /// Opaque number specified in the ping message is echoed in the pong message
117        #[prost(uint64, tag = "1")]
118        pub opaque: u64,
119    }
120    /// *
121    /// First message used to start/restore a session
122    #[derive(serde::Serialize, serde::Deserialize)]
123    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
124    pub struct SessionStart {
125        /// Path to a coordination node
126        #[prost(string, tag = "1")]
127        pub path: ::prost::alloc::string::String,
128        /// Non-zero when restoring a session, 0 when creating a new session
129        #[prost(uint64, tag = "2")]
130        pub session_id: u64,
131        /// Timeout in milliseconds during which client may restore a detached session
132        #[prost(uint64, tag = "3")]
133        pub timeout_millis: u64,
134        /// User-defined description that may be used to describe the client
135        #[prost(string, tag = "4")]
136        pub description: ::prost::alloc::string::String,
137        /// Monotonically increasing sequence number generated by the client
138        /// When concurrent SessionStart requests are detected the one with
139        /// the biggest sequence number will succeed
140        #[prost(uint64, tag = "5")]
141        pub seq_no: u64,
142        /// Random bytes used to protect session from restore by other clients (max. 16 bytes)
143        #[prost(bytes = "vec", tag = "6")]
144        pub protection_key: ::prost::alloc::vec::Vec<u8>,
145    }
146    /// *
147    /// Last message used to cleanly stop session before its timeout expires
148    /// nothing
149    #[derive(serde::Serialize, serde::Deserialize)]
150    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
151    pub struct SessionStop {}
152    /// *
153    /// Used to acquire a semaphore
154    /// WARNING: a single session cannot acquire the same semaphore multiple times
155    /// Later requests override previous operations with the same semaphore,
156    /// e.g. to reduce acquired count, change timeout or attached data.
157    #[derive(serde::Serialize, serde::Deserialize)]
158    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
159    pub struct AcquireSemaphore {
160        /// Client-defined request id, echoed in the response
161        #[prost(uint64, tag = "1")]
162        pub req_id: u64,
163        /// Name of the semaphore to acquire
164        #[prost(string, tag = "2")]
165        pub name: ::prost::alloc::string::String,
166        /// Timeout in milliseconds after which operation will fail
167        /// if it's still waiting in the waiters queue
168        #[prost(uint64, tag = "3")]
169        pub timeout_millis: u64,
170        /// Number of tokens to acquire on the semaphore
171        #[prost(uint64, tag = "4")]
172        pub count: u64,
173        /// User-defined binary data that may be attached to the operation
174        #[prost(bytes = "vec", tag = "5")]
175        pub data: ::prost::alloc::vec::Vec<u8>,
176        /// Ephemeral semaphores are created with the first acquire operation
177        /// and automatically deleted with the last release operation
178        #[prost(bool, tag = "6")]
179        pub ephemeral: bool,
180    }
181    /// *
182    /// Used to release a semaphore
183    /// WARNING: a single session cannot release the same semaphore multiple times
184    /// The release operation will either remove current session from waiters
185    /// queue or release an already owned semaphore.
186    #[derive(serde::Serialize, serde::Deserialize)]
187    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
188    pub struct ReleaseSemaphore {
189        /// Client-defined request id, echoed in the response
190        #[prost(uint64, tag = "1")]
191        pub req_id: u64,
192        /// Name of the semaphore to release
193        #[prost(string, tag = "2")]
194        pub name: ::prost::alloc::string::String,
195    }
196    /// *
197    /// Used to describe semaphores and watch them for changes
198    /// WARNING: a describe operation will cancel previous watches on the same semaphore
199    #[derive(serde::Serialize, serde::Deserialize)]
200    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
201    pub struct DescribeSemaphore {
202        /// Client-defined request id, echoed in the response
203        #[prost(uint64, tag = "1")]
204        pub req_id: u64,
205        /// Name of the semaphore to describe
206        #[prost(string, tag = "2")]
207        pub name: ::prost::alloc::string::String,
208        /// Response will include owners list if true
209        #[prost(bool, tag = "3")]
210        pub include_owners: bool,
211        /// Response will include waiters list if true
212        #[prost(bool, tag = "4")]
213        pub include_waiters: bool,
214        /// Watch for changes in semaphore data
215        #[prost(bool, tag = "5")]
216        pub watch_data: bool,
217        /// Watch for changes in semaphore owners (including owners data)
218        #[prost(bool, tag = "6")]
219        pub watch_owners: bool,
220    }
221    /// *
222    /// Used to create a new semaphore
223    #[derive(serde::Serialize, serde::Deserialize)]
224    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
225    pub struct CreateSemaphore {
226        /// Client-defined request id, echoed in the response
227        #[prost(uint64, tag = "1")]
228        pub req_id: u64,
229        /// Name of the semaphore to create
230        #[prost(string, tag = "2")]
231        pub name: ::prost::alloc::string::String,
232        /// Number of tokens that may be acquired by sessions
233        #[prost(uint64, tag = "3")]
234        pub limit: u64,
235        /// User-defined data that is attached to the semaphore
236        #[prost(bytes = "vec", tag = "4")]
237        pub data: ::prost::alloc::vec::Vec<u8>,
238    }
239    /// *
240    /// Used to change semaphore data
241    #[derive(serde::Serialize, serde::Deserialize)]
242    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
243    pub struct UpdateSemaphore {
244        /// Client-defined request id, echoed in the response
245        #[prost(uint64, tag = "1")]
246        pub req_id: u64,
247        /// Name of the semaphore to update
248        #[prost(string, tag = "2")]
249        pub name: ::prost::alloc::string::String,
250        /// User-defined data that is attached to the semaphore
251        #[prost(bytes = "vec", tag = "3")]
252        pub data: ::prost::alloc::vec::Vec<u8>,
253    }
254    /// *
255    /// Used to delete an existing semaphore
256    #[derive(serde::Serialize, serde::Deserialize)]
257    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
258    pub struct DeleteSemaphore {
259        /// Client-defined request id, echoed in the response
260        #[prost(uint64, tag = "1")]
261        pub req_id: u64,
262        /// Name of the semaphore to delete
263        #[prost(string, tag = "2")]
264        pub name: ::prost::alloc::string::String,
265        /// Will delete semaphore even if currently acquired by sessions
266        #[prost(bool, tag = "3")]
267        pub force: bool,
268    }
269    #[derive(serde::Serialize, serde::Deserialize)]
270    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
271    pub enum Request {
272        #[prost(message, tag = "1")]
273        Ping(PingPong),
274        #[prost(message, tag = "2")]
275        Pong(PingPong),
276        #[prost(message, tag = "3")]
277        SessionStart(SessionStart),
278        #[prost(message, tag = "4")]
279        SessionStop(SessionStop),
280        #[prost(message, tag = "5")]
281        Unsupported5(super::Unsupported),
282        #[prost(message, tag = "6")]
283        Unsupported6(super::Unsupported),
284        #[prost(message, tag = "7")]
285        AcquireSemaphore(AcquireSemaphore),
286        #[prost(message, tag = "8")]
287        ReleaseSemaphore(ReleaseSemaphore),
288        #[prost(message, tag = "9")]
289        DescribeSemaphore(DescribeSemaphore),
290        #[prost(message, tag = "10")]
291        CreateSemaphore(CreateSemaphore),
292        #[prost(message, tag = "11")]
293        UpdateSemaphore(UpdateSemaphore),
294        #[prost(message, tag = "12")]
295        DeleteSemaphore(DeleteSemaphore),
296        #[prost(message, tag = "13")]
297        Unsupported13(super::Unsupported),
298        #[prost(message, tag = "14")]
299        Unsupported14(super::Unsupported),
300        #[prost(message, tag = "15")]
301        Unsupported15(super::Unsupported),
302    }
303}
304/// *
305/// Session response message sent from server to client
306#[derive(serde::Serialize, serde::Deserialize)]
307#[derive(Clone, PartialEq, ::prost::Message)]
308pub struct SessionResponse {
309    #[prost(
310        oneof = "session_response::Response",
311        tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18"
312    )]
313    pub response: ::core::option::Option<session_response::Response>,
314}
315/// Nested message and enum types in `SessionResponse`.
316pub mod session_response {
317    /// *
318    /// Used for checking liveness of the connection
319    #[derive(serde::Serialize, serde::Deserialize)]
320    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
321    pub struct PingPong {
322        /// Opaque number specified in the ping message is echoed in the pong message
323        #[prost(uint64, tag = "1")]
324        pub opaque: u64,
325    }
326    /// *
327    /// Used to report connection and session level failures
328    #[derive(serde::Serialize, serde::Deserialize)]
329    #[derive(Clone, PartialEq, ::prost::Message)]
330    pub struct Failure {
331        #[prost(enumeration = "super::super::status_ids::StatusCode", tag = "1")]
332        pub status: i32,
333        #[prost(message, repeated, tag = "2")]
334        pub issues: ::prost::alloc::vec::Vec<super::super::issue::IssueMessage>,
335    }
336    /// *
337    /// Used to report a successful session create/restore operation
338    #[derive(serde::Serialize, serde::Deserialize)]
339    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
340    pub struct SessionStarted {
341        /// A server generation id that may be used for restoring the session
342        #[prost(uint64, tag = "1")]
343        pub session_id: u64,
344        /// Timeout in milliseconds that will be used by the server
345        #[prost(uint64, tag = "2")]
346        pub timeout_millis: u64,
347    }
348    /// *
349    /// Used to report a successful graceful termination of the session
350    #[derive(serde::Serialize, serde::Deserialize)]
351    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
352    pub struct SessionStopped {
353        #[prost(uint64, tag = "1")]
354        pub session_id: u64,
355    }
356    /// *
357    /// Used by the server to report when an acquire operation is added to the waiters queue
358    #[derive(serde::Serialize, serde::Deserialize)]
359    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
360    pub struct AcquireSemaphorePending {
361        #[prost(uint64, tag = "1")]
362        pub req_id: u64,
363    }
364    /// *
365    /// Used by the server to report the result of an acquire operation
366    #[derive(serde::Serialize, serde::Deserialize)]
367    #[derive(Clone, PartialEq, ::prost::Message)]
368    pub struct AcquireSemaphoreResult {
369        #[prost(uint64, tag = "1")]
370        pub req_id: u64,
371        #[prost(enumeration = "super::super::status_ids::StatusCode", tag = "2")]
372        pub status: i32,
373        #[prost(message, repeated, tag = "3")]
374        pub issues: ::prost::alloc::vec::Vec<super::super::issue::IssueMessage>,
375        /// True if semaphore was acquired, false if acquire timed out
376        #[prost(bool, tag = "4")]
377        pub acquired: bool,
378    }
379    /// *
380    /// Used by the server to report the result of a release operation
381    #[derive(serde::Serialize, serde::Deserialize)]
382    #[derive(Clone, PartialEq, ::prost::Message)]
383    pub struct ReleaseSemaphoreResult {
384        #[prost(uint64, tag = "1")]
385        pub req_id: u64,
386        #[prost(enumeration = "super::super::status_ids::StatusCode", tag = "2")]
387        pub status: i32,
388        #[prost(message, repeated, tag = "3")]
389        pub issues: ::prost::alloc::vec::Vec<super::super::issue::IssueMessage>,
390        /// True if semaphore was released, false if there was no active acquire operation
391        #[prost(bool, tag = "4")]
392        pub released: bool,
393    }
394    /// *
395    /// The result of the describe operation
396    #[derive(serde::Serialize, serde::Deserialize)]
397    #[derive(Clone, PartialEq, ::prost::Message)]
398    pub struct DescribeSemaphoreResult {
399        #[prost(uint64, tag = "1")]
400        pub req_id: u64,
401        #[prost(enumeration = "super::super::status_ids::StatusCode", tag = "2")]
402        pub status: i32,
403        #[prost(message, repeated, tag = "3")]
404        pub issues: ::prost::alloc::vec::Vec<super::super::issue::IssueMessage>,
405        #[prost(message, optional, tag = "4")]
406        pub semaphore_description: ::core::option::Option<super::SemaphoreDescription>,
407        /// True if a watch has been added for the semaphore
408        #[prost(bool, tag = "5")]
409        pub watch_added: bool,
410    }
411    /// *
412    /// Used to report a change in the watched semaphore
413    #[derive(serde::Serialize, serde::Deserialize)]
414    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
415    pub struct DescribeSemaphoreChanged {
416        #[prost(uint64, tag = "1")]
417        pub req_id: u64,
418        #[prost(bool, tag = "2")]
419        pub data_changed: bool,
420        #[prost(bool, tag = "3")]
421        pub owners_changed: bool,
422    }
423    /// *
424    /// The result of semaphore creation
425    #[derive(serde::Serialize, serde::Deserialize)]
426    #[derive(Clone, PartialEq, ::prost::Message)]
427    pub struct CreateSemaphoreResult {
428        #[prost(uint64, tag = "1")]
429        pub req_id: u64,
430        #[prost(enumeration = "super::super::status_ids::StatusCode", tag = "2")]
431        pub status: i32,
432        #[prost(message, repeated, tag = "3")]
433        pub issues: ::prost::alloc::vec::Vec<super::super::issue::IssueMessage>,
434    }
435    /// *
436    /// The result of semaphore update
437    #[derive(serde::Serialize, serde::Deserialize)]
438    #[derive(Clone, PartialEq, ::prost::Message)]
439    pub struct UpdateSemaphoreResult {
440        #[prost(uint64, tag = "1")]
441        pub req_id: u64,
442        #[prost(enumeration = "super::super::status_ids::StatusCode", tag = "2")]
443        pub status: i32,
444        #[prost(message, repeated, tag = "3")]
445        pub issues: ::prost::alloc::vec::Vec<super::super::issue::IssueMessage>,
446    }
447    /// *
448    /// The result of semaphore deletion
449    #[derive(serde::Serialize, serde::Deserialize)]
450    #[derive(Clone, PartialEq, ::prost::Message)]
451    pub struct DeleteSemaphoreResult {
452        #[prost(uint64, tag = "1")]
453        pub req_id: u64,
454        #[prost(enumeration = "super::super::status_ids::StatusCode", tag = "2")]
455        pub status: i32,
456        #[prost(message, repeated, tag = "3")]
457        pub issues: ::prost::alloc::vec::Vec<super::super::issue::IssueMessage>,
458    }
459    #[derive(serde::Serialize, serde::Deserialize)]
460    #[derive(Clone, PartialEq, ::prost::Oneof)]
461    pub enum Response {
462        #[prost(message, tag = "1")]
463        Ping(PingPong),
464        #[prost(message, tag = "2")]
465        Pong(PingPong),
466        #[prost(message, tag = "3")]
467        Failure(Failure),
468        #[prost(message, tag = "4")]
469        SessionStarted(SessionStarted),
470        #[prost(message, tag = "5")]
471        SessionStopped(SessionStopped),
472        #[prost(message, tag = "6")]
473        Unsupported6(super::Unsupported),
474        #[prost(message, tag = "7")]
475        Unsupported7(super::Unsupported),
476        #[prost(message, tag = "8")]
477        AcquireSemaphorePending(AcquireSemaphorePending),
478        #[prost(message, tag = "9")]
479        AcquireSemaphoreResult(AcquireSemaphoreResult),
480        #[prost(message, tag = "10")]
481        ReleaseSemaphoreResult(ReleaseSemaphoreResult),
482        #[prost(message, tag = "11")]
483        DescribeSemaphoreResult(DescribeSemaphoreResult),
484        #[prost(message, tag = "12")]
485        DescribeSemaphoreChanged(DescribeSemaphoreChanged),
486        #[prost(message, tag = "13")]
487        CreateSemaphoreResult(CreateSemaphoreResult),
488        #[prost(message, tag = "14")]
489        UpdateSemaphoreResult(UpdateSemaphoreResult),
490        #[prost(message, tag = "15")]
491        DeleteSemaphoreResult(DeleteSemaphoreResult),
492        #[prost(message, tag = "16")]
493        Unsupported16(super::Unsupported),
494        #[prost(message, tag = "17")]
495        Unsupported17(super::Unsupported),
496        #[prost(message, tag = "18")]
497        Unsupported18(super::Unsupported),
498    }
499}
500#[derive(serde::Serialize, serde::Deserialize)]
501#[derive(Clone, PartialEq, ::prost::Message)]
502pub struct CreateNodeRequest {
503    #[prost(string, tag = "1")]
504    pub path: ::prost::alloc::string::String,
505    #[prost(message, optional, tag = "2")]
506    pub config: ::core::option::Option<Config>,
507    #[prost(message, optional, tag = "3")]
508    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
509}
510#[derive(serde::Serialize, serde::Deserialize)]
511#[derive(Clone, PartialEq, ::prost::Message)]
512pub struct CreateNodeResponse {
513    #[prost(message, optional, tag = "1")]
514    pub operation: ::core::option::Option<super::operations::Operation>,
515}
516#[derive(serde::Serialize, serde::Deserialize)]
517#[derive(Clone, PartialEq, ::prost::Message)]
518pub struct AlterNodeRequest {
519    #[prost(string, tag = "1")]
520    pub path: ::prost::alloc::string::String,
521    #[prost(message, optional, tag = "2")]
522    pub config: ::core::option::Option<Config>,
523    #[prost(message, optional, tag = "3")]
524    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
525}
526#[derive(serde::Serialize, serde::Deserialize)]
527#[derive(Clone, PartialEq, ::prost::Message)]
528pub struct AlterNodeResponse {
529    #[prost(message, optional, tag = "1")]
530    pub operation: ::core::option::Option<super::operations::Operation>,
531}
532#[derive(serde::Serialize, serde::Deserialize)]
533#[derive(Clone, PartialEq, ::prost::Message)]
534pub struct DropNodeRequest {
535    #[prost(string, tag = "1")]
536    pub path: ::prost::alloc::string::String,
537    #[prost(message, optional, tag = "2")]
538    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
539}
540#[derive(serde::Serialize, serde::Deserialize)]
541#[derive(Clone, PartialEq, ::prost::Message)]
542pub struct DropNodeResponse {
543    #[prost(message, optional, tag = "1")]
544    pub operation: ::core::option::Option<super::operations::Operation>,
545}
546#[derive(serde::Serialize, serde::Deserialize)]
547#[derive(Clone, PartialEq, ::prost::Message)]
548pub struct DescribeNodeRequest {
549    #[prost(string, tag = "1")]
550    pub path: ::prost::alloc::string::String,
551    #[prost(message, optional, tag = "2")]
552    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
553}
554#[derive(serde::Serialize, serde::Deserialize)]
555#[derive(Clone, PartialEq, ::prost::Message)]
556pub struct DescribeNodeResponse {
557    #[prost(message, optional, tag = "1")]
558    pub operation: ::core::option::Option<super::operations::Operation>,
559}
560#[derive(serde::Serialize, serde::Deserialize)]
561#[derive(Clone, PartialEq, ::prost::Message)]
562pub struct DescribeNodeResult {
563    #[prost(message, optional, tag = "1")]
564    pub self_: ::core::option::Option<super::scheme::Entry>,
565    #[prost(message, optional, tag = "2")]
566    pub config: ::core::option::Option<Config>,
567}
568/// *
569/// Consistency mode
570#[derive(serde::Serialize, serde::Deserialize)]
571#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
572#[repr(i32)]
573pub enum ConsistencyMode {
574    /// The default or current value
575    Unset = 0,
576    /// Strict mode makes sure operations may only complete on current leader
577    Strict = 1,
578    /// Relaxed mode allows operations to complete on stale masters
579    Relaxed = 2,
580}
581impl ConsistencyMode {
582    /// String value of the enum field names used in the ProtoBuf definition.
583    /// The values are not transformed in any way and thus are considered stable
584    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
585    pub fn as_str_name(&self) -> &'static str {
586        match self {
587            Self::Unset => "CONSISTENCY_MODE_UNSET",
588            Self::Strict => "CONSISTENCY_MODE_STRICT",
589            Self::Relaxed => "CONSISTENCY_MODE_RELAXED",
590        }
591    }
592    /// Creates an enum from field names used in the ProtoBuf definition.
593    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
594        match value {
595            "CONSISTENCY_MODE_UNSET" => Some(Self::Unset),
596            "CONSISTENCY_MODE_STRICT" => Some(Self::Strict),
597            "CONSISTENCY_MODE_RELAXED" => Some(Self::Relaxed),
598            _ => None,
599        }
600    }
601}
602/// *
603/// Counters mode
604#[derive(serde::Serialize, serde::Deserialize)]
605#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
606#[repr(i32)]
607pub enum RateLimiterCountersMode {
608    /// The default or current value
609    Unset = 0,
610    /// Aggregated counters for resource tree
611    Aggregated = 1,
612    /// Counters on every resource
613    Detailed = 2,
614}
615impl RateLimiterCountersMode {
616    /// String value of the enum field names used in the ProtoBuf definition.
617    /// The values are not transformed in any way and thus are considered stable
618    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
619    pub fn as_str_name(&self) -> &'static str {
620        match self {
621            Self::Unset => "RATE_LIMITER_COUNTERS_MODE_UNSET",
622            Self::Aggregated => "RATE_LIMITER_COUNTERS_MODE_AGGREGATED",
623            Self::Detailed => "RATE_LIMITER_COUNTERS_MODE_DETAILED",
624        }
625    }
626    /// Creates an enum from field names used in the ProtoBuf definition.
627    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
628        match value {
629            "RATE_LIMITER_COUNTERS_MODE_UNSET" => Some(Self::Unset),
630            "RATE_LIMITER_COUNTERS_MODE_AGGREGATED" => Some(Self::Aggregated),
631            "RATE_LIMITER_COUNTERS_MODE_DETAILED" => Some(Self::Detailed),
632            _ => None,
633        }
634    }
635}