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(bool, tag = "4")]
317    pub on_update: bool,
318    #[prost(bool, tag = "5")]
319    pub sort: bool,
320    #[prost(map = "uint32, message", tag = "6")]
321    pub filter_ops: ::std::collections::HashMap<
322        u32,
323        get_features_resp::ColumnTypeOptions,
324    >,
325    #[prost(map = "uint32, message", tag = "7")]
326    pub aggregates: ::std::collections::HashMap<
327        u32,
328        get_features_resp::AggregateOptions,
329    >,
330}
331/// Nested message and enum types in `GetFeaturesResp`.
332pub mod get_features_resp {
333    #[derive(serde::Serialize)]
334    #[allow(clippy::derive_partial_eq_without_eq)]
335    #[derive(Clone, PartialEq, ::prost::Message)]
336    pub struct ColumnTypeOptions {
337        #[prost(string, repeated, tag = "1")]
338        pub options: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
339    }
340    #[derive(serde::Serialize)]
341    #[allow(clippy::derive_partial_eq_without_eq)]
342    #[derive(Clone, PartialEq, ::prost::Message)]
343    pub struct AggregateOptions {
344        #[prost(message, repeated, tag = "1")]
345        pub aggregates: ::prost::alloc::vec::Vec<AggregateArgs>,
346    }
347    #[derive(serde::Serialize)]
348    #[allow(clippy::derive_partial_eq_without_eq)]
349    #[derive(Clone, PartialEq, ::prost::Message)]
350    pub struct AggregateArgs {
351        #[prost(string, tag = "1")]
352        pub name: ::prost::alloc::string::String,
353        #[prost(enumeration = "super::ColumnType", repeated, tag = "2")]
354        pub args: ::prost::alloc::vec::Vec<i32>,
355    }
356}
357/// `Client::get_hosted_tables`
358#[derive(serde::Serialize)]
359#[allow(clippy::derive_partial_eq_without_eq)]
360#[derive(Clone, PartialEq, ::prost::Message)]
361pub struct GetHostedTablesReq {
362    #[prost(bool, tag = "1")]
363    pub subscribe: bool,
364}
365#[derive(serde::Serialize)]
366#[allow(clippy::derive_partial_eq_without_eq)]
367#[derive(Clone, PartialEq, ::prost::Message)]
368pub struct GetHostedTablesResp {
369    #[prost(message, repeated, tag = "1")]
370    pub table_infos: ::prost::alloc::vec::Vec<HostedTable>,
371}
372#[derive(serde::Serialize)]
373#[allow(clippy::derive_partial_eq_without_eq)]
374#[derive(Clone, PartialEq, ::prost::Message)]
375pub struct HostedTable {
376    #[prost(string, tag = "1")]
377    pub entity_id: ::prost::alloc::string::String,
378    #[prost(string, optional, tag = "2")]
379    pub index: ::core::option::Option<::prost::alloc::string::String>,
380    #[prost(uint32, optional, tag = "3")]
381    pub limit: ::core::option::Option<u32>,
382}
383#[derive(serde::Serialize)]
384#[allow(clippy::derive_partial_eq_without_eq)]
385#[derive(Clone, PartialEq, ::prost::Message)]
386pub struct RemoveHostedTablesUpdateReq {
387    #[prost(uint32, tag = "1")]
388    pub id: u32,
389}
390#[derive(serde::Serialize)]
391#[allow(clippy::derive_partial_eq_without_eq)]
392#[derive(Clone, PartialEq, ::prost::Message)]
393pub struct RemoveHostedTablesUpdateResp {}
394/// `Table::size`
395#[derive(serde::Serialize)]
396#[allow(clippy::derive_partial_eq_without_eq)]
397#[derive(Clone, PartialEq, ::prost::Message)]
398pub struct TableSizeReq {}
399#[derive(serde::Serialize)]
400#[allow(clippy::derive_partial_eq_without_eq)]
401#[derive(Clone, PartialEq, ::prost::Message)]
402pub struct TableSizeResp {
403    #[prost(uint32, tag = "2")]
404    pub size: u32,
405}
406/// `Table::schema`
407#[derive(serde::Serialize)]
408#[allow(clippy::derive_partial_eq_without_eq)]
409#[derive(Clone, PartialEq, ::prost::Message)]
410pub struct TableSchemaReq {}
411#[derive(serde::Serialize)]
412#[allow(clippy::derive_partial_eq_without_eq)]
413#[derive(Clone, PartialEq, ::prost::Message)]
414pub struct TableSchemaResp {
415    #[prost(message, optional, tag = "1")]
416    pub schema: ::core::option::Option<Schema>,
417}
418/// `Table::validate_expressions`
419/// TODO: This should be just `validate()`
420#[derive(serde::Serialize)]
421#[allow(clippy::derive_partial_eq_without_eq)]
422#[derive(Clone, PartialEq, ::prost::Message)]
423pub struct TableValidateExprReq {
424    #[prost(map = "string, string", tag = "1")]
425    pub column_to_expr: ::std::collections::HashMap<
426        ::prost::alloc::string::String,
427        ::prost::alloc::string::String,
428    >,
429}
430#[derive(serde::Serialize)]
431#[derive(serde::Deserialize)]
432#[allow(clippy::derive_partial_eq_without_eq)]
433#[derive(Clone, PartialEq, ::prost::Message)]
434pub struct TableValidateExprResp {
435    #[prost(map = "string, enumeration(ColumnType)", tag = "1")]
436    pub expression_schema: ::std::collections::HashMap<
437        ::prost::alloc::string::String,
438        i32,
439    >,
440    #[prost(map = "string, message", tag = "2")]
441    pub errors: ::std::collections::HashMap<
442        ::prost::alloc::string::String,
443        table_validate_expr_resp::ExprValidationError,
444    >,
445    #[prost(map = "string, string", tag = "3")]
446    pub expression_alias: ::std::collections::HashMap<
447        ::prost::alloc::string::String,
448        ::prost::alloc::string::String,
449    >,
450}
451/// Nested message and enum types in `TableValidateExprResp`.
452pub mod table_validate_expr_resp {
453    #[derive(serde::Serialize)]
454    #[derive(serde::Deserialize)]
455    #[allow(clippy::derive_partial_eq_without_eq)]
456    #[derive(Clone, PartialEq, ::prost::Message)]
457    pub struct ExprValidationError {
458        #[prost(string, tag = "1")]
459        pub error_message: ::prost::alloc::string::String,
460        #[prost(uint32, tag = "2")]
461        pub line: u32,
462        #[prost(uint32, tag = "3")]
463        pub column: u32,
464    }
465}
466/// `Table::view`
467#[derive(serde::Serialize)]
468#[allow(clippy::derive_partial_eq_without_eq)]
469#[derive(Clone, PartialEq, ::prost::Message)]
470pub struct TableMakeViewReq {
471    #[prost(string, tag = "1")]
472    pub view_id: ::prost::alloc::string::String,
473    #[prost(message, optional, tag = "2")]
474    pub config: ::core::option::Option<ViewConfig>,
475}
476#[derive(serde::Serialize)]
477#[allow(clippy::derive_partial_eq_without_eq)]
478#[derive(Clone, PartialEq, ::prost::Message)]
479pub struct TableMakeViewResp {
480    #[prost(string, tag = "1")]
481    pub view_id: ::prost::alloc::string::String,
482}
483/// `View::schema`
484#[derive(serde::Serialize)]
485#[allow(clippy::derive_partial_eq_without_eq)]
486#[derive(Clone, PartialEq, ::prost::Message)]
487pub struct ViewSchemaReq {}
488#[derive(serde::Serialize)]
489#[allow(clippy::derive_partial_eq_without_eq)]
490#[derive(Clone, PartialEq, ::prost::Message)]
491pub struct ViewSchemaResp {
492    #[prost(map = "string, enumeration(ColumnType)", tag = "1")]
493    pub schema: ::std::collections::HashMap<::prost::alloc::string::String, i32>,
494}
495/// `View::dimensions`
496#[derive(serde::Serialize)]
497#[allow(clippy::derive_partial_eq_without_eq)]
498#[derive(Clone, PartialEq, ::prost::Message)]
499pub struct ViewDimensionsReq {}
500#[derive(serde::Serialize)]
501#[derive(serde::Deserialize)]
502#[allow(clippy::derive_partial_eq_without_eq)]
503#[derive(Clone, PartialEq, ::prost::Message)]
504pub struct ViewDimensionsResp {
505    #[prost(uint32, tag = "1")]
506    pub num_table_rows: u32,
507    #[prost(uint32, tag = "2")]
508    pub num_table_columns: u32,
509    #[prost(uint32, tag = "3")]
510    pub num_view_rows: u32,
511    #[prost(uint32, tag = "4")]
512    pub num_view_columns: u32,
513}
514/// `View::get_config`
515#[derive(serde::Serialize)]
516#[allow(clippy::derive_partial_eq_without_eq)]
517#[derive(Clone, PartialEq, ::prost::Message)]
518pub struct ViewGetConfigReq {}
519#[derive(serde::Serialize)]
520#[allow(clippy::derive_partial_eq_without_eq)]
521#[derive(Clone, PartialEq, ::prost::Message)]
522pub struct ViewGetConfigResp {
523    #[prost(message, optional, tag = "1")]
524    pub config: ::core::option::Option<ViewConfig>,
525}
526/// `Client::table`.
527#[derive(serde::Serialize)]
528#[allow(clippy::derive_partial_eq_without_eq)]
529#[derive(Clone, PartialEq, ::prost::Message)]
530pub struct MakeTableReq {
531    #[prost(message, optional, tag = "1")]
532    pub data: ::core::option::Option<MakeTableData>,
533    #[prost(message, optional, tag = "2")]
534    pub options: ::core::option::Option<make_table_req::MakeTableOptions>,
535}
536/// Nested message and enum types in `MakeTableReq`.
537pub mod make_table_req {
538    #[derive(serde::Serialize)]
539    #[allow(clippy::derive_partial_eq_without_eq)]
540    #[derive(Clone, PartialEq, ::prost::Message)]
541    pub struct MakeTableOptions {
542        #[prost(oneof = "make_table_options::MakeTableType", tags = "1, 2")]
543        pub make_table_type: ::core::option::Option<make_table_options::MakeTableType>,
544    }
545    /// Nested message and enum types in `MakeTableOptions`.
546    pub mod make_table_options {
547        #[derive(serde::Serialize)]
548        #[allow(clippy::derive_partial_eq_without_eq)]
549        #[derive(Clone, PartialEq, ::prost::Oneof)]
550        pub enum MakeTableType {
551            #[prost(string, tag = "1")]
552            MakeIndexTable(::prost::alloc::string::String),
553            #[prost(uint32, tag = "2")]
554            MakeLimitTable(u32),
555        }
556    }
557}
558#[derive(serde::Serialize)]
559#[allow(clippy::derive_partial_eq_without_eq)]
560#[derive(Clone, PartialEq, ::prost::Message)]
561pub struct MakeTableResp {}
562/// `Table::delete`
563#[derive(serde::Serialize)]
564#[allow(clippy::derive_partial_eq_without_eq)]
565#[derive(Clone, PartialEq, ::prost::Message)]
566pub struct TableDeleteReq {
567    #[prost(bool, tag = "1")]
568    pub is_immediate: bool,
569}
570#[derive(serde::Serialize)]
571#[allow(clippy::derive_partial_eq_without_eq)]
572#[derive(Clone, PartialEq, ::prost::Message)]
573pub struct TableDeleteResp {}
574/// `Table::on_delete`
575#[derive(serde::Serialize)]
576#[allow(clippy::derive_partial_eq_without_eq)]
577#[derive(Clone, PartialEq, ::prost::Message)]
578pub struct TableOnDeleteReq {}
579#[derive(serde::Serialize)]
580#[allow(clippy::derive_partial_eq_without_eq)]
581#[derive(Clone, PartialEq, ::prost::Message)]
582pub struct TableOnDeleteResp {}
583/// `Table::make_port`
584#[derive(serde::Serialize)]
585#[allow(clippy::derive_partial_eq_without_eq)]
586#[derive(Clone, PartialEq, ::prost::Message)]
587pub struct TableMakePortReq {}
588#[derive(serde::Serialize)]
589#[allow(clippy::derive_partial_eq_without_eq)]
590#[derive(Clone, PartialEq, ::prost::Message)]
591pub struct TableMakePortResp {
592    #[prost(uint32, tag = "1")]
593    pub port_id: u32,
594}
595/// `Table::remove_delete`
596#[derive(serde::Serialize)]
597#[allow(clippy::derive_partial_eq_without_eq)]
598#[derive(Clone, PartialEq, ::prost::Message)]
599pub struct TableRemoveDeleteReq {
600    #[prost(uint32, tag = "1")]
601    pub id: u32,
602}
603#[derive(serde::Serialize)]
604#[allow(clippy::derive_partial_eq_without_eq)]
605#[derive(Clone, PartialEq, ::prost::Message)]
606pub struct TableRemoveDeleteResp {}
607/// `Table::update`
608#[derive(serde::Serialize)]
609#[allow(clippy::derive_partial_eq_without_eq)]
610#[derive(Clone, PartialEq, ::prost::Message)]
611pub struct TableUpdateReq {
612    #[prost(message, optional, tag = "1")]
613    pub data: ::core::option::Option<MakeTableData>,
614    #[prost(uint32, tag = "2")]
615    pub port_id: u32,
616}
617#[derive(serde::Serialize)]
618#[allow(clippy::derive_partial_eq_without_eq)]
619#[derive(Clone, PartialEq, ::prost::Message)]
620pub struct TableUpdateResp {}
621/// `Table::replace`
622#[derive(serde::Serialize)]
623#[allow(clippy::derive_partial_eq_without_eq)]
624#[derive(Clone, PartialEq, ::prost::Message)]
625pub struct TableReplaceReq {
626    #[prost(message, optional, tag = "1")]
627    pub data: ::core::option::Option<MakeTableData>,
628}
629#[derive(serde::Serialize)]
630#[allow(clippy::derive_partial_eq_without_eq)]
631#[derive(Clone, PartialEq, ::prost::Message)]
632pub struct TableReplaceResp {}
633/// `Table::remove`
634#[derive(serde::Serialize)]
635#[allow(clippy::derive_partial_eq_without_eq)]
636#[derive(Clone, PartialEq, ::prost::Message)]
637pub struct TableRemoveReq {
638    #[prost(message, optional, tag = "1")]
639    pub data: ::core::option::Option<MakeTableData>,
640}
641#[derive(serde::Serialize)]
642#[allow(clippy::derive_partial_eq_without_eq)]
643#[derive(Clone, PartialEq, ::prost::Message)]
644pub struct TableRemoveResp {}
645#[derive(serde::Serialize)]
646#[allow(clippy::derive_partial_eq_without_eq)]
647#[derive(Clone, PartialEq, ::prost::Message)]
648pub struct ViewOnUpdateReq {
649    #[prost(enumeration = "view_on_update_req::Mode", optional, tag = "1")]
650    pub mode: ::core::option::Option<i32>,
651}
652/// Nested message and enum types in `ViewOnUpdateReq`.
653pub mod view_on_update_req {
654    #[derive(serde::Serialize)]
655    #[derive(
656        Clone,
657        Copy,
658        Debug,
659        PartialEq,
660        Eq,
661        Hash,
662        PartialOrd,
663        Ord,
664        ::prost::Enumeration
665    )]
666    #[repr(i32)]
667    pub enum Mode {
668        Row = 0,
669    }
670    impl Mode {
671        /// String value of the enum field names used in the ProtoBuf definition.
672        ///
673        /// The values are not transformed in any way and thus are considered stable
674        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
675        pub fn as_str_name(&self) -> &'static str {
676            match self {
677                Mode::Row => "ROW",
678            }
679        }
680        /// Creates an enum from field names used in the ProtoBuf definition.
681        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
682            match value {
683                "ROW" => Some(Self::Row),
684                _ => None,
685            }
686        }
687    }
688}
689#[derive(ts_rs::TS)]
690#[derive(serde::Serialize)]
691#[allow(clippy::derive_partial_eq_without_eq)]
692#[derive(Clone, PartialEq, ::prost::Message)]
693pub struct ViewOnUpdateResp {
694    #[prost(bytes = "vec", optional, tag = "1")]
695    #[ts(as = "Vec::<u8>")]
696    #[serde(with = "serde_bytes")]
697    pub delta: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
698    #[prost(uint32, tag = "2")]
699    pub port_id: u32,
700}
701#[derive(serde::Serialize)]
702#[allow(clippy::derive_partial_eq_without_eq)]
703#[derive(Clone, PartialEq, ::prost::Message)]
704pub struct ViewOnDeleteReq {}
705#[derive(serde::Serialize)]
706#[allow(clippy::derive_partial_eq_without_eq)]
707#[derive(Clone, PartialEq, ::prost::Message)]
708pub struct ViewOnDeleteResp {}
709#[derive(serde::Serialize)]
710#[allow(clippy::derive_partial_eq_without_eq)]
711#[derive(Clone, PartialEq, ::prost::Message)]
712pub struct ViewRemoveDeleteReq {
713    #[prost(uint32, tag = "1")]
714    pub id: u32,
715}
716#[derive(serde::Serialize)]
717#[allow(clippy::derive_partial_eq_without_eq)]
718#[derive(Clone, PartialEq, ::prost::Message)]
719pub struct ViewRemoveDeleteResp {}
720#[derive(serde::Serialize)]
721#[allow(clippy::derive_partial_eq_without_eq)]
722#[derive(Clone, PartialEq, ::prost::Message)]
723pub struct ViewToColumnsStringReq {
724    #[prost(message, optional, tag = "1")]
725    pub viewport: ::core::option::Option<ViewPort>,
726    #[prost(bool, optional, tag = "2")]
727    pub id: ::core::option::Option<bool>,
728    #[prost(bool, optional, tag = "3")]
729    pub index: ::core::option::Option<bool>,
730    #[prost(bool, optional, tag = "4")]
731    pub formatted: ::core::option::Option<bool>,
732    #[prost(bool, optional, tag = "5")]
733    pub leaves_only: ::core::option::Option<bool>,
734}
735#[derive(serde::Serialize)]
736#[allow(clippy::derive_partial_eq_without_eq)]
737#[derive(Clone, PartialEq, ::prost::Message)]
738pub struct ViewToColumnsStringResp {
739    #[prost(string, tag = "1")]
740    pub json_string: ::prost::alloc::string::String,
741}
742#[derive(serde::Serialize)]
743#[allow(clippy::derive_partial_eq_without_eq)]
744#[derive(Clone, PartialEq, ::prost::Message)]
745pub struct ViewToRowsStringReq {
746    #[prost(message, optional, tag = "1")]
747    pub viewport: ::core::option::Option<ViewPort>,
748    #[prost(bool, optional, tag = "2")]
749    pub id: ::core::option::Option<bool>,
750    #[prost(bool, optional, tag = "3")]
751    pub index: ::core::option::Option<bool>,
752    #[prost(bool, optional, tag = "4")]
753    pub formatted: ::core::option::Option<bool>,
754    #[prost(bool, optional, tag = "5")]
755    pub leaves_only: ::core::option::Option<bool>,
756}
757#[derive(serde::Serialize)]
758#[allow(clippy::derive_partial_eq_without_eq)]
759#[derive(Clone, PartialEq, ::prost::Message)]
760pub struct ViewToRowsStringResp {
761    #[prost(string, tag = "1")]
762    pub json_string: ::prost::alloc::string::String,
763}
764#[derive(serde::Serialize)]
765#[allow(clippy::derive_partial_eq_without_eq)]
766#[derive(Clone, PartialEq, ::prost::Message)]
767pub struct ViewToNdjsonStringReq {
768    #[prost(message, optional, tag = "1")]
769    pub viewport: ::core::option::Option<ViewPort>,
770    #[prost(bool, optional, tag = "2")]
771    pub id: ::core::option::Option<bool>,
772    #[prost(bool, optional, tag = "3")]
773    pub index: ::core::option::Option<bool>,
774    #[prost(bool, optional, tag = "4")]
775    pub formatted: ::core::option::Option<bool>,
776    #[prost(bool, optional, tag = "5")]
777    pub leaves_only: ::core::option::Option<bool>,
778}
779#[derive(serde::Serialize)]
780#[allow(clippy::derive_partial_eq_without_eq)]
781#[derive(Clone, PartialEq, ::prost::Message)]
782pub struct ViewToNdjsonStringResp {
783    #[prost(string, tag = "1")]
784    pub ndjson_string: ::prost::alloc::string::String,
785}
786#[derive(serde::Serialize)]
787#[allow(clippy::derive_partial_eq_without_eq)]
788#[derive(Clone, PartialEq, ::prost::Message)]
789pub struct ViewToArrowReq {
790    #[prost(message, optional, tag = "1")]
791    pub viewport: ::core::option::Option<ViewPort>,
792    #[prost(string, optional, tag = "2")]
793    pub compression: ::core::option::Option<::prost::alloc::string::String>,
794}
795#[derive(serde::Serialize)]
796#[allow(clippy::derive_partial_eq_without_eq)]
797#[derive(Clone, PartialEq, ::prost::Message)]
798pub struct ViewToArrowResp {
799    #[prost(bytes = "vec", tag = "1")]
800    #[serde(skip)]
801    pub arrow: ::prost::alloc::vec::Vec<u8>,
802}
803#[derive(serde::Serialize)]
804#[allow(clippy::derive_partial_eq_without_eq)]
805#[derive(Clone, PartialEq, ::prost::Message)]
806pub struct ViewColumnPathsReq {
807    #[prost(uint32, optional, tag = "1")]
808    pub start_col: ::core::option::Option<u32>,
809    #[prost(uint32, optional, tag = "2")]
810    pub end_col: ::core::option::Option<u32>,
811}
812#[derive(serde::Serialize)]
813#[allow(clippy::derive_partial_eq_without_eq)]
814#[derive(Clone, PartialEq, ::prost::Message)]
815pub struct ViewColumnPathsResp {
816    /// repeated ColumnPath paths = 1;
817    #[prost(string, repeated, tag = "1")]
818    pub paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
819}
820#[derive(serde::Serialize)]
821#[allow(clippy::derive_partial_eq_without_eq)]
822#[derive(Clone, PartialEq, ::prost::Message)]
823pub struct ViewDeleteReq {}
824#[derive(serde::Serialize)]
825#[allow(clippy::derive_partial_eq_without_eq)]
826#[derive(Clone, PartialEq, ::prost::Message)]
827pub struct ViewDeleteResp {}
828#[derive(serde::Serialize)]
829#[allow(clippy::derive_partial_eq_without_eq)]
830#[derive(Clone, PartialEq, ::prost::Message)]
831pub struct ViewGetMinMaxReq {
832    #[prost(string, tag = "1")]
833    pub column_name: ::prost::alloc::string::String,
834}
835#[derive(serde::Serialize)]
836#[allow(clippy::derive_partial_eq_without_eq)]
837#[derive(Clone, PartialEq, ::prost::Message)]
838pub struct ViewGetMinMaxResp {
839    #[prost(string, tag = "1")]
840    pub min: ::prost::alloc::string::String,
841    #[prost(string, tag = "2")]
842    pub max: ::prost::alloc::string::String,
843}
844#[derive(serde::Serialize)]
845#[allow(clippy::derive_partial_eq_without_eq)]
846#[derive(Clone, PartialEq, ::prost::Message)]
847pub struct ViewExpressionSchemaReq {}
848#[derive(serde::Serialize)]
849#[allow(clippy::derive_partial_eq_without_eq)]
850#[derive(Clone, PartialEq, ::prost::Message)]
851pub struct ViewExpressionSchemaResp {
852    #[prost(map = "string, enumeration(ColumnType)", tag = "1")]
853    pub schema: ::std::collections::HashMap<::prost::alloc::string::String, i32>,
854}
855#[derive(serde::Serialize)]
856#[allow(clippy::derive_partial_eq_without_eq)]
857#[derive(Clone, PartialEq, ::prost::Message)]
858pub struct ViewToCsvReq {
859    #[prost(message, optional, tag = "1")]
860    pub viewport: ::core::option::Option<ViewPort>,
861}
862#[derive(serde::Serialize)]
863#[allow(clippy::derive_partial_eq_without_eq)]
864#[derive(Clone, PartialEq, ::prost::Message)]
865pub struct ViewToCsvResp {
866    #[prost(string, tag = "1")]
867    pub csv: ::prost::alloc::string::String,
868}
869#[derive(serde::Serialize)]
870#[allow(clippy::derive_partial_eq_without_eq)]
871#[derive(Clone, PartialEq, ::prost::Message)]
872pub struct ViewRemoveOnUpdateReq {
873    #[prost(uint32, tag = "1")]
874    pub id: u32,
875}
876#[derive(serde::Serialize)]
877#[allow(clippy::derive_partial_eq_without_eq)]
878#[derive(Clone, PartialEq, ::prost::Message)]
879pub struct ViewRemoveOnUpdateResp {}
880#[derive(serde::Serialize)]
881#[allow(clippy::derive_partial_eq_without_eq)]
882#[derive(Clone, PartialEq, ::prost::Message)]
883pub struct ViewCollapseReq {
884    #[prost(uint32, tag = "1")]
885    pub row_index: u32,
886}
887#[derive(serde::Serialize)]
888#[allow(clippy::derive_partial_eq_without_eq)]
889#[derive(Clone, PartialEq, ::prost::Message)]
890pub struct ViewCollapseResp {
891    #[prost(uint32, tag = "1")]
892    pub num_changed: u32,
893}
894#[derive(serde::Serialize)]
895#[allow(clippy::derive_partial_eq_without_eq)]
896#[derive(Clone, PartialEq, ::prost::Message)]
897pub struct ViewExpandReq {
898    #[prost(uint32, tag = "1")]
899    pub row_index: u32,
900}
901#[derive(serde::Serialize)]
902#[allow(clippy::derive_partial_eq_without_eq)]
903#[derive(Clone, PartialEq, ::prost::Message)]
904pub struct ViewExpandResp {
905    #[prost(uint32, tag = "1")]
906    pub num_changed: u32,
907}
908/// `View::set_depth`
909#[derive(serde::Serialize)]
910#[allow(clippy::derive_partial_eq_without_eq)]
911#[derive(Clone, PartialEq, ::prost::Message)]
912pub struct ViewSetDepthReq {
913    #[prost(uint32, tag = "1")]
914    pub depth: u32,
915}
916#[derive(serde::Serialize)]
917#[allow(clippy::derive_partial_eq_without_eq)]
918#[derive(Clone, PartialEq, ::prost::Message)]
919pub struct ViewSetDepthResp {}
920#[derive(serde::Serialize)]
921#[allow(clippy::derive_partial_eq_without_eq)]
922#[derive(Clone, PartialEq, ::prost::Message)]
923pub struct ServerSystemInfoReq {}
924#[derive(serde::Serialize)]
925#[allow(clippy::derive_partial_eq_without_eq)]
926#[derive(Clone, PartialEq, ::prost::Message)]
927pub struct ServerSystemInfoResp {
928    #[prost(uint64, tag = "1")]
929    pub heap_size: u64,
930    #[prost(uint64, tag = "2")]
931    pub used_size: u64,
932    #[prost(uint32, tag = "3")]
933    pub cpu_time: u32,
934    #[prost(uint32, tag = "4")]
935    pub cpu_time_epoch: u32,
936}
937#[derive(serde::Serialize)]
938#[allow(clippy::derive_partial_eq_without_eq)]
939#[derive(Clone, PartialEq, ::prost::Message)]
940pub struct ViewConfig {
941    #[prost(string, repeated, tag = "1")]
942    pub group_by: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
943    #[prost(string, repeated, tag = "2")]
944    pub split_by: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
945    #[prost(message, optional, tag = "3")]
946    pub columns: ::core::option::Option<ColumnsUpdate>,
947    #[prost(message, repeated, tag = "4")]
948    pub filter: ::prost::alloc::vec::Vec<view_config::Filter>,
949    #[prost(message, repeated, tag = "5")]
950    pub sort: ::prost::alloc::vec::Vec<view_config::Sort>,
951    #[prost(map = "string, string", tag = "6")]
952    pub expressions: ::std::collections::HashMap<
953        ::prost::alloc::string::String,
954        ::prost::alloc::string::String,
955    >,
956    #[prost(map = "string, message", tag = "7")]
957    pub aggregates: ::std::collections::HashMap<
958        ::prost::alloc::string::String,
959        view_config::AggList,
960    >,
961    #[prost(enumeration = "view_config::FilterReducer", tag = "8")]
962    pub filter_op: i32,
963    #[prost(uint32, optional, tag = "9")]
964    pub group_by_depth: ::core::option::Option<u32>,
965}
966/// Nested message and enum types in `ViewConfig`.
967pub mod view_config {
968    #[derive(serde::Serialize)]
969    #[allow(clippy::derive_partial_eq_without_eq)]
970    #[derive(Clone, PartialEq, ::prost::Message)]
971    pub struct AggList {
972        #[prost(string, repeated, tag = "1")]
973        pub aggregations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
974    }
975    #[derive(serde::Serialize)]
976    #[allow(clippy::derive_partial_eq_without_eq)]
977    #[derive(Clone, PartialEq, ::prost::Message)]
978    pub struct Sort {
979        #[prost(string, tag = "1")]
980        pub column: ::prost::alloc::string::String,
981        #[prost(enumeration = "super::SortOp", tag = "2")]
982        pub op: i32,
983    }
984    #[derive(serde::Serialize)]
985    #[allow(clippy::derive_partial_eq_without_eq)]
986    #[derive(Clone, PartialEq, ::prost::Message)]
987    pub struct Filter {
988        #[prost(string, tag = "1")]
989        pub column: ::prost::alloc::string::String,
990        #[prost(string, tag = "2")]
991        pub op: ::prost::alloc::string::String,
992        #[prost(message, repeated, tag = "3")]
993        pub value: ::prost::alloc::vec::Vec<super::Scalar>,
994    }
995    #[derive(serde::Serialize)]
996    #[derive(
997        Clone,
998        Copy,
999        Debug,
1000        PartialEq,
1001        Eq,
1002        Hash,
1003        PartialOrd,
1004        Ord,
1005        ::prost::Enumeration
1006    )]
1007    #[repr(i32)]
1008    pub enum FilterReducer {
1009        And = 0,
1010        Or = 1,
1011    }
1012    impl FilterReducer {
1013        /// String value of the enum field names used in the ProtoBuf definition.
1014        ///
1015        /// The values are not transformed in any way and thus are considered stable
1016        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1017        pub fn as_str_name(&self) -> &'static str {
1018            match self {
1019                FilterReducer::And => "AND",
1020                FilterReducer::Or => "OR",
1021            }
1022        }
1023        /// Creates an enum from field names used in the ProtoBuf definition.
1024        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1025            match value {
1026                "AND" => Some(Self::And),
1027                "OR" => Some(Self::Or),
1028                _ => None,
1029            }
1030        }
1031    }
1032}
1033#[derive(serde::Serialize)]
1034#[allow(clippy::derive_partial_eq_without_eq)]
1035#[derive(Clone, PartialEq, ::prost::Message)]
1036pub struct ColumnsUpdate {
1037    #[prost(oneof = "columns_update::OptColumns", tags = "1, 2")]
1038    pub opt_columns: ::core::option::Option<columns_update::OptColumns>,
1039}
1040/// Nested message and enum types in `ColumnsUpdate`.
1041pub mod columns_update {
1042    #[derive(serde::Serialize)]
1043    #[allow(clippy::derive_partial_eq_without_eq)]
1044    #[derive(Clone, PartialEq, ::prost::Message)]
1045    pub struct Columns {
1046        #[prost(string, repeated, tag = "1")]
1047        pub columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1048    }
1049    #[derive(serde::Serialize)]
1050    #[allow(clippy::derive_partial_eq_without_eq)]
1051    #[derive(Clone, PartialEq, ::prost::Oneof)]
1052    pub enum OptColumns {
1053        #[prost(enumeration = "::prost_types::NullValue", tag = "1")]
1054        DefaultColumns(i32),
1055        #[prost(message, tag = "2")]
1056        Columns(Columns),
1057    }
1058}
1059#[derive(serde::Serialize)]
1060#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1061#[repr(i32)]
1062pub enum StatusCode {
1063    ServerError = 0,
1064    ViewNotFound = 1,
1065    TransportError = 2,
1066}
1067impl StatusCode {
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            StatusCode::ServerError => "SERVER_ERROR",
1075            StatusCode::ViewNotFound => "VIEW_NOT_FOUND",
1076            StatusCode::TransportError => "TRANSPORT_ERROR",
1077        }
1078    }
1079    /// Creates an enum from field names used in the ProtoBuf definition.
1080    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1081        match value {
1082            "SERVER_ERROR" => Some(Self::ServerError),
1083            "VIEW_NOT_FOUND" => Some(Self::ViewNotFound),
1084            "TRANSPORT_ERROR" => Some(Self::TransportError),
1085            _ => None,
1086        }
1087    }
1088}
1089/// View types
1090#[derive(serde::Serialize)]
1091#[derive(serde::Deserialize)]
1092#[serde(rename_all = "snake_case")]
1093#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1094#[repr(i32)]
1095pub enum ColumnType {
1096    String = 0,
1097    Date = 1,
1098    Datetime = 2,
1099    Integer = 3,
1100    Float = 4,
1101    Boolean = 5,
1102}
1103impl ColumnType {
1104    /// String value of the enum field names used in the ProtoBuf definition.
1105    ///
1106    /// The values are not transformed in any way and thus are considered stable
1107    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1108    pub fn as_str_name(&self) -> &'static str {
1109        match self {
1110            ColumnType::String => "STRING",
1111            ColumnType::Date => "DATE",
1112            ColumnType::Datetime => "DATETIME",
1113            ColumnType::Integer => "INTEGER",
1114            ColumnType::Float => "FLOAT",
1115            ColumnType::Boolean => "BOOLEAN",
1116        }
1117    }
1118    /// Creates an enum from field names used in the ProtoBuf definition.
1119    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1120        match value {
1121            "STRING" => Some(Self::String),
1122            "DATE" => Some(Self::Date),
1123            "DATETIME" => Some(Self::Datetime),
1124            "INTEGER" => Some(Self::Integer),
1125            "FLOAT" => Some(Self::Float),
1126            "BOOLEAN" => Some(Self::Boolean),
1127            _ => None,
1128        }
1129    }
1130}
1131/// TODO This belongs in features
1132#[derive(serde::Serialize)]
1133#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1134#[repr(i32)]
1135pub enum SortOp {
1136    SortNone = 0,
1137    SortAsc = 1,
1138    SortDesc = 2,
1139    SortColAsc = 3,
1140    SortColDesc = 4,
1141    SortAscAbs = 5,
1142    SortDescAbs = 6,
1143    SortColAscAbs = 7,
1144    SortColDescAbs = 8,
1145}
1146impl SortOp {
1147    /// String value of the enum field names used in the ProtoBuf definition.
1148    ///
1149    /// The values are not transformed in any way and thus are considered stable
1150    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1151    pub fn as_str_name(&self) -> &'static str {
1152        match self {
1153            SortOp::SortNone => "SORT_NONE",
1154            SortOp::SortAsc => "SORT_ASC",
1155            SortOp::SortDesc => "SORT_DESC",
1156            SortOp::SortColAsc => "SORT_COL_ASC",
1157            SortOp::SortColDesc => "SORT_COL_DESC",
1158            SortOp::SortAscAbs => "SORT_ASC_ABS",
1159            SortOp::SortDescAbs => "SORT_DESC_ABS",
1160            SortOp::SortColAscAbs => "SORT_COL_ASC_ABS",
1161            SortOp::SortColDescAbs => "SORT_COL_DESC_ABS",
1162        }
1163    }
1164    /// Creates an enum from field names used in the ProtoBuf definition.
1165    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1166        match value {
1167            "SORT_NONE" => Some(Self::SortNone),
1168            "SORT_ASC" => Some(Self::SortAsc),
1169            "SORT_DESC" => Some(Self::SortDesc),
1170            "SORT_COL_ASC" => Some(Self::SortColAsc),
1171            "SORT_COL_DESC" => Some(Self::SortColDesc),
1172            "SORT_ASC_ABS" => Some(Self::SortAscAbs),
1173            "SORT_DESC_ABS" => Some(Self::SortDescAbs),
1174            "SORT_COL_ASC_ABS" => Some(Self::SortColAscAbs),
1175            "SORT_COL_DESC_ABS" => Some(Self::SortColDescAbs),
1176            _ => None,
1177        }
1178    }
1179}