#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionEvent {
#[prost(uint64, tag = "1")]
pub seq: u64,
#[prost(string, tag = "2")]
pub exec_id: ::prost::alloc::string::String,
#[prost(oneof = "execution_event::Event", tags = "3, 4, 5, 6, 7")]
pub event: ::core::option::Option<execution_event::Event>,
}
pub mod execution_event {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamOutput {
#[prost(enumeration = "StreamName", tag = "1")]
pub name: i32,
#[prost(string, tag = "2")]
pub text: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MimeBundle {
#[prost(map = "string, bytes", tag = "1")]
pub payloads: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::vec::Vec<u8>,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionResult {
#[prost(message, optional, tag = "1")]
pub mime_bundle: ::core::option::Option<MimeBundle>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DisplayData {
#[prost(message, optional, tag = "1")]
pub mime_bundle: ::core::option::Option<MimeBundle>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionError {
#[prost(string, tag = "1")]
pub ename: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub evalue: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub traceback: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(enumeration = "execution_error::Source", tag = "4")]
pub source: i32,
}
pub mod execution_error {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Source {
Unspecified = 0,
Interpreter = 1,
KernelDied = 2,
OutputDropped = 3,
SupervisionFailed = 4,
}
impl Source {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SOURCE_UNSPECIFIED",
Self::Interpreter => "SOURCE_INTERPRETER",
Self::KernelDied => "SOURCE_KERNEL_DIED",
Self::OutputDropped => "SOURCE_OUTPUT_DROPPED",
Self::SupervisionFailed => "SOURCE_SUPERVISION_FAILED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SOURCE_UNSPECIFIED" => Some(Self::Unspecified),
"SOURCE_INTERPRETER" => Some(Self::Interpreter),
"SOURCE_KERNEL_DIED" => Some(Self::KernelDied),
"SOURCE_OUTPUT_DROPPED" => Some(Self::OutputDropped),
"SOURCE_SUPERVISION_FAILED" => Some(Self::SupervisionFailed),
_ => None,
}
}
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ExecutionComplete {
#[prost(enumeration = "Status", tag = "1")]
pub status: i32,
#[prost(double, tag = "2")]
pub duration_s: f64,
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum StreamName {
Unspecified = 0,
Stdout = 1,
Stderr = 2,
}
impl StreamName {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "STREAM_NAME_UNSPECIFIED",
Self::Stdout => "STREAM_NAME_STDOUT",
Self::Stderr => "STREAM_NAME_STDERR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STREAM_NAME_UNSPECIFIED" => Some(Self::Unspecified),
"STREAM_NAME_STDOUT" => Some(Self::Stdout),
"STREAM_NAME_STDERR" => Some(Self::Stderr),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Status {
Unspecified = 0,
Ok = 1,
Error = 2,
Interrupted = 3,
}
impl Status {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "STATUS_UNSPECIFIED",
Self::Ok => "STATUS_OK",
Self::Error => "STATUS_ERROR",
Self::Interrupted => "STATUS_INTERRUPTED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"STATUS_OK" => Some(Self::Ok),
"STATUS_ERROR" => Some(Self::Error),
"STATUS_INTERRUPTED" => Some(Self::Interrupted),
_ => None,
}
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Event {
#[prost(message, tag = "3")]
StreamOutput(StreamOutput),
#[prost(message, tag = "4")]
Result(ExecutionResult),
#[prost(message, tag = "5")]
DisplayData(DisplayData),
#[prost(message, tag = "6")]
Error(ExecutionError),
#[prost(message, tag = "7")]
Complete(ExecutionComplete),
}
}