1#[derive(serde::Serialize, serde::Deserialize)]
6#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
7pub struct Unsupported {}
8#[derive(serde::Serialize, serde::Deserialize)]
11#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
12pub struct Config {
13 #[prost(string, tag = "1")]
15 pub path: ::prost::alloc::string::String,
16 #[prost(uint32, tag = "2")]
18 pub self_check_period_millis: u32,
19 #[prost(uint32, tag = "3")]
21 pub session_grace_period_millis: u32,
22 #[prost(enumeration = "ConsistencyMode", tag = "4")]
24 pub read_consistency_mode: i32,
25 #[prost(enumeration = "ConsistencyMode", tag = "5")]
27 pub attach_consistency_mode: i32,
28 #[prost(enumeration = "RateLimiterCountersMode", tag = "6")]
30 pub rate_limiter_counters_mode: i32,
31}
32#[derive(serde::Serialize, serde::Deserialize)]
35#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
36pub struct SessionDescription {
37 #[prost(uint64, tag = "1")]
39 pub session_id: u64,
40 #[prost(uint64, tag = "2")]
42 pub timeout_millis: u64,
43 #[prost(string, tag = "3")]
45 pub description: ::prost::alloc::string::String,
46 #[prost(bool, tag = "4")]
48 pub attached: bool,
49}
50#[derive(serde::Serialize, serde::Deserialize)]
53#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
54pub struct SemaphoreSession {
55 #[prost(uint64, tag = "5")]
57 pub order_id: u64,
58 #[prost(uint64, tag = "1")]
60 pub session_id: u64,
61 #[prost(uint64, tag = "2")]
63 pub timeout_millis: u64,
64 #[prost(uint64, tag = "3")]
66 pub count: u64,
67 #[prost(bytes = "vec", tag = "4")]
69 pub data: ::prost::alloc::vec::Vec<u8>,
70}
71#[derive(serde::Serialize, serde::Deserialize)]
74#[derive(Clone, PartialEq, ::prost::Message)]
75pub struct SemaphoreDescription {
76 #[prost(string, tag = "1")]
78 pub name: ::prost::alloc::string::String,
79 #[prost(bytes = "vec", tag = "2")]
81 pub data: ::prost::alloc::vec::Vec<u8>,
82 #[prost(uint64, tag = "7")]
84 pub count: u64,
85 #[prost(uint64, tag = "3")]
87 pub limit: u64,
88 #[prost(bool, tag = "4")]
90 pub ephemeral: bool,
91 #[prost(message, repeated, tag = "5")]
93 pub owners: ::prost::alloc::vec::Vec<SemaphoreSession>,
94 #[prost(message, repeated, tag = "6")]
96 pub waiters: ::prost::alloc::vec::Vec<SemaphoreSession>,
97}
98#[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}
109pub mod session_request {
111 #[derive(serde::Serialize, serde::Deserialize)]
114 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
115 pub struct PingPong {
116 #[prost(uint64, tag = "1")]
118 pub opaque: u64,
119 }
120 #[derive(serde::Serialize, serde::Deserialize)]
123 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
124 pub struct SessionStart {
125 #[prost(string, tag = "1")]
127 pub path: ::prost::alloc::string::String,
128 #[prost(uint64, tag = "2")]
130 pub session_id: u64,
131 #[prost(uint64, tag = "3")]
133 pub timeout_millis: u64,
134 #[prost(string, tag = "4")]
136 pub description: ::prost::alloc::string::String,
137 #[prost(uint64, tag = "5")]
141 pub seq_no: u64,
142 #[prost(bytes = "vec", tag = "6")]
144 pub protection_key: ::prost::alloc::vec::Vec<u8>,
145 }
146 #[derive(serde::Serialize, serde::Deserialize)]
150 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
151 pub struct SessionStop {}
152 #[derive(serde::Serialize, serde::Deserialize)]
158 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
159 pub struct AcquireSemaphore {
160 #[prost(uint64, tag = "1")]
162 pub req_id: u64,
163 #[prost(string, tag = "2")]
165 pub name: ::prost::alloc::string::String,
166 #[prost(uint64, tag = "3")]
169 pub timeout_millis: u64,
170 #[prost(uint64, tag = "4")]
172 pub count: u64,
173 #[prost(bytes = "vec", tag = "5")]
175 pub data: ::prost::alloc::vec::Vec<u8>,
176 #[prost(bool, tag = "6")]
179 pub ephemeral: bool,
180 }
181 #[derive(serde::Serialize, serde::Deserialize)]
187 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
188 pub struct ReleaseSemaphore {
189 #[prost(uint64, tag = "1")]
191 pub req_id: u64,
192 #[prost(string, tag = "2")]
194 pub name: ::prost::alloc::string::String,
195 }
196 #[derive(serde::Serialize, serde::Deserialize)]
200 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
201 pub struct DescribeSemaphore {
202 #[prost(uint64, tag = "1")]
204 pub req_id: u64,
205 #[prost(string, tag = "2")]
207 pub name: ::prost::alloc::string::String,
208 #[prost(bool, tag = "3")]
210 pub include_owners: bool,
211 #[prost(bool, tag = "4")]
213 pub include_waiters: bool,
214 #[prost(bool, tag = "5")]
216 pub watch_data: bool,
217 #[prost(bool, tag = "6")]
219 pub watch_owners: bool,
220 }
221 #[derive(serde::Serialize, serde::Deserialize)]
224 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
225 pub struct CreateSemaphore {
226 #[prost(uint64, tag = "1")]
228 pub req_id: u64,
229 #[prost(string, tag = "2")]
231 pub name: ::prost::alloc::string::String,
232 #[prost(uint64, tag = "3")]
234 pub limit: u64,
235 #[prost(bytes = "vec", tag = "4")]
237 pub data: ::prost::alloc::vec::Vec<u8>,
238 }
239 #[derive(serde::Serialize, serde::Deserialize)]
242 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
243 pub struct UpdateSemaphore {
244 #[prost(uint64, tag = "1")]
246 pub req_id: u64,
247 #[prost(string, tag = "2")]
249 pub name: ::prost::alloc::string::String,
250 #[prost(bytes = "vec", tag = "3")]
252 pub data: ::prost::alloc::vec::Vec<u8>,
253 }
254 #[derive(serde::Serialize, serde::Deserialize)]
257 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
258 pub struct DeleteSemaphore {
259 #[prost(uint64, tag = "1")]
261 pub req_id: u64,
262 #[prost(string, tag = "2")]
264 pub name: ::prost::alloc::string::String,
265 #[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#[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}
315pub mod session_response {
317 #[derive(serde::Serialize, serde::Deserialize)]
320 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
321 pub struct PingPong {
322 #[prost(uint64, tag = "1")]
324 pub opaque: u64,
325 }
326 #[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 #[derive(serde::Serialize, serde::Deserialize)]
339 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
340 pub struct SessionStarted {
341 #[prost(uint64, tag = "1")]
343 pub session_id: u64,
344 #[prost(uint64, tag = "2")]
346 pub timeout_millis: u64,
347 }
348 #[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 #[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 #[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 #[prost(bool, tag = "4")]
377 pub acquired: bool,
378 }
379 #[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 #[prost(bool, tag = "4")]
392 pub released: bool,
393 }
394 #[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 #[prost(bool, tag = "5")]
409 pub watch_added: bool,
410 }
411 #[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 #[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 #[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 #[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#[derive(serde::Serialize, serde::Deserialize)]
571#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
572#[repr(i32)]
573pub enum ConsistencyMode {
574 Unset = 0,
576 Strict = 1,
578 Relaxed = 2,
580}
581impl ConsistencyMode {
582 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 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#[derive(serde::Serialize, serde::Deserialize)]
605#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
606#[repr(i32)]
607pub enum RateLimiterCountersMode {
608 Unset = 0,
610 Aggregated = 1,
612 Detailed = 2,
614}
615impl RateLimiterCountersMode {
616 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 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}