#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Sub {
#[prost(string, repeated, tag = "1")]
pub topics: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubResponse {
#[prost(string, repeated, tag = "1")]
pub success: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "2")]
pub fail: ::prost::alloc::vec::Vec<sub_response::Fail>,
#[prost(string, repeated, tag = "3")]
pub current: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
pub mod sub_response {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Fail {
#[prost(string, tag = "1")]
pub topic: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub reason: ::prost::alloc::string::String,
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Unsub {
#[prost(string, repeated, tag = "1")]
pub topics: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnsubResponse {
#[prost(string, repeated, tag = "3")]
pub current: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Notification {
#[prost(string, tag = "1")]
pub topic: ::prost::alloc::string::String,
#[prost(enumeration = "ContentType", tag = "2")]
pub content_type: i32,
#[prost(enumeration = "DispatchType", tag = "3")]
pub dispatch_type: i32,
#[prost(bytes = "vec", tag = "4")]
pub data: ::prost::alloc::vec::Vec<u8>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Command {
CmdUnknown = 0,
CmdSub = 16,
CmdUnsub = 17,
CmdNotify = 18,
}
impl Command {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::CmdUnknown => "CMD_UNKNOWN",
Self::CmdSub => "CMD_SUB",
Self::CmdUnsub => "CMD_UNSUB",
Self::CmdNotify => "CMD_NOTIFY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CMD_UNKNOWN" => Some(Self::CmdUnknown),
"CMD_SUB" => Some(Self::CmdSub),
"CMD_UNSUB" => Some(Self::CmdUnsub),
"CMD_NOTIFY" => Some(Self::CmdNotify),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DispatchType {
DispatchUndefined = 0,
DispatchDirect = 1,
DispatchBroadcast = 2,
}
impl DispatchType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::DispatchUndefined => "DISPATCH_UNDEFINED",
Self::DispatchDirect => "DISPATCH_DIRECT",
Self::DispatchBroadcast => "DISPATCH_BROADCAST",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DISPATCH_UNDEFINED" => Some(Self::DispatchUndefined),
"DISPATCH_DIRECT" => Some(Self::DispatchDirect),
"DISPATCH_BROADCAST" => Some(Self::DispatchBroadcast),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ContentType {
ContentUndefined = 0,
ContentJson = 1,
ContentProto = 2,
}
impl ContentType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::ContentUndefined => "CONTENT_UNDEFINED",
Self::ContentJson => "CONTENT_JSON",
Self::ContentProto => "CONTENT_PROTO",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CONTENT_UNDEFINED" => Some(Self::ContentUndefined),
"CONTENT_JSON" => Some(Self::ContentJson),
"CONTENT_PROTO" => Some(Self::ContentProto),
_ => None,
}
}
}