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#[derive(serde::Serialize)]
543#[allow(clippy::derive_partial_eq_without_eq)]
544#[derive(Clone, PartialEq, ::prost::Message)]
545pub struct TableDeleteResp {}
546/// `Table::on_delete`
547#[derive(serde::Serialize)]
548#[allow(clippy::derive_partial_eq_without_eq)]
549#[derive(Clone, PartialEq, ::prost::Message)]
550pub struct TableOnDeleteReq {}
551#[derive(serde::Serialize)]
552#[allow(clippy::derive_partial_eq_without_eq)]
553#[derive(Clone, PartialEq, ::prost::Message)]
554pub struct TableOnDeleteResp {}
555/// `Table::make_port`
556#[derive(serde::Serialize)]
557#[allow(clippy::derive_partial_eq_without_eq)]
558#[derive(Clone, PartialEq, ::prost::Message)]
559pub struct TableMakePortReq {}
560#[derive(serde::Serialize)]
561#[allow(clippy::derive_partial_eq_without_eq)]
562#[derive(Clone, PartialEq, ::prost::Message)]
563pub struct TableMakePortResp {
564    #[prost(uint32, tag = "1")]
565    pub port_id: u32,
566}
567/// `Table::remove_delete`
568#[derive(serde::Serialize)]
569#[allow(clippy::derive_partial_eq_without_eq)]
570#[derive(Clone, PartialEq, ::prost::Message)]
571pub struct TableRemoveDeleteReq {
572    #[prost(uint32, tag = "1")]
573    pub id: u32,
574}
575#[derive(serde::Serialize)]
576#[allow(clippy::derive_partial_eq_without_eq)]
577#[derive(Clone, PartialEq, ::prost::Message)]
578pub struct TableRemoveDeleteResp {}
579/// `Table::update`
580#[derive(serde::Serialize)]
581#[allow(clippy::derive_partial_eq_without_eq)]
582#[derive(Clone, PartialEq, ::prost::Message)]
583pub struct TableUpdateReq {
584    #[prost(message, optional, tag = "1")]
585    pub data: ::core::option::Option<MakeTableData>,
586    #[prost(uint32, tag = "2")]
587    pub port_id: u32,
588}
589#[derive(serde::Serialize)]
590#[allow(clippy::derive_partial_eq_without_eq)]
591#[derive(Clone, PartialEq, ::prost::Message)]
592pub struct TableUpdateResp {}
593/// `Table::replace`
594#[derive(serde::Serialize)]
595#[allow(clippy::derive_partial_eq_without_eq)]
596#[derive(Clone, PartialEq, ::prost::Message)]
597pub struct TableReplaceReq {
598    #[prost(message, optional, tag = "1")]
599    pub data: ::core::option::Option<MakeTableData>,
600}
601#[derive(serde::Serialize)]
602#[allow(clippy::derive_partial_eq_without_eq)]
603#[derive(Clone, PartialEq, ::prost::Message)]
604pub struct TableReplaceResp {}
605/// `Table::remove`
606#[derive(serde::Serialize)]
607#[allow(clippy::derive_partial_eq_without_eq)]
608#[derive(Clone, PartialEq, ::prost::Message)]
609pub struct TableRemoveReq {
610    #[prost(message, optional, tag = "1")]
611    pub data: ::core::option::Option<MakeTableData>,
612}
613#[derive(serde::Serialize)]
614#[allow(clippy::derive_partial_eq_without_eq)]
615#[derive(Clone, PartialEq, ::prost::Message)]
616pub struct TableRemoveResp {}
617#[derive(serde::Serialize)]
618#[allow(clippy::derive_partial_eq_without_eq)]
619#[derive(Clone, PartialEq, ::prost::Message)]
620pub struct ViewOnUpdateReq {
621    #[prost(enumeration = "view_on_update_req::Mode", optional, tag = "1")]
622    pub mode: ::core::option::Option<i32>,
623}
624/// Nested message and enum types in `ViewOnUpdateReq`.
625pub mod view_on_update_req {
626    #[derive(serde::Serialize)]
627    #[derive(
628        Clone,
629        Copy,
630        Debug,
631        PartialEq,
632        Eq,
633        Hash,
634        PartialOrd,
635        Ord,
636        ::prost::Enumeration
637    )]
638    #[repr(i32)]
639    pub enum Mode {
640        Row = 0,
641    }
642    impl Mode {
643        /// String value of the enum field names used in the ProtoBuf definition.
644        ///
645        /// The values are not transformed in any way and thus are considered stable
646        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
647        pub fn as_str_name(&self) -> &'static str {
648            match self {
649                Mode::Row => "ROW",
650            }
651        }
652        /// Creates an enum from field names used in the ProtoBuf definition.
653        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
654            match value {
655                "ROW" => Some(Self::Row),
656                _ => None,
657            }
658        }
659    }
660}
661#[derive(ts_rs::TS)]
662#[derive(serde::Serialize)]
663#[allow(clippy::derive_partial_eq_without_eq)]
664#[derive(Clone, PartialEq, ::prost::Message)]
665pub struct ViewOnUpdateResp {
666    #[prost(bytes = "vec", optional, tag = "1")]
667    #[ts(as = "Vec::<u8>")]
668    #[serde(with = "serde_bytes")]
669    pub delta: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
670    #[prost(uint32, tag = "2")]
671    pub port_id: u32,
672}
673#[derive(serde::Serialize)]
674#[allow(clippy::derive_partial_eq_without_eq)]
675#[derive(Clone, PartialEq, ::prost::Message)]
676pub struct ViewOnDeleteReq {}
677#[derive(serde::Serialize)]
678#[allow(clippy::derive_partial_eq_without_eq)]
679#[derive(Clone, PartialEq, ::prost::Message)]
680pub struct ViewOnDeleteResp {}
681#[derive(serde::Serialize)]
682#[allow(clippy::derive_partial_eq_without_eq)]
683#[derive(Clone, PartialEq, ::prost::Message)]
684pub struct ViewRemoveDeleteReq {
685    #[prost(uint32, tag = "1")]
686    pub id: u32,
687}
688#[derive(serde::Serialize)]
689#[allow(clippy::derive_partial_eq_without_eq)]
690#[derive(Clone, PartialEq, ::prost::Message)]
691pub struct ViewRemoveDeleteResp {}
692#[derive(serde::Serialize)]
693#[allow(clippy::derive_partial_eq_without_eq)]
694#[derive(Clone, PartialEq, ::prost::Message)]
695pub struct ViewToColumnsStringReq {
696    #[prost(message, optional, tag = "1")]
697    pub viewport: ::core::option::Option<ViewPort>,
698    #[prost(bool, optional, tag = "2")]
699    pub id: ::core::option::Option<bool>,
700    #[prost(bool, optional, tag = "3")]
701    pub index: ::core::option::Option<bool>,
702    #[prost(bool, optional, tag = "4")]
703    pub formatted: ::core::option::Option<bool>,
704    #[prost(bool, optional, tag = "5")]
705    pub leaves_only: ::core::option::Option<bool>,
706}
707#[derive(serde::Serialize)]
708#[allow(clippy::derive_partial_eq_without_eq)]
709#[derive(Clone, PartialEq, ::prost::Message)]
710pub struct ViewToColumnsStringResp {
711    #[prost(string, tag = "1")]
712    pub json_string: ::prost::alloc::string::String,
713}
714#[derive(serde::Serialize)]
715#[allow(clippy::derive_partial_eq_without_eq)]
716#[derive(Clone, PartialEq, ::prost::Message)]
717pub struct ViewToRowsStringReq {
718    #[prost(message, optional, tag = "1")]
719    pub viewport: ::core::option::Option<ViewPort>,
720    #[prost(bool, optional, tag = "2")]
721    pub id: ::core::option::Option<bool>,
722    #[prost(bool, optional, tag = "3")]
723    pub index: ::core::option::Option<bool>,
724    #[prost(bool, optional, tag = "4")]
725    pub formatted: ::core::option::Option<bool>,
726    #[prost(bool, optional, tag = "5")]
727    pub leaves_only: ::core::option::Option<bool>,
728}
729#[derive(serde::Serialize)]
730#[allow(clippy::derive_partial_eq_without_eq)]
731#[derive(Clone, PartialEq, ::prost::Message)]
732pub struct ViewToRowsStringResp {
733    #[prost(string, tag = "1")]
734    pub json_string: ::prost::alloc::string::String,
735}
736#[derive(serde::Serialize)]
737#[allow(clippy::derive_partial_eq_without_eq)]
738#[derive(Clone, PartialEq, ::prost::Message)]
739pub struct ViewToNdjsonStringReq {
740    #[prost(message, optional, tag = "1")]
741    pub viewport: ::core::option::Option<ViewPort>,
742    #[prost(bool, optional, tag = "2")]
743    pub id: ::core::option::Option<bool>,
744    #[prost(bool, optional, tag = "3")]
745    pub index: ::core::option::Option<bool>,
746    #[prost(bool, optional, tag = "4")]
747    pub formatted: ::core::option::Option<bool>,
748    #[prost(bool, optional, tag = "5")]
749    pub leaves_only: ::core::option::Option<bool>,
750}
751#[derive(serde::Serialize)]
752#[allow(clippy::derive_partial_eq_without_eq)]
753#[derive(Clone, PartialEq, ::prost::Message)]
754pub struct ViewToNdjsonStringResp {
755    #[prost(string, tag = "1")]
756    pub ndjson_string: ::prost::alloc::string::String,
757}
758#[derive(serde::Serialize)]
759#[allow(clippy::derive_partial_eq_without_eq)]
760#[derive(Clone, PartialEq, ::prost::Message)]
761pub struct ViewToArrowReq {
762    #[prost(message, optional, tag = "1")]
763    pub viewport: ::core::option::Option<ViewPort>,
764    #[prost(string, optional, tag = "2")]
765    pub compression: ::core::option::Option<::prost::alloc::string::String>,
766}
767#[derive(serde::Serialize)]
768#[allow(clippy::derive_partial_eq_without_eq)]
769#[derive(Clone, PartialEq, ::prost::Message)]
770pub struct ViewToArrowResp {
771    #[prost(bytes = "vec", tag = "1")]
772    #[serde(skip)]
773    pub arrow: ::prost::alloc::vec::Vec<u8>,
774}
775#[derive(serde::Serialize)]
776#[allow(clippy::derive_partial_eq_without_eq)]
777#[derive(Clone, PartialEq, ::prost::Message)]
778pub struct ViewColumnPathsReq {}
779#[derive(serde::Serialize)]
780#[allow(clippy::derive_partial_eq_without_eq)]
781#[derive(Clone, PartialEq, ::prost::Message)]
782pub struct ViewColumnPathsResp {
783    /// repeated ColumnPath paths = 1;
784    #[prost(string, repeated, tag = "1")]
785    pub paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
786}
787#[derive(serde::Serialize)]
788#[allow(clippy::derive_partial_eq_without_eq)]
789#[derive(Clone, PartialEq, ::prost::Message)]
790pub struct ViewDeleteReq {}
791#[derive(serde::Serialize)]
792#[allow(clippy::derive_partial_eq_without_eq)]
793#[derive(Clone, PartialEq, ::prost::Message)]
794pub struct ViewDeleteResp {}
795#[derive(serde::Serialize)]
796#[allow(clippy::derive_partial_eq_without_eq)]
797#[derive(Clone, PartialEq, ::prost::Message)]
798pub struct ViewGetMinMaxReq {
799    #[prost(string, tag = "1")]
800    pub column_name: ::prost::alloc::string::String,
801}
802#[derive(serde::Serialize)]
803#[allow(clippy::derive_partial_eq_without_eq)]
804#[derive(Clone, PartialEq, ::prost::Message)]
805pub struct ViewGetMinMaxResp {
806    #[prost(string, tag = "1")]
807    pub min: ::prost::alloc::string::String,
808    #[prost(string, tag = "2")]
809    pub max: ::prost::alloc::string::String,
810}
811#[derive(serde::Serialize)]
812#[allow(clippy::derive_partial_eq_without_eq)]
813#[derive(Clone, PartialEq, ::prost::Message)]
814pub struct ViewExpressionSchemaReq {}
815#[derive(serde::Serialize)]
816#[allow(clippy::derive_partial_eq_without_eq)]
817#[derive(Clone, PartialEq, ::prost::Message)]
818pub struct ViewExpressionSchemaResp {
819    #[prost(map = "string, enumeration(ColumnType)", tag = "1")]
820    pub schema: ::std::collections::HashMap<::prost::alloc::string::String, i32>,
821}
822#[derive(serde::Serialize)]
823#[allow(clippy::derive_partial_eq_without_eq)]
824#[derive(Clone, PartialEq, ::prost::Message)]
825pub struct ViewToCsvReq {
826    #[prost(message, optional, tag = "1")]
827    pub viewport: ::core::option::Option<ViewPort>,
828}
829#[derive(serde::Serialize)]
830#[allow(clippy::derive_partial_eq_without_eq)]
831#[derive(Clone, PartialEq, ::prost::Message)]
832pub struct ViewToCsvResp {
833    #[prost(string, tag = "1")]
834    pub csv: ::prost::alloc::string::String,
835}
836#[derive(serde::Serialize)]
837#[allow(clippy::derive_partial_eq_without_eq)]
838#[derive(Clone, PartialEq, ::prost::Message)]
839pub struct ViewRemoveOnUpdateReq {
840    #[prost(uint32, tag = "1")]
841    pub id: u32,
842}
843#[derive(serde::Serialize)]
844#[allow(clippy::derive_partial_eq_without_eq)]
845#[derive(Clone, PartialEq, ::prost::Message)]
846pub struct ViewRemoveOnUpdateResp {}
847#[derive(serde::Serialize)]
848#[allow(clippy::derive_partial_eq_without_eq)]
849#[derive(Clone, PartialEq, ::prost::Message)]
850pub struct ViewCollapseReq {
851    #[prost(uint32, tag = "1")]
852    pub row_index: u32,
853}
854#[derive(serde::Serialize)]
855#[allow(clippy::derive_partial_eq_without_eq)]
856#[derive(Clone, PartialEq, ::prost::Message)]
857pub struct ViewCollapseResp {
858    #[prost(uint32, tag = "1")]
859    pub num_changed: u32,
860}
861#[derive(serde::Serialize)]
862#[allow(clippy::derive_partial_eq_without_eq)]
863#[derive(Clone, PartialEq, ::prost::Message)]
864pub struct ViewExpandReq {
865    #[prost(uint32, tag = "1")]
866    pub row_index: u32,
867}
868#[derive(serde::Serialize)]
869#[allow(clippy::derive_partial_eq_without_eq)]
870#[derive(Clone, PartialEq, ::prost::Message)]
871pub struct ViewExpandResp {
872    #[prost(uint32, tag = "1")]
873    pub num_changed: u32,
874}
875/// `View::set_depth`
876#[derive(serde::Serialize)]
877#[allow(clippy::derive_partial_eq_without_eq)]
878#[derive(Clone, PartialEq, ::prost::Message)]
879pub struct ViewSetDepthReq {
880    #[prost(uint32, tag = "1")]
881    pub depth: u32,
882}
883#[derive(serde::Serialize)]
884#[allow(clippy::derive_partial_eq_without_eq)]
885#[derive(Clone, PartialEq, ::prost::Message)]
886pub struct ViewSetDepthResp {}
887#[derive(serde::Serialize)]
888#[allow(clippy::derive_partial_eq_without_eq)]
889#[derive(Clone, PartialEq, ::prost::Message)]
890pub struct ServerSystemInfoReq {}
891#[derive(serde::Serialize)]
892#[allow(clippy::derive_partial_eq_without_eq)]
893#[derive(Clone, PartialEq, ::prost::Message)]
894pub struct ServerSystemInfoResp {
895    #[prost(double, tag = "1")]
896    pub heap_size: f64,
897}
898#[derive(serde::Serialize)]
899#[allow(clippy::derive_partial_eq_without_eq)]
900#[derive(Clone, PartialEq, ::prost::Message)]
901pub struct ViewConfig {
902    #[prost(string, repeated, tag = "1")]
903    pub group_by: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
904    #[prost(string, repeated, tag = "2")]
905    pub split_by: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
906    #[prost(message, optional, tag = "3")]
907    pub columns: ::core::option::Option<ColumnsUpdate>,
908    #[prost(message, repeated, tag = "4")]
909    pub filter: ::prost::alloc::vec::Vec<view_config::Filter>,
910    #[prost(message, repeated, tag = "5")]
911    pub sort: ::prost::alloc::vec::Vec<view_config::Sort>,
912    #[prost(map = "string, string", tag = "6")]
913    pub expressions: ::std::collections::HashMap<
914        ::prost::alloc::string::String,
915        ::prost::alloc::string::String,
916    >,
917    #[prost(map = "string, message", tag = "7")]
918    pub aggregates: ::std::collections::HashMap<
919        ::prost::alloc::string::String,
920        view_config::AggList,
921    >,
922    #[prost(enumeration = "view_config::FilterReducer", tag = "8")]
923    pub filter_op: i32,
924    #[prost(uint32, optional, tag = "9")]
925    pub group_by_depth: ::core::option::Option<u32>,
926}
927/// Nested message and enum types in `ViewConfig`.
928pub mod view_config {
929    #[derive(serde::Serialize)]
930    #[allow(clippy::derive_partial_eq_without_eq)]
931    #[derive(Clone, PartialEq, ::prost::Message)]
932    pub struct AggList {
933        #[prost(string, repeated, tag = "1")]
934        pub aggregations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
935    }
936    #[derive(serde::Serialize)]
937    #[allow(clippy::derive_partial_eq_without_eq)]
938    #[derive(Clone, PartialEq, ::prost::Message)]
939    pub struct Sort {
940        #[prost(string, tag = "1")]
941        pub column: ::prost::alloc::string::String,
942        #[prost(enumeration = "super::SortOp", tag = "2")]
943        pub op: i32,
944    }
945    #[derive(serde::Serialize)]
946    #[allow(clippy::derive_partial_eq_without_eq)]
947    #[derive(Clone, PartialEq, ::prost::Message)]
948    pub struct Filter {
949        #[prost(string, tag = "1")]
950        pub column: ::prost::alloc::string::String,
951        #[prost(string, tag = "2")]
952        pub op: ::prost::alloc::string::String,
953        #[prost(message, repeated, tag = "3")]
954        pub value: ::prost::alloc::vec::Vec<super::Scalar>,
955    }
956    #[derive(serde::Serialize)]
957    #[derive(
958        Clone,
959        Copy,
960        Debug,
961        PartialEq,
962        Eq,
963        Hash,
964        PartialOrd,
965        Ord,
966        ::prost::Enumeration
967    )]
968    #[repr(i32)]
969    pub enum FilterReducer {
970        And = 0,
971        Or = 1,
972    }
973    impl FilterReducer {
974        /// String value of the enum field names used in the ProtoBuf definition.
975        ///
976        /// The values are not transformed in any way and thus are considered stable
977        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
978        pub fn as_str_name(&self) -> &'static str {
979            match self {
980                FilterReducer::And => "AND",
981                FilterReducer::Or => "OR",
982            }
983        }
984        /// Creates an enum from field names used in the ProtoBuf definition.
985        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
986            match value {
987                "AND" => Some(Self::And),
988                "OR" => Some(Self::Or),
989                _ => None,
990            }
991        }
992    }
993}
994#[derive(serde::Serialize)]
995#[allow(clippy::derive_partial_eq_without_eq)]
996#[derive(Clone, PartialEq, ::prost::Message)]
997pub struct ColumnsUpdate {
998    #[prost(oneof = "columns_update::OptColumns", tags = "1, 2")]
999    pub opt_columns: ::core::option::Option<columns_update::OptColumns>,
1000}
1001/// Nested message and enum types in `ColumnsUpdate`.
1002pub mod columns_update {
1003    #[derive(serde::Serialize)]
1004    #[allow(clippy::derive_partial_eq_without_eq)]
1005    #[derive(Clone, PartialEq, ::prost::Message)]
1006    pub struct Columns {
1007        #[prost(string, repeated, tag = "1")]
1008        pub columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1009    }
1010    #[derive(serde::Serialize)]
1011    #[allow(clippy::derive_partial_eq_without_eq)]
1012    #[derive(Clone, PartialEq, ::prost::Oneof)]
1013    pub enum OptColumns {
1014        #[prost(enumeration = "::prost_types::NullValue", tag = "1")]
1015        DefaultColumns(i32),
1016        #[prost(message, tag = "2")]
1017        Columns(Columns),
1018    }
1019}
1020#[derive(serde::Serialize)]
1021#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1022#[repr(i32)]
1023pub enum StatusCode {
1024    ServerError = 0,
1025    ViewNotFound = 1,
1026}
1027impl StatusCode {
1028    /// String value of the enum field names used in the ProtoBuf definition.
1029    ///
1030    /// The values are not transformed in any way and thus are considered stable
1031    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1032    pub fn as_str_name(&self) -> &'static str {
1033        match self {
1034            StatusCode::ServerError => "SERVER_ERROR",
1035            StatusCode::ViewNotFound => "VIEW_NOT_FOUND",
1036        }
1037    }
1038    /// Creates an enum from field names used in the ProtoBuf definition.
1039    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1040        match value {
1041            "SERVER_ERROR" => Some(Self::ServerError),
1042            "VIEW_NOT_FOUND" => Some(Self::ViewNotFound),
1043            _ => None,
1044        }
1045    }
1046}
1047/// View types
1048#[derive(serde::Serialize)]
1049#[derive(serde::Deserialize)]
1050#[serde(rename_all = "snake_case")]
1051#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1052#[repr(i32)]
1053pub enum ColumnType {
1054    String = 0,
1055    Date = 1,
1056    Datetime = 2,
1057    Integer = 3,
1058    Float = 4,
1059    Boolean = 5,
1060}
1061impl ColumnType {
1062    /// String value of the enum field names used in the ProtoBuf definition.
1063    ///
1064    /// The values are not transformed in any way and thus are considered stable
1065    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1066    pub fn as_str_name(&self) -> &'static str {
1067        match self {
1068            ColumnType::String => "STRING",
1069            ColumnType::Date => "DATE",
1070            ColumnType::Datetime => "DATETIME",
1071            ColumnType::Integer => "INTEGER",
1072            ColumnType::Float => "FLOAT",
1073            ColumnType::Boolean => "BOOLEAN",
1074        }
1075    }
1076    /// Creates an enum from field names used in the ProtoBuf definition.
1077    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1078        match value {
1079            "STRING" => Some(Self::String),
1080            "DATE" => Some(Self::Date),
1081            "DATETIME" => Some(Self::Datetime),
1082            "INTEGER" => Some(Self::Integer),
1083            "FLOAT" => Some(Self::Float),
1084            "BOOLEAN" => Some(Self::Boolean),
1085            _ => None,
1086        }
1087    }
1088}
1089/// TODO This belongs in features
1090#[derive(serde::Serialize)]
1091#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1092#[repr(i32)]
1093pub enum SortOp {
1094    SortNone = 0,
1095    SortAsc = 1,
1096    SortDesc = 2,
1097    SortColAsc = 3,
1098    SortColDesc = 4,
1099    SortAscAbs = 5,
1100    SortDescAbs = 6,
1101    SortColAscAbs = 7,
1102    SortColDescAbs = 8,
1103}
1104impl SortOp {
1105    /// String value of the enum field names used in the ProtoBuf definition.
1106    ///
1107    /// The values are not transformed in any way and thus are considered stable
1108    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1109    pub fn as_str_name(&self) -> &'static str {
1110        match self {
1111            SortOp::SortNone => "SORT_NONE",
1112            SortOp::SortAsc => "SORT_ASC",
1113            SortOp::SortDesc => "SORT_DESC",
1114            SortOp::SortColAsc => "SORT_COL_ASC",
1115            SortOp::SortColDesc => "SORT_COL_DESC",
1116            SortOp::SortAscAbs => "SORT_ASC_ABS",
1117            SortOp::SortDescAbs => "SORT_DESC_ABS",
1118            SortOp::SortColAscAbs => "SORT_COL_ASC_ABS",
1119            SortOp::SortColDescAbs => "SORT_COL_DESC_ABS",
1120        }
1121    }
1122    /// Creates an enum from field names used in the ProtoBuf definition.
1123    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1124        match value {
1125            "SORT_NONE" => Some(Self::SortNone),
1126            "SORT_ASC" => Some(Self::SortAsc),
1127            "SORT_DESC" => Some(Self::SortDesc),
1128            "SORT_COL_ASC" => Some(Self::SortColAsc),
1129            "SORT_COL_DESC" => Some(Self::SortColDesc),
1130            "SORT_ASC_ABS" => Some(Self::SortAscAbs),
1131            "SORT_DESC_ABS" => Some(Self::SortDescAbs),
1132            "SORT_COL_ASC_ABS" => Some(Self::SortColAscAbs),
1133            "SORT_COL_DESC_ABS" => Some(Self::SortColDescAbs),
1134            _ => None,
1135        }
1136    }
1137}