#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Permissions {
#[prost(oneof = "permissions::Kind", tags = "1, 2")]
pub kind: ::core::option::Option<permissions::Kind>,
}
pub mod permissions {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Kind {
#[prost(enumeration = "super::SuperUserPermissions", tag = "1")]
SuperUser(i32),
#[prost(message, tag = "2")]
Explicit(super::ExplicitPermissions),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExplicitPermissions {
#[prost(message, repeated, tag = "1")]
pub permissions: ::prost::alloc::vec::Vec<PermissionsType>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PermissionsType {
#[prost(oneof = "permissions_type::Kind", tags = "1, 2")]
pub kind: ::core::option::Option<permissions_type::Kind>,
}
pub mod permissions_type {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct All {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CacheSelector {
#[prost(oneof = "cache_selector::Kind", tags = "1")]
pub kind: ::core::option::Option<cache_selector::Kind>,
}
pub mod cache_selector {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Kind {
#[prost(string, tag = "1")]
CacheName(::prost::alloc::string::String),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CacheItemSelector {
#[prost(oneof = "cache_item_selector::Kind", tags = "1, 2")]
pub kind: ::core::option::Option<cache_item_selector::Kind>,
}
pub mod cache_item_selector {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Kind {
#[prost(bytes, tag = "1")]
Key(::prost::alloc::vec::Vec<u8>),
#[prost(bytes, tag = "2")]
KeyPrefix(::prost::alloc::vec::Vec<u8>),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CachePermissions {
#[prost(enumeration = "super::CacheRole", tag = "1")]
pub role: i32,
#[prost(oneof = "cache_permissions::Cache", tags = "2, 3")]
pub cache: ::core::option::Option<cache_permissions::Cache>,
#[prost(oneof = "cache_permissions::CacheItem", tags = "4, 5")]
pub cache_item: ::core::option::Option<cache_permissions::CacheItem>,
}
pub mod cache_permissions {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Cache {
#[prost(message, tag = "2")]
AllCaches(super::All),
#[prost(message, tag = "3")]
CacheSelector(super::CacheSelector),
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum CacheItem {
#[prost(message, tag = "4")]
AllItems(super::All),
#[prost(message, tag = "5")]
ItemSelector(super::CacheItemSelector),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TopicSelector {
#[prost(oneof = "topic_selector::Kind", tags = "1, 2")]
pub kind: ::core::option::Option<topic_selector::Kind>,
}
pub mod topic_selector {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Kind {
#[prost(string, tag = "1")]
TopicName(::prost::alloc::string::String),
#[prost(string, tag = "2")]
TopicNamePrefix(::prost::alloc::string::String),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TopicPermissions {
#[prost(enumeration = "super::TopicRole", tag = "1")]
pub role: i32,
#[prost(oneof = "topic_permissions::Cache", tags = "2, 3")]
pub cache: ::core::option::Option<topic_permissions::Cache>,
#[prost(oneof = "topic_permissions::Topic", tags = "4, 5")]
pub topic: ::core::option::Option<topic_permissions::Topic>,
}
pub mod topic_permissions {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Cache {
#[prost(message, tag = "2")]
AllCaches(super::All),
#[prost(message, tag = "3")]
CacheSelector(super::CacheSelector),
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Topic {
#[prost(message, tag = "4")]
AllTopics(super::All),
#[prost(message, tag = "5")]
TopicSelector(super::TopicSelector),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Kind {
#[prost(message, tag = "1")]
CachePermissions(CachePermissions),
#[prost(message, tag = "2")]
TopicPermissions(TopicPermissions),
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CacheRole {
CachePermitNone = 0,
CacheReadWrite = 1,
CacheReadOnly = 2,
CacheWriteOnly = 3,
}
impl CacheRole {
pub fn as_str_name(&self) -> &'static str {
match self {
CacheRole::CachePermitNone => "CachePermitNone",
CacheRole::CacheReadWrite => "CacheReadWrite",
CacheRole::CacheReadOnly => "CacheReadOnly",
CacheRole::CacheWriteOnly => "CacheWriteOnly",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CachePermitNone" => Some(Self::CachePermitNone),
"CacheReadWrite" => Some(Self::CacheReadWrite),
"CacheReadOnly" => Some(Self::CacheReadOnly),
"CacheWriteOnly" => Some(Self::CacheWriteOnly),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TopicRole {
TopicPermitNone = 0,
TopicReadWrite = 1,
TopicReadOnly = 2,
TopicWriteOnly = 3,
}
impl TopicRole {
pub fn as_str_name(&self) -> &'static str {
match self {
TopicRole::TopicPermitNone => "TopicPermitNone",
TopicRole::TopicReadWrite => "TopicReadWrite",
TopicRole::TopicReadOnly => "TopicReadOnly",
TopicRole::TopicWriteOnly => "TopicWriteOnly",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TopicPermitNone" => Some(Self::TopicPermitNone),
"TopicReadWrite" => Some(Self::TopicReadWrite),
"TopicReadOnly" => Some(Self::TopicReadOnly),
"TopicWriteOnly" => Some(Self::TopicWriteOnly),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SuperUserPermissions {
SuperUser = 0,
}
impl SuperUserPermissions {
pub fn as_str_name(&self) -> &'static str {
match self {
SuperUserPermissions::SuperUser => "SuperUser",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SuperUser" => Some(Self::SuperUser),
_ => None,
}
}
}