ydb_grpc_bindings/generated/
ydb.coordination.rs

1/// *
2/// Stub for unsupported messages
3///
4/// Intentionally empty
5#[allow(clippy::derive_partial_eq_without_eq)]
6#[derive(Clone, PartialEq, ::prost::Message)]
7pub struct Unsupported {}
8/// *
9/// Configuration settings for a coordination node
10#[allow(clippy::derive_partial_eq_without_eq)]
11#[derive(Clone, PartialEq, ::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#[allow(clippy::derive_partial_eq_without_eq)]
35#[derive(Clone, PartialEq, ::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#[allow(clippy::derive_partial_eq_without_eq)]
53#[derive(Clone, PartialEq, ::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#[allow(clippy::derive_partial_eq_without_eq)]
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#[allow(clippy::derive_partial_eq_without_eq)]
101#[derive(Clone, PartialEq, ::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    #[allow(clippy::derive_partial_eq_without_eq)]
114    #[derive(Clone, PartialEq, ::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    #[allow(clippy::derive_partial_eq_without_eq)]
123    #[derive(Clone, PartialEq, ::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    ///
149    /// nothing
150    #[allow(clippy::derive_partial_eq_without_eq)]
151    #[derive(Clone, PartialEq, ::prost::Message)]
152    pub struct SessionStop {}
153    /// *
154    /// Used to acquire a semaphore
155    ///
156    /// WARNING: a single session cannot acquire the same semaphore multiple times
157    ///
158    /// Later requests override previous operations with the same semaphore,
159    /// e.g. to reduce acquired count, change timeout or attached data.
160    #[allow(clippy::derive_partial_eq_without_eq)]
161    #[derive(Clone, PartialEq, ::prost::Message)]
162    pub struct AcquireSemaphore {
163        /// Client-defined request id, echoed in the response
164        #[prost(uint64, tag = "1")]
165        pub req_id: u64,
166        /// Name of the semaphore to acquire
167        #[prost(string, tag = "2")]
168        pub name: ::prost::alloc::string::String,
169        /// Timeout in milliseconds after which operation will fail
170        /// if it's still waiting in the waiters queue
171        #[prost(uint64, tag = "3")]
172        pub timeout_millis: u64,
173        /// Number of tokens to acquire on the semaphore
174        #[prost(uint64, tag = "4")]
175        pub count: u64,
176        /// User-defined binary data that may be attached to the operation
177        #[prost(bytes = "vec", tag = "5")]
178        pub data: ::prost::alloc::vec::Vec<u8>,
179        /// Ephemeral semaphores are created with the first acquire operation
180        /// and automatically deleted with the last release operation
181        #[prost(bool, tag = "6")]
182        pub ephemeral: bool,
183    }
184    /// *
185    /// Used to release a semaphore
186    ///
187    /// WARNING: a single session cannot release the same semaphore multiple times
188    ///
189    /// The release operation will either remove current session from waiters
190    /// queue or release an already owned semaphore.
191    #[allow(clippy::derive_partial_eq_without_eq)]
192    #[derive(Clone, PartialEq, ::prost::Message)]
193    pub struct ReleaseSemaphore {
194        /// Client-defined request id, echoed in the response
195        #[prost(uint64, tag = "1")]
196        pub req_id: u64,
197        /// Name of the semaphore to release
198        #[prost(string, tag = "2")]
199        pub name: ::prost::alloc::string::String,
200    }
201    /// *
202    /// Used to describe semaphores and watch them for changes
203    ///
204    /// WARNING: a describe operation will cancel previous watches on the same semaphore
205    #[allow(clippy::derive_partial_eq_without_eq)]
206    #[derive(Clone, PartialEq, ::prost::Message)]
207    pub struct DescribeSemaphore {
208        /// Client-defined request id, echoed in the response
209        #[prost(uint64, tag = "1")]
210        pub req_id: u64,
211        /// Name of the semaphore to describe
212        #[prost(string, tag = "2")]
213        pub name: ::prost::alloc::string::String,
214        /// Response will include owners list if true
215        #[prost(bool, tag = "3")]
216        pub include_owners: bool,
217        /// Response will include waiters list if true
218        #[prost(bool, tag = "4")]
219        pub include_waiters: bool,
220        /// Watch for changes in semaphore data
221        #[prost(bool, tag = "5")]
222        pub watch_data: bool,
223        /// Watch for changes in semaphore owners (including owners data)
224        #[prost(bool, tag = "6")]
225        pub watch_owners: bool,
226    }
227    /// *
228    /// Used to create a new semaphore
229    #[allow(clippy::derive_partial_eq_without_eq)]
230    #[derive(Clone, PartialEq, ::prost::Message)]
231    pub struct CreateSemaphore {
232        /// Client-defined request id, echoed in the response
233        #[prost(uint64, tag = "1")]
234        pub req_id: u64,
235        /// Name of the semaphore to create
236        #[prost(string, tag = "2")]
237        pub name: ::prost::alloc::string::String,
238        /// Number of tokens that may be acquired by sessions
239        #[prost(uint64, tag = "3")]
240        pub limit: u64,
241        /// User-defined data that is attached to the semaphore
242        #[prost(bytes = "vec", tag = "4")]
243        pub data: ::prost::alloc::vec::Vec<u8>,
244    }
245    /// *
246    /// Used to change semaphore data
247    #[allow(clippy::derive_partial_eq_without_eq)]
248    #[derive(Clone, PartialEq, ::prost::Message)]
249    pub struct UpdateSemaphore {
250        /// Client-defined request id, echoed in the response
251        #[prost(uint64, tag = "1")]
252        pub req_id: u64,
253        /// Name of the semaphore to update
254        #[prost(string, tag = "2")]
255        pub name: ::prost::alloc::string::String,
256        /// User-defined data that is attached to the semaphore
257        #[prost(bytes = "vec", tag = "3")]
258        pub data: ::prost::alloc::vec::Vec<u8>,
259    }
260    /// *
261    /// Used to delete an existing semaphore
262    #[allow(clippy::derive_partial_eq_without_eq)]
263    #[derive(Clone, PartialEq, ::prost::Message)]
264    pub struct DeleteSemaphore {
265        /// Client-defined request id, echoed in the response
266        #[prost(uint64, tag = "1")]
267        pub req_id: u64,
268        /// Name of the semaphore to delete
269        #[prost(string, tag = "2")]
270        pub name: ::prost::alloc::string::String,
271        /// Will delete semaphore even if currently acquired by sessions
272        #[prost(bool, tag = "3")]
273        pub force: bool,
274    }
275    #[allow(clippy::derive_partial_eq_without_eq)]
276    #[derive(Clone, PartialEq, ::prost::Oneof)]
277    pub enum Request {
278        #[prost(message, tag = "1")]
279        Ping(PingPong),
280        #[prost(message, tag = "2")]
281        Pong(PingPong),
282        #[prost(message, tag = "3")]
283        SessionStart(SessionStart),
284        #[prost(message, tag = "4")]
285        SessionStop(SessionStop),
286        #[prost(message, tag = "5")]
287        Unsupported5(super::Unsupported),
288        #[prost(message, tag = "6")]
289        Unsupported6(super::Unsupported),
290        #[prost(message, tag = "7")]
291        AcquireSemaphore(AcquireSemaphore),
292        #[prost(message, tag = "8")]
293        ReleaseSemaphore(ReleaseSemaphore),
294        #[prost(message, tag = "9")]
295        DescribeSemaphore(DescribeSemaphore),
296        #[prost(message, tag = "10")]
297        CreateSemaphore(CreateSemaphore),
298        #[prost(message, tag = "11")]
299        UpdateSemaphore(UpdateSemaphore),
300        #[prost(message, tag = "12")]
301        DeleteSemaphore(DeleteSemaphore),
302        #[prost(message, tag = "13")]
303        Unsupported13(super::Unsupported),
304        #[prost(message, tag = "14")]
305        Unsupported14(super::Unsupported),
306        #[prost(message, tag = "15")]
307        Unsupported15(super::Unsupported),
308    }
309}
310/// *
311/// Session response message sent from server to client
312#[allow(clippy::derive_partial_eq_without_eq)]
313#[derive(Clone, PartialEq, ::prost::Message)]
314pub struct SessionResponse {
315    #[prost(
316        oneof = "session_response::Response",
317        tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18"
318    )]
319    pub response: ::core::option::Option<session_response::Response>,
320}
321/// Nested message and enum types in `SessionResponse`.
322pub mod session_response {
323    /// *
324    /// Used for checking liveness of the connection
325    #[allow(clippy::derive_partial_eq_without_eq)]
326    #[derive(Clone, PartialEq, ::prost::Message)]
327    pub struct PingPong {
328        /// Opaque number specified in the ping message is echoed in the pong message
329        #[prost(uint64, tag = "1")]
330        pub opaque: u64,
331    }
332    /// *
333    /// Used to report connection and session level failures
334    #[allow(clippy::derive_partial_eq_without_eq)]
335    #[derive(Clone, PartialEq, ::prost::Message)]
336    pub struct Failure {
337        #[prost(enumeration = "super::super::status_ids::StatusCode", tag = "1")]
338        pub status: i32,
339        #[prost(message, repeated, tag = "2")]
340        pub issues: ::prost::alloc::vec::Vec<super::super::issue::IssueMessage>,
341    }
342    /// *
343    /// Used to report a successful session create/restore operation
344    #[allow(clippy::derive_partial_eq_without_eq)]
345    #[derive(Clone, PartialEq, ::prost::Message)]
346    pub struct SessionStarted {
347        /// A server generation id that may be used for restoring the session
348        #[prost(uint64, tag = "1")]
349        pub session_id: u64,
350        /// Timeout in milliseconds that will be used by the server
351        #[prost(uint64, tag = "2")]
352        pub timeout_millis: u64,
353    }
354    /// *
355    /// Used to report a successful graceful termination of the session
356    #[allow(clippy::derive_partial_eq_without_eq)]
357    #[derive(Clone, PartialEq, ::prost::Message)]
358    pub struct SessionStopped {
359        #[prost(uint64, tag = "1")]
360        pub session_id: u64,
361    }
362    /// *
363    /// Used by the server to report when an acquire operation is added to the waiters queue
364    #[allow(clippy::derive_partial_eq_without_eq)]
365    #[derive(Clone, PartialEq, ::prost::Message)]
366    pub struct AcquireSemaphorePending {
367        #[prost(uint64, tag = "1")]
368        pub req_id: u64,
369    }
370    /// *
371    /// Used by the server to report the result of an acquire operation
372    #[allow(clippy::derive_partial_eq_without_eq)]
373    #[derive(Clone, PartialEq, ::prost::Message)]
374    pub struct AcquireSemaphoreResult {
375        #[prost(uint64, tag = "1")]
376        pub req_id: u64,
377        #[prost(enumeration = "super::super::status_ids::StatusCode", tag = "2")]
378        pub status: i32,
379        #[prost(message, repeated, tag = "3")]
380        pub issues: ::prost::alloc::vec::Vec<super::super::issue::IssueMessage>,
381        /// True if semaphore was acquired, false if acquire timed out
382        #[prost(bool, tag = "4")]
383        pub acquired: bool,
384    }
385    /// *
386    /// Used by the server to report the result of a release operation
387    #[allow(clippy::derive_partial_eq_without_eq)]
388    #[derive(Clone, PartialEq, ::prost::Message)]
389    pub struct ReleaseSemaphoreResult {
390        #[prost(uint64, tag = "1")]
391        pub req_id: u64,
392        #[prost(enumeration = "super::super::status_ids::StatusCode", tag = "2")]
393        pub status: i32,
394        #[prost(message, repeated, tag = "3")]
395        pub issues: ::prost::alloc::vec::Vec<super::super::issue::IssueMessage>,
396        /// True if semaphore was released, false if there was no active acquire operation
397        #[prost(bool, tag = "4")]
398        pub released: bool,
399    }
400    /// *
401    /// The result of the describe operation
402    #[allow(clippy::derive_partial_eq_without_eq)]
403    #[derive(Clone, PartialEq, ::prost::Message)]
404    pub struct DescribeSemaphoreResult {
405        #[prost(uint64, tag = "1")]
406        pub req_id: u64,
407        #[prost(enumeration = "super::super::status_ids::StatusCode", tag = "2")]
408        pub status: i32,
409        #[prost(message, repeated, tag = "3")]
410        pub issues: ::prost::alloc::vec::Vec<super::super::issue::IssueMessage>,
411        #[prost(message, optional, tag = "4")]
412        pub semaphore_description: ::core::option::Option<super::SemaphoreDescription>,
413        /// True if a watch has been added for the semaphore
414        #[prost(bool, tag = "5")]
415        pub watch_added: bool,
416    }
417    /// *
418    /// Used to report a change in the watched semaphore
419    #[allow(clippy::derive_partial_eq_without_eq)]
420    #[derive(Clone, PartialEq, ::prost::Message)]
421    pub struct DescribeSemaphoreChanged {
422        #[prost(uint64, tag = "1")]
423        pub req_id: u64,
424        #[prost(bool, tag = "2")]
425        pub data_changed: bool,
426        #[prost(bool, tag = "3")]
427        pub owners_changed: bool,
428    }
429    /// *
430    /// The result of semaphore creation
431    #[allow(clippy::derive_partial_eq_without_eq)]
432    #[derive(Clone, PartialEq, ::prost::Message)]
433    pub struct CreateSemaphoreResult {
434        #[prost(uint64, tag = "1")]
435        pub req_id: u64,
436        #[prost(enumeration = "super::super::status_ids::StatusCode", tag = "2")]
437        pub status: i32,
438        #[prost(message, repeated, tag = "3")]
439        pub issues: ::prost::alloc::vec::Vec<super::super::issue::IssueMessage>,
440    }
441    /// *
442    /// The result of semaphore update
443    #[allow(clippy::derive_partial_eq_without_eq)]
444    #[derive(Clone, PartialEq, ::prost::Message)]
445    pub struct UpdateSemaphoreResult {
446        #[prost(uint64, tag = "1")]
447        pub req_id: u64,
448        #[prost(enumeration = "super::super::status_ids::StatusCode", tag = "2")]
449        pub status: i32,
450        #[prost(message, repeated, tag = "3")]
451        pub issues: ::prost::alloc::vec::Vec<super::super::issue::IssueMessage>,
452    }
453    /// *
454    /// The result of semaphore deletion
455    #[allow(clippy::derive_partial_eq_without_eq)]
456    #[derive(Clone, PartialEq, ::prost::Message)]
457    pub struct DeleteSemaphoreResult {
458        #[prost(uint64, tag = "1")]
459        pub req_id: u64,
460        #[prost(enumeration = "super::super::status_ids::StatusCode", tag = "2")]
461        pub status: i32,
462        #[prost(message, repeated, tag = "3")]
463        pub issues: ::prost::alloc::vec::Vec<super::super::issue::IssueMessage>,
464    }
465    #[allow(clippy::derive_partial_eq_without_eq)]
466    #[derive(Clone, PartialEq, ::prost::Oneof)]
467    pub enum Response {
468        #[prost(message, tag = "1")]
469        Ping(PingPong),
470        #[prost(message, tag = "2")]
471        Pong(PingPong),
472        #[prost(message, tag = "3")]
473        Failure(Failure),
474        #[prost(message, tag = "4")]
475        SessionStarted(SessionStarted),
476        #[prost(message, tag = "5")]
477        SessionStopped(SessionStopped),
478        #[prost(message, tag = "6")]
479        Unsupported6(super::Unsupported),
480        #[prost(message, tag = "7")]
481        Unsupported7(super::Unsupported),
482        #[prost(message, tag = "8")]
483        AcquireSemaphorePending(AcquireSemaphorePending),
484        #[prost(message, tag = "9")]
485        AcquireSemaphoreResult(AcquireSemaphoreResult),
486        #[prost(message, tag = "10")]
487        ReleaseSemaphoreResult(ReleaseSemaphoreResult),
488        #[prost(message, tag = "11")]
489        DescribeSemaphoreResult(DescribeSemaphoreResult),
490        #[prost(message, tag = "12")]
491        DescribeSemaphoreChanged(DescribeSemaphoreChanged),
492        #[prost(message, tag = "13")]
493        CreateSemaphoreResult(CreateSemaphoreResult),
494        #[prost(message, tag = "14")]
495        UpdateSemaphoreResult(UpdateSemaphoreResult),
496        #[prost(message, tag = "15")]
497        DeleteSemaphoreResult(DeleteSemaphoreResult),
498        #[prost(message, tag = "16")]
499        Unsupported16(super::Unsupported),
500        #[prost(message, tag = "17")]
501        Unsupported17(super::Unsupported),
502        #[prost(message, tag = "18")]
503        Unsupported18(super::Unsupported),
504    }
505}
506#[allow(clippy::derive_partial_eq_without_eq)]
507#[derive(Clone, PartialEq, ::prost::Message)]
508pub struct CreateNodeRequest {
509    #[prost(string, tag = "1")]
510    pub path: ::prost::alloc::string::String,
511    #[prost(message, optional, tag = "2")]
512    pub config: ::core::option::Option<Config>,
513    #[prost(message, optional, tag = "3")]
514    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
515}
516#[allow(clippy::derive_partial_eq_without_eq)]
517#[derive(Clone, PartialEq, ::prost::Message)]
518pub struct CreateNodeResponse {
519    #[prost(message, optional, tag = "1")]
520    pub operation: ::core::option::Option<super::operations::Operation>,
521}
522#[allow(clippy::derive_partial_eq_without_eq)]
523#[derive(Clone, PartialEq, ::prost::Message)]
524pub struct AlterNodeRequest {
525    #[prost(string, tag = "1")]
526    pub path: ::prost::alloc::string::String,
527    #[prost(message, optional, tag = "2")]
528    pub config: ::core::option::Option<Config>,
529    #[prost(message, optional, tag = "3")]
530    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
531}
532#[allow(clippy::derive_partial_eq_without_eq)]
533#[derive(Clone, PartialEq, ::prost::Message)]
534pub struct AlterNodeResponse {
535    #[prost(message, optional, tag = "1")]
536    pub operation: ::core::option::Option<super::operations::Operation>,
537}
538#[allow(clippy::derive_partial_eq_without_eq)]
539#[derive(Clone, PartialEq, ::prost::Message)]
540pub struct DropNodeRequest {
541    #[prost(string, tag = "1")]
542    pub path: ::prost::alloc::string::String,
543    #[prost(message, optional, tag = "2")]
544    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
545}
546#[allow(clippy::derive_partial_eq_without_eq)]
547#[derive(Clone, PartialEq, ::prost::Message)]
548pub struct DropNodeResponse {
549    #[prost(message, optional, tag = "1")]
550    pub operation: ::core::option::Option<super::operations::Operation>,
551}
552#[allow(clippy::derive_partial_eq_without_eq)]
553#[derive(Clone, PartialEq, ::prost::Message)]
554pub struct DescribeNodeRequest {
555    #[prost(string, tag = "1")]
556    pub path: ::prost::alloc::string::String,
557    #[prost(message, optional, tag = "2")]
558    pub operation_params: ::core::option::Option<super::operations::OperationParams>,
559}
560#[allow(clippy::derive_partial_eq_without_eq)]
561#[derive(Clone, PartialEq, ::prost::Message)]
562pub struct DescribeNodeResponse {
563    #[prost(message, optional, tag = "1")]
564    pub operation: ::core::option::Option<super::operations::Operation>,
565}
566#[allow(clippy::derive_partial_eq_without_eq)]
567#[derive(Clone, PartialEq, ::prost::Message)]
568pub struct DescribeNodeResult {
569    #[prost(message, optional, tag = "1")]
570    pub self_: ::core::option::Option<super::scheme::Entry>,
571    #[prost(message, optional, tag = "2")]
572    pub config: ::core::option::Option<Config>,
573}
574/// *
575/// Consistency mode
576#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
577#[repr(i32)]
578pub enum ConsistencyMode {
579    /// The default or current value
580    Unset = 0,
581    /// Strict mode makes sure operations may only complete on current leader
582    Strict = 1,
583    /// Relaxed mode allows operations to complete on stale masters
584    Relaxed = 2,
585}
586impl ConsistencyMode {
587    /// String value of the enum field names used in the ProtoBuf definition.
588    ///
589    /// The values are not transformed in any way and thus are considered stable
590    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
591    pub fn as_str_name(&self) -> &'static str {
592        match self {
593            ConsistencyMode::Unset => "CONSISTENCY_MODE_UNSET",
594            ConsistencyMode::Strict => "CONSISTENCY_MODE_STRICT",
595            ConsistencyMode::Relaxed => "CONSISTENCY_MODE_RELAXED",
596        }
597    }
598    /// Creates an enum from field names used in the ProtoBuf definition.
599    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
600        match value {
601            "CONSISTENCY_MODE_UNSET" => Some(Self::Unset),
602            "CONSISTENCY_MODE_STRICT" => Some(Self::Strict),
603            "CONSISTENCY_MODE_RELAXED" => Some(Self::Relaxed),
604            _ => None,
605        }
606    }
607}
608/// *
609/// Counters mode
610#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
611#[repr(i32)]
612pub enum RateLimiterCountersMode {
613    /// The default or current value
614    Unset = 0,
615    /// Aggregated counters for resource tree
616    Aggregated = 1,
617    /// Counters on every resource
618    Detailed = 2,
619}
620impl RateLimiterCountersMode {
621    /// String value of the enum field names used in the ProtoBuf definition.
622    ///
623    /// The values are not transformed in any way and thus are considered stable
624    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
625    pub fn as_str_name(&self) -> &'static str {
626        match self {
627            RateLimiterCountersMode::Unset => "RATE_LIMITER_COUNTERS_MODE_UNSET",
628            RateLimiterCountersMode::Aggregated => {
629                "RATE_LIMITER_COUNTERS_MODE_AGGREGATED"
630            }
631            RateLimiterCountersMode::Detailed => "RATE_LIMITER_COUNTERS_MODE_DETAILED",
632        }
633    }
634    /// Creates an enum from field names used in the ProtoBuf definition.
635    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
636        match value {
637            "RATE_LIMITER_COUNTERS_MODE_UNSET" => Some(Self::Unset),
638            "RATE_LIMITER_COUNTERS_MODE_AGGREGATED" => Some(Self::Aggregated),
639            "RATE_LIMITER_COUNTERS_MODE_DETAILED" => Some(Self::Detailed),
640            _ => None,
641        }
642    }
643}