#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SerializedObject {
#[prost(string, tag = "1")]
pub r#type: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub revision: ::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 MetaDataValue {
#[prost(oneof = "meta_data_value::Data", tags = "1, 2, 3, 4, 5")]
pub data: ::core::option::Option<meta_data_value::Data>,
}
pub mod meta_data_value {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Data {
#[prost(string, tag = "1")]
TextValue(::prost::alloc::string::String),
#[prost(sint64, tag = "2")]
NumberValue(i64),
#[prost(bool, tag = "3")]
BooleanValue(bool),
#[prost(double, tag = "4")]
DoubleValue(f64),
#[prost(message, tag = "5")]
BytesValue(super::SerializedObject),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProcessingInstruction {
#[prost(enumeration = "ProcessingKey", tag = "1")]
pub key: i32,
#[prost(message, optional, tag = "2")]
pub value: ::core::option::Option<MetaDataValue>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ErrorMessage {
#[prost(string, tag = "1")]
pub message: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub location: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub details: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "4")]
pub error_code: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FlowControl {
#[prost(string, tag = "2")]
pub client_id: ::prost::alloc::string::String,
#[prost(int64, tag = "3")]
pub permits: i64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstructionAck {
#[prost(string, tag = "1")]
pub instruction_id: ::prost::alloc::string::String,
#[prost(bool, tag = "2")]
pub success: bool,
#[prost(message, optional, tag = "3")]
pub error: ::core::option::Option<ErrorMessage>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstructionResult {
#[prost(string, tag = "1")]
pub instruction_id: ::prost::alloc::string::String,
#[prost(bool, tag = "2")]
pub success: bool,
#[prost(message, optional, tag = "3")]
pub error: ::core::option::Option<ErrorMessage>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProcessingKey {
RoutingKey = 0,
Priority = 1,
Timeout = 2,
NrOfResults = 3,
}
impl ProcessingKey {
pub fn as_str_name(&self) -> &'static str {
match self {
ProcessingKey::RoutingKey => "ROUTING_KEY",
ProcessingKey::Priority => "PRIORITY",
ProcessingKey::Timeout => "TIMEOUT",
ProcessingKey::NrOfResults => "NR_OF_RESULTS",
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TaskStatus {
Scheduled = 0,
Completed = 1,
Failed = 2,
Running = 3,
Cancelled = 4,
}
impl TaskStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
TaskStatus::Scheduled => "SCHEDULED",
TaskStatus::Completed => "COMPLETED",
TaskStatus::Failed => "FAILED",
TaskStatus::Running => "RUNNING",
TaskStatus::Cancelled => "CANCELLED",
}
}
}