Skip to main content

nominal_api_proto/proto/
nominal.codesandbox.v1.rs

1// This file is @generated by prost-build.
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct ExecutionEvent {
4    #[prost(uint64, tag = "1")]
5    pub seq: u64,
6    #[prost(string, tag = "2")]
7    pub exec_id: ::prost::alloc::string::String,
8    #[prost(oneof = "execution_event::Event", tags = "3, 4, 5, 6, 7")]
9    pub event: ::core::option::Option<execution_event::Event>,
10}
11/// Nested message and enum types in `ExecutionEvent`.
12pub mod execution_event {
13    #[derive(Clone, PartialEq, ::prost::Message)]
14    pub struct StreamOutput {
15        #[prost(enumeration = "StreamName", tag = "1")]
16        pub name: i32,
17        #[prost(string, tag = "2")]
18        pub text: ::prost::alloc::string::String,
19    }
20    #[derive(Clone, PartialEq, ::prost::Message)]
21    pub struct MimeBundle {
22        #[prost(map = "string, bytes", tag = "1")]
23        pub payloads: ::std::collections::HashMap<
24            ::prost::alloc::string::String,
25            ::prost::alloc::vec::Vec<u8>,
26        >,
27    }
28    #[derive(Clone, PartialEq, ::prost::Message)]
29    pub struct ExecutionResult {
30        #[prost(message, optional, tag = "1")]
31        pub mime_bundle: ::core::option::Option<MimeBundle>,
32    }
33    #[derive(Clone, PartialEq, ::prost::Message)]
34    pub struct DisplayData {
35        #[prost(message, optional, tag = "1")]
36        pub mime_bundle: ::core::option::Option<MimeBundle>,
37    }
38    #[derive(Clone, PartialEq, ::prost::Message)]
39    pub struct ExecutionError {
40        #[prost(string, tag = "1")]
41        pub ename: ::prost::alloc::string::String,
42        #[prost(string, tag = "2")]
43        pub evalue: ::prost::alloc::string::String,
44        #[prost(string, repeated, tag = "3")]
45        pub traceback: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
46        #[prost(enumeration = "execution_error::Source", tag = "4")]
47        pub source: i32,
48    }
49    /// Nested message and enum types in `ExecutionError`.
50    pub mod execution_error {
51        #[derive(
52            Clone,
53            Copy,
54            Debug,
55            PartialEq,
56            Eq,
57            Hash,
58            PartialOrd,
59            Ord,
60            ::prost::Enumeration
61        )]
62        #[repr(i32)]
63        pub enum Source {
64            Unspecified = 0,
65            Interpreter = 1,
66            KernelDied = 2,
67            OutputDropped = 3,
68            SupervisionFailed = 4,
69        }
70        impl Source {
71            /// String value of the enum field names used in the ProtoBuf definition.
72            ///
73            /// The values are not transformed in any way and thus are considered stable
74            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
75            pub fn as_str_name(&self) -> &'static str {
76                match self {
77                    Self::Unspecified => "SOURCE_UNSPECIFIED",
78                    Self::Interpreter => "SOURCE_INTERPRETER",
79                    Self::KernelDied => "SOURCE_KERNEL_DIED",
80                    Self::OutputDropped => "SOURCE_OUTPUT_DROPPED",
81                    Self::SupervisionFailed => "SOURCE_SUPERVISION_FAILED",
82                }
83            }
84            /// Creates an enum from field names used in the ProtoBuf definition.
85            pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
86                match value {
87                    "SOURCE_UNSPECIFIED" => Some(Self::Unspecified),
88                    "SOURCE_INTERPRETER" => Some(Self::Interpreter),
89                    "SOURCE_KERNEL_DIED" => Some(Self::KernelDied),
90                    "SOURCE_OUTPUT_DROPPED" => Some(Self::OutputDropped),
91                    "SOURCE_SUPERVISION_FAILED" => Some(Self::SupervisionFailed),
92                    _ => None,
93                }
94            }
95        }
96    }
97    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
98    pub struct ExecutionComplete {
99        #[prost(enumeration = "Status", tag = "1")]
100        pub status: i32,
101        #[prost(double, tag = "2")]
102        pub duration_s: f64,
103    }
104    #[derive(
105        Clone,
106        Copy,
107        Debug,
108        PartialEq,
109        Eq,
110        Hash,
111        PartialOrd,
112        Ord,
113        ::prost::Enumeration
114    )]
115    #[repr(i32)]
116    pub enum StreamName {
117        Unspecified = 0,
118        Stdout = 1,
119        Stderr = 2,
120    }
121    impl StreamName {
122        /// String value of the enum field names used in the ProtoBuf definition.
123        ///
124        /// The values are not transformed in any way and thus are considered stable
125        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
126        pub fn as_str_name(&self) -> &'static str {
127            match self {
128                Self::Unspecified => "STREAM_NAME_UNSPECIFIED",
129                Self::Stdout => "STREAM_NAME_STDOUT",
130                Self::Stderr => "STREAM_NAME_STDERR",
131            }
132        }
133        /// Creates an enum from field names used in the ProtoBuf definition.
134        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
135            match value {
136                "STREAM_NAME_UNSPECIFIED" => Some(Self::Unspecified),
137                "STREAM_NAME_STDOUT" => Some(Self::Stdout),
138                "STREAM_NAME_STDERR" => Some(Self::Stderr),
139                _ => None,
140            }
141        }
142    }
143    #[derive(
144        Clone,
145        Copy,
146        Debug,
147        PartialEq,
148        Eq,
149        Hash,
150        PartialOrd,
151        Ord,
152        ::prost::Enumeration
153    )]
154    #[repr(i32)]
155    pub enum Status {
156        Unspecified = 0,
157        Ok = 1,
158        Error = 2,
159        Interrupted = 3,
160    }
161    impl Status {
162        /// String value of the enum field names used in the ProtoBuf definition.
163        ///
164        /// The values are not transformed in any way and thus are considered stable
165        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
166        pub fn as_str_name(&self) -> &'static str {
167            match self {
168                Self::Unspecified => "STATUS_UNSPECIFIED",
169                Self::Ok => "STATUS_OK",
170                Self::Error => "STATUS_ERROR",
171                Self::Interrupted => "STATUS_INTERRUPTED",
172            }
173        }
174        /// Creates an enum from field names used in the ProtoBuf definition.
175        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
176            match value {
177                "STATUS_UNSPECIFIED" => Some(Self::Unspecified),
178                "STATUS_OK" => Some(Self::Ok),
179                "STATUS_ERROR" => Some(Self::Error),
180                "STATUS_INTERRUPTED" => Some(Self::Interrupted),
181                _ => None,
182            }
183        }
184    }
185    #[derive(Clone, PartialEq, ::prost::Oneof)]
186    pub enum Event {
187        #[prost(message, tag = "3")]
188        StreamOutput(StreamOutput),
189        #[prost(message, tag = "4")]
190        Result(ExecutionResult),
191        #[prost(message, tag = "5")]
192        DisplayData(DisplayData),
193        #[prost(message, tag = "6")]
194        Error(ExecutionError),
195        #[prost(message, tag = "7")]
196        Complete(ExecutionComplete),
197    }
198}