perspective_client/
proto.rs

1// This file is @generated by prost-build.
2/// Recoverable, user-readable error reporting from the engine.
3#[derive(serde::Serialize)]
4#[allow(clippy::derive_partial_eq_without_eq)]
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct ServerError {
7    #[prost(string, tag = "1")]
8    pub message: ::prost::alloc::string::String,
9    #[prost(enumeration = "StatusCode", tag = "2")]
10    pub status_code: i32,
11}
12#[derive(serde::Serialize)]
13#[allow(clippy::derive_partial_eq_without_eq)]
14#[derive(Clone, PartialEq, ::prost::Message)]
15pub struct Schema {
16    #[prost(message, repeated, tag = "1")]
17    pub schema: ::prost::alloc::vec::Vec<schema::KeyTypePair>,
18}
19/// Nested message and enum types in `Schema`.
20pub mod schema {
21    #[derive(serde::Serialize)]
22    #[allow(clippy::derive_partial_eq_without_eq)]
23    #[derive(Clone, PartialEq, ::prost::Message)]
24    pub struct KeyTypePair {
25        #[prost(string, tag = "1")]
26        pub name: ::prost::alloc::string::String,
27        #[prost(enumeration = "super::ColumnType", tag = "2")]
28        pub r#type: i32,
29    }
30}
31/// The data type constructors Perspective supports.
32#[derive(serde::Serialize)]
33#[allow(clippy::derive_partial_eq_without_eq)]
34#[derive(Clone, PartialEq, ::prost::Message)]
35pub struct MakeTableData {
36    #[prost(oneof = "make_table_data::Data", tags = "1, 2, 3, 4, 5, 6, 7")]
37    pub data: ::core::option::Option<make_table_data::Data>,
38}
39/// Nested message and enum types in `MakeTableData`.
40pub mod make_table_data {
41    #[derive(serde::Serialize)]
42    #[allow(clippy::derive_partial_eq_without_eq)]
43    #[derive(Clone, PartialEq, ::prost::Oneof)]
44    pub enum Data {
45        #[prost(message, tag = "1")]
46        FromSchema(super::Schema),
47        #[prost(string, tag = "2")]
48        FromCsv(::prost::alloc::string::String),
49        #[prost(bytes, tag = "3")]
50        #[serde(skip)]
51        FromArrow(::prost::alloc::vec::Vec<u8>),
52        #[prost(string, tag = "4")]
53        FromRows(::prost::alloc::string::String),
54        #[prost(string, tag = "5")]
55        FromCols(::prost::alloc::string::String),
56        #[prost(string, tag = "6")]
57        FromView(::prost::alloc::string::String),
58        #[prost(string, tag = "7")]
59        FromNdjson(::prost::alloc::string::String),
60    }
61}
62/// Filter type scalars - this is _not_ the same as a Columns scalar, as this
63/// value is used in the view config and must be JSON safe!
64#[derive(serde::Serialize)]
65#[allow(clippy::derive_partial_eq_without_eq)]
66#[derive(Clone, PartialEq, ::prost::Message)]
67pub struct Scalar {
68    #[prost(oneof = "scalar::Scalar", tags = "1, 4, 6, 7")]
69    pub scalar: ::core::option::Option<scalar::Scalar>,
70}
71/// Nested message and enum types in `Scalar`.
72pub mod scalar {
73    #[derive(serde::Serialize)]
74    #[allow(clippy::derive_partial_eq_without_eq)]
75    #[derive(Clone, PartialEq, ::prost::Oneof)]
76    pub enum Scalar {
77        #[prost(bool, tag = "1")]
78        Bool(bool),
79        /// int64 date = 2; // TODO these are the wrong type
80        /// int64 datetime = 3;
81        #[prost(double, tag = "4")]
82        Float(f64),
83        /// int32 int = 5;
84        #[prost(string, tag = "6")]
85        String(::prost::alloc::string::String),
86        #[prost(enumeration = "::prost_types::NullValue", tag = "7")]
87        Null(i32),
88    }
89}
90/// Options for requresting a slice of data, starting with the rectangular
91/// viewport.
92#[derive(serde::Serialize)]
93#[allow(clippy::derive_partial_eq_without_eq)]
94#[derive(Clone, PartialEq, ::prost::Message)]
95pub struct ViewPort {
96    #[prost(uint32, optional, tag = "1")]
97    pub start_row: ::core::option::Option<u32>,
98    #[prost(uint32, optional, tag = "2")]
99    pub start_col: ::core::option::Option<u32>,
100    #[prost(uint32, optional, tag = "3")]
101    pub end_row: ::core::option::Option<u32>,
102    ///    optional bool id = 5;
103    ///    optional bool index = 3;
104    ///    optional bool formatted = 6;
105    ///    optional bool leaves_only = 7;
106    ///    optional bool compression = 3;
107    #[prost(uint32, optional, tag = "4")]
108    pub end_col: ::core::option::Option<u32>,
109}
110#[derive(serde::Serialize)]
111#[allow(clippy::derive_partial_eq_without_eq)]
112#[derive(Clone, PartialEq, ::prost::Message)]
113pub struct Request {
114    #[prost(uint32, tag = "1")]
115    pub msg_id: u32,
116    #[prost(string, tag = "2")]
117    pub entity_id: ::prost::alloc::string::String,
118    #[prost(
119        oneof = "request::ClientReq",
120        tags = "3, 4, 37, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 36, 27, 28, 29, 30, 31, 32, 33, 34, 35"
121    )]
122    pub client_req: ::core::option::Option<request::ClientReq>,
123}
124/// Nested message and enum types in `Request`.
125pub mod request {
126    #[derive(serde::Serialize)]
127    #[allow(clippy::derive_partial_eq_without_eq)]
128    #[derive(Clone, PartialEq, ::prost::Oneof)]
129    pub enum ClientReq {
130        /// Minimum Virtual API (theoretical).
131        #[prost(message, tag = "3")]
132        GetFeaturesReq(super::GetFeaturesReq),
133        #[prost(message, tag = "4")]
134        GetHostedTablesReq(super::GetHostedTablesReq),
135        #[prost(message, tag = "37")]
136        RemoveHostedTablesUpdateReq(super::RemoveHostedTablesUpdateReq),
137        #[prost(message, tag = "5")]
138        TableMakePortReq(super::TableMakePortReq),
139        #[prost(message, tag = "6")]
140        TableMakeViewReq(super::TableMakeViewReq),
141        #[prost(message, tag = "7")]
142        TableSchemaReq(super::TableSchemaReq),
143        #[prost(message, tag = "8")]
144        TableSizeReq(super::TableSizeReq),
145        #[prost(message, tag = "9")]
146        TableValidateExprReq(super::TableValidateExprReq),
147        #[prost(message, tag = "10")]
148        ViewColumnPathsReq(super::ViewColumnPathsReq),
149        #[prost(message, tag = "11")]
150        ViewDeleteReq(super::ViewDeleteReq),
151        #[prost(message, tag = "12")]
152        ViewDimensionsReq(super::ViewDimensionsReq),
153        #[prost(message, tag = "13")]
154        ViewExpressionSchemaReq(super::ViewExpressionSchemaReq),
155        #[prost(message, tag = "14")]
156        ViewGetConfigReq(super::ViewGetConfigReq),
157        #[prost(message, tag = "15")]
158        ViewSchemaReq(super::ViewSchemaReq),
159        #[prost(message, tag = "16")]
160        ViewToArrowReq(super::ViewToArrowReq),
161        /// Optional (we can enable real-time/autocomplete/etc with these, but
162        /// not required).
163        #[prost(message, tag = "17")]
164        ServerSystemInfoReq(super::ServerSystemInfoReq),
165        #[prost(message, tag = "18")]
166        ViewCollapseReq(super::ViewCollapseReq),
167        #[prost(message, tag = "19")]
168        ViewExpandReq(super::ViewExpandReq),
169        #[prost(message, tag = "20")]
170        ViewGetMinMaxReq(super::ViewGetMinMaxReq),
171        #[prost(message, tag = "21")]
172        ViewOnUpdateReq(super::ViewOnUpdateReq),
173        #[prost(message, tag = "22")]
174        ViewRemoveOnUpdateReq(super::ViewRemoveOnUpdateReq),
175        #[prost(message, tag = "23")]
176        ViewSetDepthReq(super::ViewSetDepthReq),
177        #[prost(message, tag = "24")]
178        ViewToColumnsStringReq(super::ViewToColumnsStringReq),
179        #[prost(message, tag = "25")]
180        ViewToCsvReq(super::ViewToCsvReq),
181        #[prost(message, tag = "26")]
182        ViewToRowsStringReq(super::ViewToRowsStringReq),
183        #[prost(message, tag = "36")]
184        ViewToNdjsonStringReq(super::ViewToNdjsonStringReq),
185        /// External (we don't need these for viewer, but the developer may).
186        #[prost(message, tag = "27")]
187        MakeTableReq(super::MakeTableReq),
188        #[prost(message, tag = "28")]
189        TableDeleteReq(super::TableDeleteReq),
190        #[prost(message, tag = "29")]
191        TableOnDeleteReq(super::TableOnDeleteReq),
192        #[prost(message, tag = "30")]
193        TableRemoveDeleteReq(super::TableRemoveDeleteReq),
194        #[prost(message, tag = "31")]
195        TableRemoveReq(super::TableRemoveReq),
196        #[prost(message, tag = "32")]
197        TableReplaceReq(super::TableReplaceReq),
198        #[prost(message, tag = "33")]
199        TableUpdateReq(super::TableUpdateReq),
200        #[prost(message, tag = "34")]
201        ViewOnDeleteReq(super::ViewOnDeleteReq),
202        #[prost(message, tag = "35")]
203        ViewRemoveDeleteReq(super::ViewRemoveDeleteReq),
204    }
205}
206#[derive(serde::Serialize)]
207#[allow(clippy::derive_partial_eq_without_eq)]
208#[derive(Clone, PartialEq, ::prost::Message)]
209pub struct Response {
210    #[prost(uint32, tag = "1")]
211    pub msg_id: u32,
212    #[prost(string, tag = "2")]
213    pub entity_id: ::prost::alloc::string::String,
214    #[prost(
215        oneof = "response::ClientResp",
216        tags = "3, 4, 37, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 36, 27, 28, 29, 30, 31, 32, 33, 34, 35, 50"
217    )]
218    pub client_resp: ::core::option::Option<response::ClientResp>,
219}
220/// Nested message and enum types in `Response`.
221pub mod response {
222    #[derive(serde::Serialize)]
223    #[allow(clippy::derive_partial_eq_without_eq)]
224    #[derive(Clone, PartialEq, ::prost::Oneof)]
225    pub enum ClientResp {
226        #[prost(message, tag = "3")]
227        GetFeaturesResp(super::GetFeaturesResp),
228        #[prost(message, tag = "4")]
229        GetHostedTablesResp(super::GetHostedTablesResp),
230        #[prost(message, tag = "37")]
231        RemoveHostedTablesUpdateResp(super::RemoveHostedTablesUpdateResp),
232        #[prost(message, tag = "5")]
233        TableMakePortResp(super::TableMakePortResp),
234        #[prost(message, tag = "6")]
235        TableMakeViewResp(super::TableMakeViewResp),
236        #[prost(message, tag = "7")]
237        TableSchemaResp(super::TableSchemaResp),
238        #[prost(message, tag = "8")]
239        TableSizeResp(super::TableSizeResp),
240        #[prost(message, tag = "9")]
241        TableValidateExprResp(super::TableValidateExprResp),
242        #[prost(message, tag = "10")]
243        ViewColumnPathsResp(super::ViewColumnPathsResp),
244        #[prost(message, tag = "11")]
245        ViewDeleteResp(super::ViewDeleteResp),
246        #[prost(message, tag = "12")]
247        ViewDimensionsResp(super::ViewDimensionsResp),
248        #[prost(message, tag = "13")]
249        ViewExpressionSchemaResp(super::ViewExpressionSchemaResp),
250        #[prost(message, tag = "14")]
251        ViewGetConfigResp(super::ViewGetConfigResp),
252        #[prost(message, tag = "15")]
253        ViewSchemaResp(super::ViewSchemaResp),
254        #[prost(message, tag = "16")]
255        ViewToArrowResp(super::ViewToArrowResp),
256        #[prost(message, tag = "17")]
257        ServerSystemInfoResp(super::ServerSystemInfoResp),
258        #[prost(message, tag = "18")]
259        ViewCollapseResp(super::ViewCollapseResp),
260        #[prost(message, tag = "19")]
261        ViewExpandResp(super::ViewExpandResp),
262        #[prost(message, tag = "20")]
263        ViewGetMinMaxResp(super::ViewGetMinMaxResp),
264        #[prost(message, tag = "21")]
265        ViewOnUpdateResp(super::ViewOnUpdateResp),
266        #[prost(message, tag = "22")]
267        ViewRemoveOnUpdateResp(super::ViewRemoveOnUpdateResp),
268        #[prost(message, tag = "23")]
269        ViewSetDepthResp(super::ViewSetDepthResp),
270        #[prost(message, tag = "24")]
271        ViewToColumnsStringResp(super::ViewToColumnsStringResp),
272        #[prost(message, tag = "25")]
273        ViewToCsvResp(super::ViewToCsvResp),
274        #[prost(message, tag = "26")]
275        ViewToRowsStringResp(super::ViewToRowsStringResp),
276        #[prost(message, tag = "36")]
277        ViewToNdjsonStringResp(super::ViewToNdjsonStringResp),
278        #[prost(message, tag = "27")]
279        MakeTableResp(super::MakeTableResp),
280        #[prost(message, tag = "28")]
281        TableDeleteResp(super::TableDeleteResp),
282        #[prost(message, tag = "29")]
283        TableOnDeleteResp(super::TableOnDeleteResp),
284        #[prost(message, tag = "30")]
285        TableRemoveDeleteResp(super::TableRemoveDeleteResp),
286        #[prost(message, tag = "31")]
287        TableRemoveResp(super::TableRemoveResp),
288        #[prost(message, tag = "32")]
289        TableReplaceResp(super::TableReplaceResp),
290        #[prost(message, tag = "33")]
291        TableUpdateResp(super::TableUpdateResp),
292        #[prost(message, tag = "34")]
293        ViewOnDeleteResp(super::ViewOnDeleteResp),
294        #[prost(message, tag = "35")]
295        ViewRemoveDeleteResp(super::ViewRemoveDeleteResp),
296        #[prost(message, tag = "50")]
297        ServerError(super::ServerError),
298    }
299}
300/// Informs the client of the feature set, e.g. what to expect in the
301/// `ViewConfig` message.
302#[derive(serde::Serialize)]
303#[allow(clippy::derive_partial_eq_without_eq)]
304#[derive(Clone, PartialEq, ::prost::Message)]
305pub struct GetFeaturesReq {}
306#[derive(serde::Serialize)]
307#[allow(clippy::derive_partial_eq_without_eq)]
308#[derive(Clone, PartialEq, ::prost::Message)]
309pub struct GetFeaturesResp {
310    #[prost(bool, tag = "1")]
311    pub group_by: bool,
312    #[prost(bool, tag = "2")]
313    pub split_by: bool,
314    #[prost(bool, tag = "3")]
315    pub expressions: bool,
316    #[prost(map = "uint32, message", tag = "4")]
317    pub filter_ops: ::std::collections::HashMap<
318        u32,
319        get_features_resp::ColumnTypeOptions,
320    >,
321}
322/// Nested message and enum types in `GetFeaturesResp`.
323pub mod get_features_resp {
324    #[derive(serde::Serialize)]
325    #[allow(clippy::derive_partial_eq_without_eq)]
326    #[derive(Clone, PartialEq, ::prost::Message)]
327    pub struct ColumnTypeOptions {
328        #[prost(string, repeated, tag = "1")]
329        pub options: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
330    }
331}
332/// `Client::get_hosted_tables`
333#[derive(serde::Serialize)]
334#[allow(clippy::derive_partial_eq_without_eq)]
335#[derive(Clone, PartialEq, ::prost::Message)]
336pub struct GetHostedTablesReq {
337    #[prost(bool, tag = "1")]
338    pub subscribe: bool,
339}
340#[derive(serde::Serialize)]
341#[allow(clippy::derive_partial_eq_without_eq)]
342#[derive(Clone, PartialEq, ::prost::Message)]
343pub struct GetHostedTablesResp {
344    #[prost(message, repeated, tag = "1")]
345    pub table_infos: ::prost::alloc::vec::Vec<HostedTable>,
346}
347#[derive(serde::Serialize)]
348#[allow(clippy::derive_partial_eq_without_eq)]
349#[derive(Clone, PartialEq, ::prost::Message)]
350pub struct HostedTable {
351    #[prost(string, tag = "1")]
352    pub entity_id: ::prost::alloc::string::String,
353    #[prost(string, optional, tag = "2")]
354    pub index: ::core::option::Option<::prost::alloc::string::String>,
355    #[prost(uint32, optional, tag = "3")]
356    pub limit: ::core::option::Option<u32>,
357}
358#[derive(serde::Serialize)]
359#[allow(clippy::derive_partial_eq_without_eq)]
360#[derive(Clone, PartialEq, ::prost::Message)]
361pub struct RemoveHostedTablesUpdateReq {
362    #[prost(uint32, tag = "1")]
363    pub id: u32,
364}
365#[derive(serde::Serialize)]
366#[allow(clippy::derive_partial_eq_without_eq)]
367#[derive(Clone, PartialEq, ::prost::Message)]
368pub struct RemoveHostedTablesUpdateResp {}
369/// `Table::size`
370#[derive(serde::Serialize)]
371#[allow(clippy::derive_partial_eq_without_eq)]
372#[derive(Clone, PartialEq, ::prost::Message)]
373pub struct TableSizeReq {}
374#[derive(serde::Serialize)]
375#[allow(clippy::derive_partial_eq_without_eq)]
376#[derive(Clone, PartialEq, ::prost::Message)]
377pub struct TableSizeResp {
378    #[prost(uint32, tag = "2")]
379    pub size: u32,
380}
381/// `Table::schema`
382#[derive(serde::Serialize)]
383#[allow(clippy::derive_partial_eq_without_eq)]
384#[derive(Clone, PartialEq, ::prost::Message)]
385pub struct TableSchemaReq {}
386#[derive(serde::Serialize)]
387#[allow(clippy::derive_partial_eq_without_eq)]
388#[derive(Clone, PartialEq, ::prost::Message)]
389pub struct TableSchemaResp {
390    #[prost(message, optional, tag = "1")]
391    pub schema: ::core::option::Option<Schema>,
392}
393/// `Table::validate_expressions`
394/// TODO: This should be just `validate()`
395#[derive(serde::Serialize)]
396#[allow(clippy::derive_partial_eq_without_eq)]
397#[derive(Clone, PartialEq, ::prost::Message)]
398pub struct TableValidateExprReq {
399    #[prost(map = "string, string", tag = "1")]
400    pub column_to_expr: ::std::collections::HashMap<
401        ::prost::alloc::string::String,
402        ::prost::alloc::string::String,
403    >,
404}
405#[derive(serde::Serialize)]
406#[derive(serde::Deserialize)]
407#[allow(clippy::derive_partial_eq_without_eq)]
408#[derive(Clone, PartialEq, ::prost::Message)]
409pub struct TableValidateExprResp {
410    #[prost(map = "string, enumeration(ColumnType)", tag = "1")]
411    pub expression_schema: ::std::collections::HashMap<
412        ::prost::alloc::string::String,
413        i32,
414    >,
415    #[prost(map = "string, message", tag = "2")]
416    pub errors: ::std::collections::HashMap<
417        ::prost::alloc::string::String,
418        table_validate_expr_resp::ExprValidationError,
419    >,
420    #[prost(map = "string, string", tag = "3")]
421    pub expression_alias: ::std::collections::HashMap<
422        ::prost::alloc::string::String,
423        ::prost::alloc::string::String,
424    >,
425}
426/// Nested message and enum types in `TableValidateExprResp`.
427pub mod table_validate_expr_resp {
428    #[derive(serde::Serialize)]
429    #[derive(serde::Deserialize)]
430    #[allow(clippy::derive_partial_eq_without_eq)]
431    #[derive(Clone, PartialEq, ::prost::Message)]
432    pub struct ExprValidationError {
433        #[prost(string, tag = "1")]
434        pub error_message: ::prost::alloc::string::String,
435        #[prost(uint32, tag = "2")]
436        pub line: u32,
437        #[prost(uint32, tag = "3")]
438        pub column: u32,
439    }
440}
441/// `Table::view`
442#[derive(serde::Serialize)]
443#[allow(clippy::derive_partial_eq_without_eq)]
444#[derive(Clone, PartialEq, ::prost::Message)]
445pub struct TableMakeViewReq {
446    #[prost(string, tag = "1")]
447    pub view_id: ::prost::alloc::string::String,
448    #[prost(message, optional, tag = "2")]
449    pub config: ::core::option::Option<ViewConfig>,
450}
451#[derive(serde::Serialize)]
452#[allow(clippy::derive_partial_eq_without_eq)]
453#[derive(Clone, PartialEq, ::prost::Message)]
454pub struct TableMakeViewResp {
455    #[prost(string, tag = "1")]
456    pub view_id: ::prost::alloc::string::String,
457}
458/// `View::schema`
459#[derive(serde::Serialize)]
460#[allow(clippy::derive_partial_eq_without_eq)]
461#[derive(Clone, PartialEq, ::prost::Message)]
462pub struct ViewSchemaReq {}
463#[derive(serde::Serialize)]
464#[allow(clippy::derive_partial_eq_without_eq)]
465#[derive(Clone, PartialEq, ::prost::Message)]
466pub struct ViewSchemaResp {
467    #[prost(map = "string, enumeration(ColumnType)", tag = "1")]
468    pub schema: ::std::collections::HashMap<::prost::alloc::string::String, i32>,
469}
470/// `View::dimensions`
471#[derive(serde::Serialize)]
472#[allow(clippy::derive_partial_eq_without_eq)]
473#[derive(Clone, PartialEq, ::prost::Message)]
474pub struct ViewDimensionsReq {}
475#[derive(serde::Serialize)]
476#[derive(serde::Deserialize)]
477#[allow(clippy::derive_partial_eq_without_eq)]
478#[derive(Clone, PartialEq, ::prost::Message)]
479pub struct ViewDimensionsResp {
480    #[prost(uint32, tag = "1")]
481    pub num_table_rows: u32,
482    #[prost(uint32, tag = "2")]
483    pub num_table_columns: u32,
484    #[prost(uint32, tag = "3")]
485    pub num_view_rows: u32,
486    #[prost(uint32, tag = "4")]
487    pub num_view_columns: u32,
488}
489/// `View::get_config`
490#[derive(serde::Serialize)]
491#[allow(clippy::derive_partial_eq_without_eq)]
492#[derive(Clone, PartialEq, ::prost::Message)]
493pub struct ViewGetConfigReq {}
494#[derive(serde::Serialize)]
495#[allow(clippy::derive_partial_eq_without_eq)]
496#[derive(Clone, PartialEq, ::prost::Message)]
497pub struct ViewGetConfigResp {
498    #[prost(message, optional, tag = "1")]
499    pub config: ::core::option::Option<ViewConfig>,
500}
501/// `Client::table`.
502#[derive(serde::Serialize)]
503#[allow(clippy::derive_partial_eq_without_eq)]
504#[derive(Clone, PartialEq, ::prost::Message)]
505pub struct MakeTableReq {
506    #[prost(message, optional, tag = "1")]
507    pub data: ::core::option::Option<MakeTableData>,
508    #[prost(message, optional, tag = "2")]
509    pub options: ::core::option::Option<make_table_req::MakeTableOptions>,
510}
511/// Nested message and enum types in `MakeTableReq`.
512pub mod make_table_req {
513    #[derive(serde::Serialize)]
514    #[allow(clippy::derive_partial_eq_without_eq)]
515    #[derive(Clone, PartialEq, ::prost::Message)]
516    pub struct MakeTableOptions {
517        #[prost(oneof = "make_table_options::MakeTableType", tags = "1, 2")]
518        pub make_table_type: ::core::option::Option<make_table_options::MakeTableType>,
519    }
520    /// Nested message and enum types in `MakeTableOptions`.
521    pub mod make_table_options {
522        #[derive(serde::Serialize)]
523        #[allow(clippy::derive_partial_eq_without_eq)]
524        #[derive(Clone, PartialEq, ::prost::Oneof)]
525        pub enum MakeTableType {
526            #[prost(string, tag = "1")]
527            MakeIndexTable(::prost::alloc::string::String),
528            #[prost(uint32, tag = "2")]
529            MakeLimitTable(u32),
530        }
531    }
532}
533#[derive(serde::Serialize)]
534#[allow(clippy::derive_partial_eq_without_eq)]
535#[derive(Clone, PartialEq, ::prost::Message)]
536pub struct MakeTableResp {}
537/// `Table::delete`
538#[derive(serde::Serialize)]
539#[allow(clippy::derive_partial_eq_without_eq)]
540#[derive(Clone, PartialEq, ::prost::Message)]
541pub struct TableDeleteReq {
542    #[prost(bool, tag = "1")]
543    pub is_immediate: bool,
544}
545#[derive(serde::Serialize)]
546#[allow(clippy::derive_partial_eq_without_eq)]
547#[derive(Clone, PartialEq, ::prost::Message)]
548pub struct TableDeleteResp {}
549/// `Table::on_delete`
550#[derive(serde::Serialize)]
551#[allow(clippy::derive_partial_eq_without_eq)]
552#[derive(Clone, PartialEq, ::prost::Message)]
553pub struct TableOnDeleteReq {}
554#[derive(serde::Serialize)]
555#[allow(clippy::derive_partial_eq_without_eq)]
556#[derive(Clone, PartialEq, ::prost::Message)]
557pub struct TableOnDeleteResp {}
558/// `Table::make_port`
559#[derive(serde::Serialize)]
560#[allow(clippy::derive_partial_eq_without_eq)]
561#[derive(Clone, PartialEq, ::prost::Message)]
562pub struct TableMakePortReq {}
563#[derive(serde::Serialize)]
564#[allow(clippy::derive_partial_eq_without_eq)]
565#[derive(Clone, PartialEq, ::prost::Message)]
566pub struct TableMakePortResp {
567    #[prost(uint32, tag = "1")]
568    pub port_id: u32,
569}
570/// `Table::remove_delete`
571#[derive(serde::Serialize)]
572#[allow(clippy::derive_partial_eq_without_eq)]
573#[derive(Clone, PartialEq, ::prost::Message)]
574pub struct TableRemoveDeleteReq {
575    #[prost(uint32, tag = "1")]
576    pub id: u32,
577}
578#[derive(serde::Serialize)]
579#[allow(clippy::derive_partial_eq_without_eq)]
580#[derive(Clone, PartialEq, ::prost::Message)]
581pub struct TableRemoveDeleteResp {}
582/// `Table::update`
583#[derive(serde::Serialize)]
584#[allow(clippy::derive_partial_eq_without_eq)]
585#[derive(Clone, PartialEq, ::prost::Message)]
586pub struct TableUpdateReq {
587    #[prost(message, optional, tag = "1")]
588    pub data: ::core::option::Option<MakeTableData>,
589    #[prost(uint32, tag = "2")]
590    pub port_id: u32,
591}
592#[derive(serde::Serialize)]
593#[allow(clippy::derive_partial_eq_without_eq)]
594#[derive(Clone, PartialEq, ::prost::Message)]
595pub struct TableUpdateResp {}
596/// `Table::replace`
597#[derive(serde::Serialize)]
598#[allow(clippy::derive_partial_eq_without_eq)]
599#[derive(Clone, PartialEq, ::prost::Message)]
600pub struct TableReplaceReq {
601    #[prost(message, optional, tag = "1")]
602    pub data: ::core::option::Option<MakeTableData>,
603}
604#[derive(serde::Serialize)]
605#[allow(clippy::derive_partial_eq_without_eq)]
606#[derive(Clone, PartialEq, ::prost::Message)]
607pub struct TableReplaceResp {}
608/// `Table::remove`
609#[derive(serde::Serialize)]
610#[allow(clippy::derive_partial_eq_without_eq)]
611#[derive(Clone, PartialEq, ::prost::Message)]
612pub struct TableRemoveReq {
613    #[prost(message, optional, tag = "1")]
614    pub data: ::core::option::Option<MakeTableData>,
615}
616#[derive(serde::Serialize)]
617#[allow(clippy::derive_partial_eq_without_eq)]
618#[derive(Clone, PartialEq, ::prost::Message)]
619pub struct TableRemoveResp {}
620#[derive(serde::Serialize)]
621#[allow(clippy::derive_partial_eq_without_eq)]
622#[derive(Clone, PartialEq, ::prost::Message)]
623pub struct ViewOnUpdateReq {
624    #[prost(enumeration = "view_on_update_req::Mode", optional, tag = "1")]
625    pub mode: ::core::option::Option<i32>,
626}
627/// Nested message and enum types in `ViewOnUpdateReq`.
628pub mod view_on_update_req {
629    #[derive(serde::Serialize)]
630    #[derive(
631        Clone,
632        Copy,
633        Debug,
634        PartialEq,
635        Eq,
636        Hash,
637        PartialOrd,
638        Ord,
639        ::prost::Enumeration
640    )]
641    #[repr(i32)]
642    pub enum Mode {
643        Row = 0,
644    }
645    impl Mode {
646        /// String value of the enum field names used in the ProtoBuf definition.
647        ///
648        /// The values are not transformed in any way and thus are considered stable
649        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
650        pub fn as_str_name(&self) -> &'static str {
651            match self {
652                Mode::Row => "ROW",
653            }
654        }
655        /// Creates an enum from field names used in the ProtoBuf definition.
656        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
657            match value {
658                "ROW" => Some(Self::Row),
659                _ => None,
660            }
661        }
662    }
663}
664#[derive(ts_rs::TS)]
665#[derive(serde::Serialize)]
666#[allow(clippy::derive_partial_eq_without_eq)]
667#[derive(Clone, PartialEq, ::prost::Message)]
668pub struct ViewOnUpdateResp {
669    #[prost(bytes = "vec", optional, tag = "1")]
670    #[ts(as = "Vec::<u8>")]
671    #[serde(with = "serde_bytes")]
672    pub delta: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
673    #[prost(uint32, tag = "2")]
674    pub port_id: u32,
675}
676#[derive(serde::Serialize)]
677#[allow(clippy::derive_partial_eq_without_eq)]
678#[derive(Clone, PartialEq, ::prost::Message)]
679pub struct ViewOnDeleteReq {}
680#[derive(serde::Serialize)]
681#[allow(clippy::derive_partial_eq_without_eq)]
682#[derive(Clone, PartialEq, ::prost::Message)]
683pub struct ViewOnDeleteResp {}
684#[derive(serde::Serialize)]
685#[allow(clippy::derive_partial_eq_without_eq)]
686#[derive(Clone, PartialEq, ::prost::Message)]
687pub struct ViewRemoveDeleteReq {
688    #[prost(uint32, tag = "1")]
689    pub id: u32,
690}
691#[derive(serde::Serialize)]
692#[allow(clippy::derive_partial_eq_without_eq)]
693#[derive(Clone, PartialEq, ::prost::Message)]
694pub struct ViewRemoveDeleteResp {}
695#[derive(serde::Serialize)]
696#[allow(clippy::derive_partial_eq_without_eq)]
697#[derive(Clone, PartialEq, ::prost::Message)]
698pub struct ViewToColumnsStringReq {
699    #[prost(message, optional, tag = "1")]
700    pub viewport: ::core::option::Option<ViewPort>,
701    #[prost(bool, optional, tag = "2")]
702    pub id: ::core::option::Option<bool>,
703    #[prost(bool, optional, tag = "3")]
704    pub index: ::core::option::Option<bool>,
705    #[prost(bool, optional, tag = "4")]
706    pub formatted: ::core::option::Option<bool>,
707    #[prost(bool, optional, tag = "5")]
708    pub leaves_only: ::core::option::Option<bool>,
709}
710#[derive(serde::Serialize)]
711#[allow(clippy::derive_partial_eq_without_eq)]
712#[derive(Clone, PartialEq, ::prost::Message)]
713pub struct ViewToColumnsStringResp {
714    #[prost(string, tag = "1")]
715    pub json_string: ::prost::alloc::string::String,
716}
717#[derive(serde::Serialize)]
718#[allow(clippy::derive_partial_eq_without_eq)]
719#[derive(Clone, PartialEq, ::prost::Message)]
720pub struct ViewToRowsStringReq {
721    #[prost(message, optional, tag = "1")]
722    pub viewport: ::core::option::Option<ViewPort>,
723    #[prost(bool, optional, tag = "2")]
724    pub id: ::core::option::Option<bool>,
725    #[prost(bool, optional, tag = "3")]
726    pub index: ::core::option::Option<bool>,
727    #[prost(bool, optional, tag = "4")]
728    pub formatted: ::core::option::Option<bool>,
729    #[prost(bool, optional, tag = "5")]
730    pub leaves_only: ::core::option::Option<bool>,
731}
732#[derive(serde::Serialize)]
733#[allow(clippy::derive_partial_eq_without_eq)]
734#[derive(Clone, PartialEq, ::prost::Message)]
735pub struct ViewToRowsStringResp {
736    #[prost(string, tag = "1")]
737    pub json_string: ::prost::alloc::string::String,
738}
739#[derive(serde::Serialize)]
740#[allow(clippy::derive_partial_eq_without_eq)]
741#[derive(Clone, PartialEq, ::prost::Message)]
742pub struct ViewToNdjsonStringReq {
743    #[prost(message, optional, tag = "1")]
744    pub viewport: ::core::option::Option<ViewPort>,
745    #[prost(bool, optional, tag = "2")]
746    pub id: ::core::option::Option<bool>,
747    #[prost(bool, optional, tag = "3")]
748    pub index: ::core::option::Option<bool>,
749    #[prost(bool, optional, tag = "4")]
750    pub formatted: ::core::option::Option<bool>,
751    #[prost(bool, optional, tag = "5")]
752    pub leaves_only: ::core::option::Option<bool>,
753}
754#[derive(serde::Serialize)]
755#[allow(clippy::derive_partial_eq_without_eq)]
756#[derive(Clone, PartialEq, ::prost::Message)]
757pub struct ViewToNdjsonStringResp {
758    #[prost(string, tag = "1")]
759    pub ndjson_string: ::prost::alloc::string::String,
760}
761#[derive(serde::Serialize)]
762#[allow(clippy::derive_partial_eq_without_eq)]
763#[derive(Clone, PartialEq, ::prost::Message)]
764pub struct ViewToArrowReq {
765    #[prost(message, optional, tag = "1")]
766    pub viewport: ::core::option::Option<ViewPort>,
767    #[prost(string, optional, tag = "2")]
768    pub compression: ::core::option::Option<::prost::alloc::string::String>,
769}
770#[derive(serde::Serialize)]
771#[allow(clippy::derive_partial_eq_without_eq)]
772#[derive(Clone, PartialEq, ::prost::Message)]
773pub struct ViewToArrowResp {
774    #[prost(bytes = "vec", tag = "1")]
775    #[serde(skip)]
776    pub arrow: ::prost::alloc::vec::Vec<u8>,
777}
778#[derive(serde::Serialize)]
779#[allow(clippy::derive_partial_eq_without_eq)]
780#[derive(Clone, PartialEq, ::prost::Message)]
781pub struct ViewColumnPathsReq {}
782#[derive(serde::Serialize)]
783#[allow(clippy::derive_partial_eq_without_eq)]
784#[derive(Clone, PartialEq, ::prost::Message)]
785pub struct ViewColumnPathsResp {
786    /// repeated ColumnPath paths = 1;
787    #[prost(string, repeated, tag = "1")]
788    pub paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
789}
790#[derive(serde::Serialize)]
791#[allow(clippy::derive_partial_eq_without_eq)]
792#[derive(Clone, PartialEq, ::prost::Message)]
793pub struct ViewDeleteReq {}
794#[derive(serde::Serialize)]
795#[allow(clippy::derive_partial_eq_without_eq)]
796#[derive(Clone, PartialEq, ::prost::Message)]
797pub struct ViewDeleteResp {}
798#[derive(serde::Serialize)]
799#[allow(clippy::derive_partial_eq_without_eq)]
800#[derive(Clone, PartialEq, ::prost::Message)]
801pub struct ViewGetMinMaxReq {
802    #[prost(string, tag = "1")]
803    pub column_name: ::prost::alloc::string::String,
804}
805#[derive(serde::Serialize)]
806#[allow(clippy::derive_partial_eq_without_eq)]
807#[derive(Clone, PartialEq, ::prost::Message)]
808pub struct ViewGetMinMaxResp {
809    #[prost(string, tag = "1")]
810    pub min: ::prost::alloc::string::String,
811    #[prost(string, tag = "2")]
812    pub max: ::prost::alloc::string::String,
813}
814#[derive(serde::Serialize)]
815#[allow(clippy::derive_partial_eq_without_eq)]
816#[derive(Clone, PartialEq, ::prost::Message)]
817pub struct ViewExpressionSchemaReq {}
818#[derive(serde::Serialize)]
819#[allow(clippy::derive_partial_eq_without_eq)]
820#[derive(Clone, PartialEq, ::prost::Message)]
821pub struct ViewExpressionSchemaResp {
822    #[prost(map = "string, enumeration(ColumnType)", tag = "1")]
823    pub schema: ::std::collections::HashMap<::prost::alloc::string::String, i32>,
824}
825#[derive(serde::Serialize)]
826#[allow(clippy::derive_partial_eq_without_eq)]
827#[derive(Clone, PartialEq, ::prost::Message)]
828pub struct ViewToCsvReq {
829    #[prost(message, optional, tag = "1")]
830    pub viewport: ::core::option::Option<ViewPort>,
831}
832#[derive(serde::Serialize)]
833#[allow(clippy::derive_partial_eq_without_eq)]
834#[derive(Clone, PartialEq, ::prost::Message)]
835pub struct ViewToCsvResp {
836    #[prost(string, tag = "1")]
837    pub csv: ::prost::alloc::string::String,
838}
839#[derive(serde::Serialize)]
840#[allow(clippy::derive_partial_eq_without_eq)]
841#[derive(Clone, PartialEq, ::prost::Message)]
842pub struct ViewRemoveOnUpdateReq {
843    #[prost(uint32, tag = "1")]
844    pub id: u32,
845}
846#[derive(serde::Serialize)]
847#[allow(clippy::derive_partial_eq_without_eq)]
848#[derive(Clone, PartialEq, ::prost::Message)]
849pub struct ViewRemoveOnUpdateResp {}
850#[derive(serde::Serialize)]
851#[allow(clippy::derive_partial_eq_without_eq)]
852#[derive(Clone, PartialEq, ::prost::Message)]
853pub struct ViewCollapseReq {
854    #[prost(uint32, tag = "1")]
855    pub row_index: u32,
856}
857#[derive(serde::Serialize)]
858#[allow(clippy::derive_partial_eq_without_eq)]
859#[derive(Clone, PartialEq, ::prost::Message)]
860pub struct ViewCollapseResp {
861    #[prost(uint32, tag = "1")]
862    pub num_changed: u32,
863}
864#[derive(serde::Serialize)]
865#[allow(clippy::derive_partial_eq_without_eq)]
866#[derive(Clone, PartialEq, ::prost::Message)]
867pub struct ViewExpandReq {
868    #[prost(uint32, tag = "1")]
869    pub row_index: u32,
870}
871#[derive(serde::Serialize)]
872#[allow(clippy::derive_partial_eq_without_eq)]
873#[derive(Clone, PartialEq, ::prost::Message)]
874pub struct ViewExpandResp {
875    #[prost(uint32, tag = "1")]
876    pub num_changed: u32,
877}
878/// `View::set_depth`
879#[derive(serde::Serialize)]
880#[allow(clippy::derive_partial_eq_without_eq)]
881#[derive(Clone, PartialEq, ::prost::Message)]
882pub struct ViewSetDepthReq {
883    #[prost(uint32, tag = "1")]
884    pub depth: u32,
885}
886#[derive(serde::Serialize)]
887#[allow(clippy::derive_partial_eq_without_eq)]
888#[derive(Clone, PartialEq, ::prost::Message)]
889pub struct ViewSetDepthResp {}
890#[derive(serde::Serialize)]
891#[allow(clippy::derive_partial_eq_without_eq)]
892#[derive(Clone, PartialEq, ::prost::Message)]
893pub struct ServerSystemInfoReq {}
894#[derive(serde::Serialize)]
895#[allow(clippy::derive_partial_eq_without_eq)]
896#[derive(Clone, PartialEq, ::prost::Message)]
897pub struct ServerSystemInfoResp {
898    #[prost(double, tag = "1")]
899    pub heap_size: f64,
900}
901#[derive(serde::Serialize)]
902#[allow(clippy::derive_partial_eq_without_eq)]
903#[derive(Clone, PartialEq, ::prost::Message)]
904pub struct ViewConfig {
905    #[prost(string, repeated, tag = "1")]
906    pub group_by: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
907    #[prost(string, repeated, tag = "2")]
908    pub split_by: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
909    #[prost(message, optional, tag = "3")]
910    pub columns: ::core::option::Option<ColumnsUpdate>,
911    #[prost(message, repeated, tag = "4")]
912    pub filter: ::prost::alloc::vec::Vec<view_config::Filter>,
913    #[prost(message, repeated, tag = "5")]
914    pub sort: ::prost::alloc::vec::Vec<view_config::Sort>,
915    #[prost(map = "string, string", tag = "6")]
916    pub expressions: ::std::collections::HashMap<
917        ::prost::alloc::string::String,
918        ::prost::alloc::string::String,
919    >,
920    #[prost(map = "string, message", tag = "7")]
921    pub aggregates: ::std::collections::HashMap<
922        ::prost::alloc::string::String,
923        view_config::AggList,
924    >,
925    #[prost(enumeration = "view_config::FilterReducer", tag = "8")]
926    pub filter_op: i32,
927    #[prost(uint32, optional, tag = "9")]
928    pub group_by_depth: ::core::option::Option<u32>,
929}
930/// Nested message and enum types in `ViewConfig`.
931pub mod view_config {
932    #[derive(serde::Serialize)]
933    #[allow(clippy::derive_partial_eq_without_eq)]
934    #[derive(Clone, PartialEq, ::prost::Message)]
935    pub struct AggList {
936        #[prost(string, repeated, tag = "1")]
937        pub aggregations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
938    }
939    #[derive(serde::Serialize)]
940    #[allow(clippy::derive_partial_eq_without_eq)]
941    #[derive(Clone, PartialEq, ::prost::Message)]
942    pub struct Sort {
943        #[prost(string, tag = "1")]
944        pub column: ::prost::alloc::string::String,
945        #[prost(enumeration = "super::SortOp", tag = "2")]
946        pub op: i32,
947    }
948    #[derive(serde::Serialize)]
949    #[allow(clippy::derive_partial_eq_without_eq)]
950    #[derive(Clone, PartialEq, ::prost::Message)]
951    pub struct Filter {
952        #[prost(string, tag = "1")]
953        pub column: ::prost::alloc::string::String,
954        #[prost(string, tag = "2")]
955        pub op: ::prost::alloc::string::String,
956        #[prost(message, repeated, tag = "3")]
957        pub value: ::prost::alloc::vec::Vec<super::Scalar>,
958    }
959    #[derive(serde::Serialize)]
960    #[derive(
961        Clone,
962        Copy,
963        Debug,
964        PartialEq,
965        Eq,
966        Hash,
967        PartialOrd,
968        Ord,
969        ::prost::Enumeration
970    )]
971    #[repr(i32)]
972    pub enum FilterReducer {
973        And = 0,
974        Or = 1,
975    }
976    impl FilterReducer {
977        /// String value of the enum field names used in the ProtoBuf definition.
978        ///
979        /// The values are not transformed in any way and thus are considered stable
980        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
981        pub fn as_str_name(&self) -> &'static str {
982            match self {
983                FilterReducer::And => "AND",
984                FilterReducer::Or => "OR",
985            }
986        }
987        /// Creates an enum from field names used in the ProtoBuf definition.
988        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
989            match value {
990                "AND" => Some(Self::And),
991                "OR" => Some(Self::Or),
992                _ => None,
993            }
994        }
995    }
996}
997#[derive(serde::Serialize)]
998#[allow(clippy::derive_partial_eq_without_eq)]
999#[derive(Clone, PartialEq, ::prost::Message)]
1000pub struct ColumnsUpdate {
1001    #[prost(oneof = "columns_update::OptColumns", tags = "1, 2")]
1002    pub opt_columns: ::core::option::Option<columns_update::OptColumns>,
1003}
1004/// Nested message and enum types in `ColumnsUpdate`.
1005pub mod columns_update {
1006    #[derive(serde::Serialize)]
1007    #[allow(clippy::derive_partial_eq_without_eq)]
1008    #[derive(Clone, PartialEq, ::prost::Message)]
1009    pub struct Columns {
1010        #[prost(string, repeated, tag = "1")]
1011        pub columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1012    }
1013    #[derive(serde::Serialize)]
1014    #[allow(clippy::derive_partial_eq_without_eq)]
1015    #[derive(Clone, PartialEq, ::prost::Oneof)]
1016    pub enum OptColumns {
1017        #[prost(enumeration = "::prost_types::NullValue", tag = "1")]
1018        DefaultColumns(i32),
1019        #[prost(message, tag = "2")]
1020        Columns(Columns),
1021    }
1022}
1023#[derive(serde::Serialize)]
1024#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1025#[repr(i32)]
1026pub enum StatusCode {
1027    ServerError = 0,
1028    ViewNotFound = 1,
1029    TransportError = 2,
1030}
1031impl StatusCode {
1032    /// String value of the enum field names used in the ProtoBuf definition.
1033    ///
1034    /// The values are not transformed in any way and thus are considered stable
1035    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1036    pub fn as_str_name(&self) -> &'static str {
1037        match self {
1038            StatusCode::ServerError => "SERVER_ERROR",
1039            StatusCode::ViewNotFound => "VIEW_NOT_FOUND",
1040            StatusCode::TransportError => "TRANSPORT_ERROR",
1041        }
1042    }
1043    /// Creates an enum from field names used in the ProtoBuf definition.
1044    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1045        match value {
1046            "SERVER_ERROR" => Some(Self::ServerError),
1047            "VIEW_NOT_FOUND" => Some(Self::ViewNotFound),
1048            "TRANSPORT_ERROR" => Some(Self::TransportError),
1049            _ => None,
1050        }
1051    }
1052}
1053/// View types
1054#[derive(serde::Serialize)]
1055#[derive(serde::Deserialize)]
1056#[serde(rename_all = "snake_case")]
1057#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1058#[repr(i32)]
1059pub enum ColumnType {
1060    String = 0,
1061    Date = 1,
1062    Datetime = 2,
1063    Integer = 3,
1064    Float = 4,
1065    Boolean = 5,
1066}
1067impl ColumnType {
1068    /// String value of the enum field names used in the ProtoBuf definition.
1069    ///
1070    /// The values are not transformed in any way and thus are considered stable
1071    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1072    pub fn as_str_name(&self) -> &'static str {
1073        match self {
1074            ColumnType::String => "STRING",
1075            ColumnType::Date => "DATE",
1076            ColumnType::Datetime => "DATETIME",
1077            ColumnType::Integer => "INTEGER",
1078            ColumnType::Float => "FLOAT",
1079            ColumnType::Boolean => "BOOLEAN",
1080        }
1081    }
1082    /// Creates an enum from field names used in the ProtoBuf definition.
1083    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1084        match value {
1085            "STRING" => Some(Self::String),
1086            "DATE" => Some(Self::Date),
1087            "DATETIME" => Some(Self::Datetime),
1088            "INTEGER" => Some(Self::Integer),
1089            "FLOAT" => Some(Self::Float),
1090            "BOOLEAN" => Some(Self::Boolean),
1091            _ => None,
1092        }
1093    }
1094}
1095/// TODO This belongs in features
1096#[derive(serde::Serialize)]
1097#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1098#[repr(i32)]
1099pub enum SortOp {
1100    SortNone = 0,
1101    SortAsc = 1,
1102    SortDesc = 2,
1103    SortColAsc = 3,
1104    SortColDesc = 4,
1105    SortAscAbs = 5,
1106    SortDescAbs = 6,
1107    SortColAscAbs = 7,
1108    SortColDescAbs = 8,
1109}
1110impl SortOp {
1111    /// String value of the enum field names used in the ProtoBuf definition.
1112    ///
1113    /// The values are not transformed in any way and thus are considered stable
1114    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1115    pub fn as_str_name(&self) -> &'static str {
1116        match self {
1117            SortOp::SortNone => "SORT_NONE",
1118            SortOp::SortAsc => "SORT_ASC",
1119            SortOp::SortDesc => "SORT_DESC",
1120            SortOp::SortColAsc => "SORT_COL_ASC",
1121            SortOp::SortColDesc => "SORT_COL_DESC",
1122            SortOp::SortAscAbs => "SORT_ASC_ABS",
1123            SortOp::SortDescAbs => "SORT_DESC_ABS",
1124            SortOp::SortColAscAbs => "SORT_COL_ASC_ABS",
1125            SortOp::SortColDescAbs => "SORT_COL_DESC_ABS",
1126        }
1127    }
1128    /// Creates an enum from field names used in the ProtoBuf definition.
1129    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1130        match value {
1131            "SORT_NONE" => Some(Self::SortNone),
1132            "SORT_ASC" => Some(Self::SortAsc),
1133            "SORT_DESC" => Some(Self::SortDesc),
1134            "SORT_COL_ASC" => Some(Self::SortColAsc),
1135            "SORT_COL_DESC" => Some(Self::SortColDesc),
1136            "SORT_ASC_ABS" => Some(Self::SortAscAbs),
1137            "SORT_DESC_ABS" => Some(Self::SortDescAbs),
1138            "SORT_COL_ASC_ABS" => Some(Self::SortColAscAbs),
1139            "SORT_COL_DESC_ABS" => Some(Self::SortColDescAbs),
1140            _ => None,
1141        }
1142    }
1143}