#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommandContextArgument {
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub value: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommandContext {
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
#[prost(message, repeated, tag="2")]
pub arguments: ::prost::alloc::vec::Vec<CommandContextArgument>,
#[prost(message, optional, boxed, tag="3")]
pub subcommand: ::core::option::Option<::prost::alloc::boxed::Box<CommandContext>>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum EscalatedPrivilege {
All = 0,
ReloadPlugin = 1,
LoadPlugin = 2,
}
impl EscalatedPrivilege {
pub fn as_str_name(&self) -> &'static str {
match self {
EscalatedPrivilege::All => "ALL",
EscalatedPrivilege::ReloadPlugin => "RELOAD_PLUGIN",
EscalatedPrivilege::LoadPlugin => "LOAD_PLUGIN",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ALL" => Some(Self::All),
"RELOAD_PLUGIN" => Some(Self::ReloadPlugin),
"LOAD_PLUGIN" => Some(Self::LoadPlugin),
_ => None,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Argument {
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub description: ::prost::alloc::string::String,
#[prost(string, optional, tag="3")]
pub default_value: ::core::option::Option<::prost::alloc::string::String>,
#[prost(bool, tag="4")]
pub required: bool,
#[prost(string, optional, tag="5")]
pub short: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag="6")]
pub long: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Command {
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub description: ::prost::alloc::string::String,
#[prost(string, optional, tag="3")]
pub author: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag="4")]
pub version: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, repeated, tag="5")]
pub aliases: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag="6")]
pub arguments: ::prost::alloc::vec::Vec<Argument>,
#[prost(message, repeated, tag="7")]
pub subcommands: ::prost::alloc::vec::Vec<Command>,
#[prost(message, optional, tag="8")]
pub access_checks: ::core::option::Option<super::access_check::AccessCheckChain>,
}
#[cfg_attr(feature = "kameo", derive(kameo::Reply))]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Metadata {
#[prost(string, tag="1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag="2")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag="3")]
pub version: ::prost::alloc::string::String,
#[prost(bool, tag="4")]
pub database: bool,
#[prost(message, optional, tag="5")]
pub access_checks: ::core::option::Option<super::access_check::AccessCheckChain>,
#[prost(string, optional, tag="6")]
pub escalation_key: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration="EscalatedPrivilege", repeated, tag="7")]
pub escalated_privileges: ::prost::alloc::vec::Vec<i32>,
#[prost(string, tag="8")]
pub author: ::prost::alloc::string::String,
#[prost(bool, tag="9")]
pub handles_commands: bool,
#[prost(bool, tag="10")]
pub handles_messages: bool,
#[prost(string, optional, tag="11")]
pub command_name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, repeated, tag="12")]
pub aliases: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag="13")]
pub arguments: ::prost::alloc::vec::Vec<Argument>,
#[prost(message, repeated, tag="14")]
pub subcommands: ::prost::alloc::vec::Vec<Command>,
#[prost(string, repeated, tag="15")]
pub allowed_hosts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(int32, tag="16")]
pub pool_size: i32,
}