#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Unsupported {}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Config {
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
#[prost(uint32, tag = "2")]
pub self_check_period_millis: u32,
#[prost(uint32, tag = "3")]
pub session_grace_period_millis: u32,
#[prost(enumeration = "ConsistencyMode", tag = "4")]
pub read_consistency_mode: i32,
#[prost(enumeration = "ConsistencyMode", tag = "5")]
pub attach_consistency_mode: i32,
#[prost(enumeration = "RateLimiterCountersMode", tag = "6")]
pub rate_limiter_counters_mode: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SessionDescription {
#[prost(uint64, tag = "1")]
pub session_id: u64,
#[prost(uint64, tag = "2")]
pub timeout_millis: u64,
#[prost(string, tag = "3")]
pub description: ::prost::alloc::string::String,
#[prost(bool, tag = "4")]
pub attached: bool,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SemaphoreSession {
#[prost(uint64, tag = "5")]
pub order_id: u64,
#[prost(uint64, tag = "1")]
pub session_id: u64,
#[prost(uint64, tag = "2")]
pub timeout_millis: u64,
#[prost(uint64, tag = "3")]
pub count: u64,
#[prost(bytes = "vec", tag = "4")]
pub data: ::prost::alloc::vec::Vec<u8>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SemaphoreDescription {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub data: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "7")]
pub count: u64,
#[prost(uint64, tag = "3")]
pub limit: u64,
#[prost(bool, tag = "4")]
pub ephemeral: bool,
#[prost(message, repeated, tag = "5")]
pub owners: ::prost::alloc::vec::Vec<SemaphoreSession>,
#[prost(message, repeated, tag = "6")]
pub waiters: ::prost::alloc::vec::Vec<SemaphoreSession>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SessionRequest {
#[prost(
oneof = "session_request::Request",
tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15"
)]
pub request: ::core::option::Option<session_request::Request>,
}
pub mod session_request {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PingPong {
#[prost(uint64, tag = "1")]
pub opaque: u64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SessionStart {
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
pub session_id: u64,
#[prost(uint64, tag = "3")]
pub timeout_millis: u64,
#[prost(string, tag = "4")]
pub description: ::prost::alloc::string::String,
#[prost(uint64, tag = "5")]
pub seq_no: u64,
#[prost(bytes = "vec", tag = "6")]
pub protection_key: ::prost::alloc::vec::Vec<u8>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SessionStop {}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AcquireSemaphore {
#[prost(uint64, tag = "1")]
pub req_id: u64,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub timeout_millis: u64,
#[prost(uint64, tag = "4")]
pub count: u64,
#[prost(bytes = "vec", tag = "5")]
pub data: ::prost::alloc::vec::Vec<u8>,
#[prost(bool, tag = "6")]
pub ephemeral: bool,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReleaseSemaphore {
#[prost(uint64, tag = "1")]
pub req_id: u64,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DescribeSemaphore {
#[prost(uint64, tag = "1")]
pub req_id: u64,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(bool, tag = "3")]
pub include_owners: bool,
#[prost(bool, tag = "4")]
pub include_waiters: bool,
#[prost(bool, tag = "5")]
pub watch_data: bool,
#[prost(bool, tag = "6")]
pub watch_owners: bool,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSemaphore {
#[prost(uint64, tag = "1")]
pub req_id: u64,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub limit: u64,
#[prost(bytes = "vec", tag = "4")]
pub data: ::prost::alloc::vec::Vec<u8>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateSemaphore {
#[prost(uint64, tag = "1")]
pub req_id: u64,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "3")]
pub data: ::prost::alloc::vec::Vec<u8>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteSemaphore {
#[prost(uint64, tag = "1")]
pub req_id: u64,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(bool, tag = "3")]
pub force: bool,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Request {
#[prost(message, tag = "1")]
Ping(PingPong),
#[prost(message, tag = "2")]
Pong(PingPong),
#[prost(message, tag = "3")]
SessionStart(SessionStart),
#[prost(message, tag = "4")]
SessionStop(SessionStop),
#[prost(message, tag = "5")]
Unsupported5(super::Unsupported),
#[prost(message, tag = "6")]
Unsupported6(super::Unsupported),
#[prost(message, tag = "7")]
AcquireSemaphore(AcquireSemaphore),
#[prost(message, tag = "8")]
ReleaseSemaphore(ReleaseSemaphore),
#[prost(message, tag = "9")]
DescribeSemaphore(DescribeSemaphore),
#[prost(message, tag = "10")]
CreateSemaphore(CreateSemaphore),
#[prost(message, tag = "11")]
UpdateSemaphore(UpdateSemaphore),
#[prost(message, tag = "12")]
DeleteSemaphore(DeleteSemaphore),
#[prost(message, tag = "13")]
Unsupported13(super::Unsupported),
#[prost(message, tag = "14")]
Unsupported14(super::Unsupported),
#[prost(message, tag = "15")]
Unsupported15(super::Unsupported),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SessionResponse {
#[prost(
oneof = "session_response::Response",
tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18"
)]
pub response: ::core::option::Option<session_response::Response>,
}
pub mod session_response {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PingPong {
#[prost(uint64, tag = "1")]
pub opaque: u64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Failure {
#[prost(enumeration = "super::super::status_ids::StatusCode", tag = "1")]
pub status: i32,
#[prost(message, repeated, tag = "2")]
pub issues: ::prost::alloc::vec::Vec<super::super::issue::IssueMessage>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SessionStarted {
#[prost(uint64, tag = "1")]
pub session_id: u64,
#[prost(uint64, tag = "2")]
pub timeout_millis: u64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SessionStopped {
#[prost(uint64, tag = "1")]
pub session_id: u64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AcquireSemaphorePending {
#[prost(uint64, tag = "1")]
pub req_id: u64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AcquireSemaphoreResult {
#[prost(uint64, tag = "1")]
pub req_id: u64,
#[prost(enumeration = "super::super::status_ids::StatusCode", tag = "2")]
pub status: i32,
#[prost(message, repeated, tag = "3")]
pub issues: ::prost::alloc::vec::Vec<super::super::issue::IssueMessage>,
#[prost(bool, tag = "4")]
pub acquired: bool,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReleaseSemaphoreResult {
#[prost(uint64, tag = "1")]
pub req_id: u64,
#[prost(enumeration = "super::super::status_ids::StatusCode", tag = "2")]
pub status: i32,
#[prost(message, repeated, tag = "3")]
pub issues: ::prost::alloc::vec::Vec<super::super::issue::IssueMessage>,
#[prost(bool, tag = "4")]
pub released: bool,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DescribeSemaphoreResult {
#[prost(uint64, tag = "1")]
pub req_id: u64,
#[prost(enumeration = "super::super::status_ids::StatusCode", tag = "2")]
pub status: i32,
#[prost(message, repeated, tag = "3")]
pub issues: ::prost::alloc::vec::Vec<super::super::issue::IssueMessage>,
#[prost(message, optional, tag = "4")]
pub semaphore_description: ::core::option::Option<super::SemaphoreDescription>,
#[prost(bool, tag = "5")]
pub watch_added: bool,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DescribeSemaphoreChanged {
#[prost(uint64, tag = "1")]
pub req_id: u64,
#[prost(bool, tag = "2")]
pub data_changed: bool,
#[prost(bool, tag = "3")]
pub owners_changed: bool,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSemaphoreResult {
#[prost(uint64, tag = "1")]
pub req_id: u64,
#[prost(enumeration = "super::super::status_ids::StatusCode", tag = "2")]
pub status: i32,
#[prost(message, repeated, tag = "3")]
pub issues: ::prost::alloc::vec::Vec<super::super::issue::IssueMessage>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateSemaphoreResult {
#[prost(uint64, tag = "1")]
pub req_id: u64,
#[prost(enumeration = "super::super::status_ids::StatusCode", tag = "2")]
pub status: i32,
#[prost(message, repeated, tag = "3")]
pub issues: ::prost::alloc::vec::Vec<super::super::issue::IssueMessage>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteSemaphoreResult {
#[prost(uint64, tag = "1")]
pub req_id: u64,
#[prost(enumeration = "super::super::status_ids::StatusCode", tag = "2")]
pub status: i32,
#[prost(message, repeated, tag = "3")]
pub issues: ::prost::alloc::vec::Vec<super::super::issue::IssueMessage>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "1")]
Ping(PingPong),
#[prost(message, tag = "2")]
Pong(PingPong),
#[prost(message, tag = "3")]
Failure(Failure),
#[prost(message, tag = "4")]
SessionStarted(SessionStarted),
#[prost(message, tag = "5")]
SessionStopped(SessionStopped),
#[prost(message, tag = "6")]
Unsupported6(super::Unsupported),
#[prost(message, tag = "7")]
Unsupported7(super::Unsupported),
#[prost(message, tag = "8")]
AcquireSemaphorePending(AcquireSemaphorePending),
#[prost(message, tag = "9")]
AcquireSemaphoreResult(AcquireSemaphoreResult),
#[prost(message, tag = "10")]
ReleaseSemaphoreResult(ReleaseSemaphoreResult),
#[prost(message, tag = "11")]
DescribeSemaphoreResult(DescribeSemaphoreResult),
#[prost(message, tag = "12")]
DescribeSemaphoreChanged(DescribeSemaphoreChanged),
#[prost(message, tag = "13")]
CreateSemaphoreResult(CreateSemaphoreResult),
#[prost(message, tag = "14")]
UpdateSemaphoreResult(UpdateSemaphoreResult),
#[prost(message, tag = "15")]
DeleteSemaphoreResult(DeleteSemaphoreResult),
#[prost(message, tag = "16")]
Unsupported16(super::Unsupported),
#[prost(message, tag = "17")]
Unsupported17(super::Unsupported),
#[prost(message, tag = "18")]
Unsupported18(super::Unsupported),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateNodeRequest {
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub config: ::core::option::Option<Config>,
#[prost(message, optional, tag = "3")]
pub operation_params: ::core::option::Option<super::operations::OperationParams>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateNodeResponse {
#[prost(message, optional, tag = "1")]
pub operation: ::core::option::Option<super::operations::Operation>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AlterNodeRequest {
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub config: ::core::option::Option<Config>,
#[prost(message, optional, tag = "3")]
pub operation_params: ::core::option::Option<super::operations::OperationParams>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AlterNodeResponse {
#[prost(message, optional, tag = "1")]
pub operation: ::core::option::Option<super::operations::Operation>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DropNodeRequest {
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub operation_params: ::core::option::Option<super::operations::OperationParams>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DropNodeResponse {
#[prost(message, optional, tag = "1")]
pub operation: ::core::option::Option<super::operations::Operation>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DescribeNodeRequest {
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub operation_params: ::core::option::Option<super::operations::OperationParams>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DescribeNodeResponse {
#[prost(message, optional, tag = "1")]
pub operation: ::core::option::Option<super::operations::Operation>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DescribeNodeResult {
#[prost(message, optional, tag = "1")]
pub self_: ::core::option::Option<super::scheme::Entry>,
#[prost(message, optional, tag = "2")]
pub config: ::core::option::Option<Config>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ConsistencyMode {
Unset = 0,
Strict = 1,
Relaxed = 2,
}
impl ConsistencyMode {
pub fn as_str_name(&self) -> &'static str {
match self {
ConsistencyMode::Unset => "CONSISTENCY_MODE_UNSET",
ConsistencyMode::Strict => "CONSISTENCY_MODE_STRICT",
ConsistencyMode::Relaxed => "CONSISTENCY_MODE_RELAXED",
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum RateLimiterCountersMode {
Unset = 0,
Aggregated = 1,
Detailed = 2,
}
impl RateLimiterCountersMode {
pub fn as_str_name(&self) -> &'static str {
match self {
RateLimiterCountersMode::Unset => "RATE_LIMITER_COUNTERS_MODE_UNSET",
RateLimiterCountersMode::Aggregated => {
"RATE_LIMITER_COUNTERS_MODE_AGGREGATED"
}
RateLimiterCountersMode::Detailed => "RATE_LIMITER_COUNTERS_MODE_DETAILED",
}
}
}