#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Request {
#[prost(message, optional, tag = "1")]
pub tenant: ::core::option::Option<Tenant>,
#[prost(string, tag = "2")]
pub settings_xml: ::prost::alloc::string::String,
#[prost(oneof = "request::Operation", tags = "10, 11, 12, 13, 14, 15")]
pub operation: ::core::option::Option<request::Operation>,
}
pub mod request {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Operation {
#[prost(message, tag = "10")]
Describe(super::Describe),
#[prost(message, tag = "11")]
Insert(super::Insert),
#[prost(message, tag = "12")]
Plan(super::Plan),
#[prost(message, tag = "13")]
Merge(super::Merge),
#[prost(message, tag = "14")]
Housekeep(super::Housekeep),
#[prost(message, tag = "15")]
Share(super::Share),
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Tenant {
#[prost(string, tag = "1")]
pub inodedb_endpoint: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub inodedb_key: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub s3: ::core::option::Option<S3>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct S3 {
#[prost(string, tag = "1")]
pub endpoint: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub bucket: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub prefix: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub region: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub access_key: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub secret_key: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TableName {
#[prost(string, tag = "1")]
pub database: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub table: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Describe {
#[prost(bool, tag = "1")]
pub parts: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Insert {
#[prost(message, optional, tag = "1")]
pub table: ::core::option::Option<TableName>,
#[prost(string, tag = "2")]
pub format: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub token: ::prost::alloc::string::String,
#[prost(bool, tag = "4")]
pub at_least_once: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Plan {
#[prost(message, optional, tag = "1")]
pub table: ::core::option::Option<TableName>,
#[prost(uint32, tag = "2")]
pub max_merges: u32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Merge {
#[prost(message, optional, tag = "1")]
pub table: ::core::option::Option<TableName>,
#[prost(string, tag = "2")]
pub partition_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub sources: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Housekeep {
#[prost(message, optional, tag = "1")]
pub table: ::core::option::Option<TableName>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Share {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Response {
#[prost(enumeration = "Status", tag = "1")]
pub status: i32,
#[prost(string, tag = "2")]
pub message: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub exception_code: i32,
#[prost(message, optional, tag = "4")]
pub usage: ::core::option::Option<Usage>,
#[prost(oneof = "response::Result", tags = "10, 11, 12, 13, 14, 15")]
pub result: ::core::option::Option<response::Result>,
}
pub mod response {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Result {
#[prost(message, tag = "10")]
Described(super::Described),
#[prost(message, tag = "11")]
Inserted(super::Inserted),
#[prost(message, tag = "12")]
Planned(super::Planned),
#[prost(message, tag = "13")]
Merged(super::Merged),
#[prost(message, tag = "14")]
Housekept(super::Housekept),
#[prost(message, tag = "15")]
Shared(super::Shared),
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Usage {
#[prost(uint32, tag = "1")]
pub inodedb_commits: u32,
#[prost(uint32, tag = "2")]
pub inodedb_stats: u32,
#[prost(uint32, tag = "3")]
pub inodedb_reads: u32,
#[prost(uint32, tag = "4")]
pub inodedb_lists: u32,
#[prost(uint32, tag = "5")]
pub s3_reads: u32,
#[prost(uint32, tag = "6")]
pub s3_writes: u32,
#[prost(uint64, tag = "7")]
pub cpu_microseconds: u64,
#[prost(uint64, tag = "8")]
pub anonymous_memory_bytes: u64,
#[prost(uint32, tag = "9")]
pub threads: u32,
#[prost(uint64, tag = "10")]
pub inodedb_microseconds: u64,
#[prost(uint32, tag = "11")]
pub inodedb_retries: u32,
#[prost(uint64, tag = "12")]
pub s3_read_microseconds: u64,
#[prost(uint64, tag = "13")]
pub s3_write_microseconds: u64,
#[prost(uint32, tag = "14")]
pub s3_throttled: u32,
#[prost(uint64, tag = "15")]
pub s3_bytes_read: u64,
#[prost(uint64, tag = "16")]
pub s3_bytes_written: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Described {
#[prost(message, repeated, tag = "1")]
pub tables: ::prost::alloc::vec::Vec<Table>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Table {
#[prost(message, optional, tag = "1")]
pub name: ::core::option::Option<TableName>,
#[prost(string, tag = "2")]
pub uuid: ::prost::alloc::string::String,
#[prost(enumeration = "table::Kind", tag = "3")]
pub kind: i32,
#[prost(string, tag = "4")]
pub engine: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "5")]
pub views: ::prost::alloc::vec::Vec<View>,
#[prost(message, repeated, tag = "6")]
pub parts: ::prost::alloc::vec::Vec<Part>,
}
pub mod table {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Kind {
Unspecified = 0,
Table = 1,
MaterializedView = 2,
View = 3,
Dictionary = 4,
}
impl Kind {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "KIND_UNSPECIFIED",
Self::Table => "TABLE",
Self::MaterializedView => "MATERIALIZED_VIEW",
Self::View => "VIEW",
Self::Dictionary => "DICTIONARY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"KIND_UNSPECIFIED" => Some(Self::Unspecified),
"TABLE" => Some(Self::Table),
"MATERIALIZED_VIEW" => Some(Self::MaterializedView),
"VIEW" => Some(Self::View),
"DICTIONARY" => Some(Self::Dictionary),
_ => None,
}
}
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct View {
#[prost(message, optional, tag = "1")]
pub view: ::core::option::Option<TableName>,
#[prost(message, optional, tag = "2")]
pub target: ::core::option::Option<TableName>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Part {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub partition_id: ::prost::alloc::string::String,
#[prost(int64, tag = "3")]
pub min_block: i64,
#[prost(int64, tag = "4")]
pub max_block: i64,
#[prost(uint32, tag = "5")]
pub level: u32,
#[prost(int64, tag = "6")]
pub mutation: i64,
#[prost(bool, tag = "7")]
pub active: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Inserted {
#[prost(message, repeated, tag = "1")]
pub parts: ::prost::alloc::vec::Vec<CommittedPart>,
#[prost(uint32, tag = "2")]
pub counter_conflicts: u32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CommittedPart {
#[prost(message, optional, tag = "1")]
pub table: ::core::option::Option<TableName>,
#[prost(string, tag = "2")]
pub part: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub rows: u64,
#[prost(uint64, tag = "4")]
pub bytes: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Planned {
#[prost(message, repeated, tag = "1")]
pub candidates: ::prost::alloc::vec::Vec<MergeCandidate>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MergeCandidate {
#[prost(string, tag = "1")]
pub partition_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub sources: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(uint64, tag = "3")]
pub rows: u64,
#[prost(uint64, tag = "4")]
pub bytes: u64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Merged {
#[prost(string, tag = "1")]
pub part: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
pub rows: u64,
#[prost(uint64, tag = "3")]
pub bytes: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Housekept {
#[prost(string, repeated, tag = "1")]
pub removed: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "2")]
pub remaining: ::prost::alloc::vec::Vec<Remaining>,
#[prost(uint32, tag = "3")]
pub temporary_directories_removed: u32,
#[prost(uint64, tag = "4")]
pub blobs_removed: u64,
#[prost(bool, tag = "5")]
pub blobs_remain: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Remaining {
#[prost(string, tag = "1")]
pub part: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub reason: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Shared {
#[prost(uint64, tag = "1")]
pub owner_version: u64,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Status {
Unspecified = 0,
Ok = 1,
Duplicate = 2,
SchemaChanged = 3,
Fenced = 4,
ClaimLost = 5,
Refused = 6,
Failed = 7,
}
impl Status {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "STATUS_UNSPECIFIED",
Self::Ok => "OK",
Self::Duplicate => "DUPLICATE",
Self::SchemaChanged => "SCHEMA_CHANGED",
Self::Fenced => "FENCED",
Self::ClaimLost => "CLAIM_LOST",
Self::Refused => "REFUSED",
Self::Failed => "FAILED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"OK" => Some(Self::Ok),
"DUPLICATE" => Some(Self::Duplicate),
"SCHEMA_CHANGED" => Some(Self::SchemaChanged),
"FENCED" => Some(Self::Fenced),
"CLAIM_LOST" => Some(Self::ClaimLost),
"REFUSED" => Some(Self::Refused),
"FAILED" => Some(Self::Failed),
_ => None,
}
}
}