Skip to main content

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#[derive(serde::Deserialize)]
94#[allow(clippy::derive_partial_eq_without_eq)]
95#[derive(Clone, PartialEq, ::prost::Message)]
96pub struct ViewPort {
97    #[prost(uint32, optional, tag = "1")]
98    pub start_row: ::core::option::Option<u32>,
99    #[prost(uint32, optional, tag = "2")]
100    pub start_col: ::core::option::Option<u32>,
101    #[prost(uint32, optional, tag = "3")]
102    pub end_row: ::core::option::Option<u32>,
103    #[prost(uint32, optional, tag = "4")]
104    pub end_col: ::core::option::Option<u32>,
105    ///    optional bool id = 5;
106    ///    optional bool index = 3;
107    ///    optional bool formatted = 6;
108    ///    optional bool leaves_only = 7;
109    ///    optional bool compression = 3;
110    #[prost(bool, optional, tag = "5")]
111    pub emit_legacy_row_path_names: ::core::option::Option<bool>,
112}
113#[derive(serde::Serialize)]
114#[allow(clippy::derive_partial_eq_without_eq)]
115#[derive(Clone, PartialEq, ::prost::Message)]
116pub struct Request {
117    #[prost(uint32, tag = "1")]
118    pub msg_id: u32,
119    #[prost(string, tag = "2")]
120    pub entity_id: ::prost::alloc::string::String,
121    #[prost(
122        oneof = "request::ClientReq",
123        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, 38"
124    )]
125    pub client_req: ::core::option::Option<request::ClientReq>,
126}
127/// Nested message and enum types in `Request`.
128pub mod request {
129    #[derive(serde::Serialize)]
130    #[allow(clippy::derive_partial_eq_without_eq)]
131    #[derive(Clone, PartialEq, ::prost::Oneof)]
132    pub enum ClientReq {
133        /// Minimum Virtual API (theoretical).
134        #[prost(message, tag = "3")]
135        GetFeaturesReq(super::GetFeaturesReq),
136        #[prost(message, tag = "4")]
137        GetHostedTablesReq(super::GetHostedTablesReq),
138        #[prost(message, tag = "37")]
139        RemoveHostedTablesUpdateReq(super::RemoveHostedTablesUpdateReq),
140        #[prost(message, tag = "5")]
141        TableMakePortReq(super::TableMakePortReq),
142        #[prost(message, tag = "6")]
143        TableMakeViewReq(super::TableMakeViewReq),
144        #[prost(message, tag = "7")]
145        TableSchemaReq(super::TableSchemaReq),
146        #[prost(message, tag = "8")]
147        TableSizeReq(super::TableSizeReq),
148        #[prost(message, tag = "9")]
149        TableValidateExprReq(super::TableValidateExprReq),
150        #[prost(message, tag = "10")]
151        ViewColumnPathsReq(super::ViewColumnPathsReq),
152        #[prost(message, tag = "11")]
153        ViewDeleteReq(super::ViewDeleteReq),
154        #[prost(message, tag = "12")]
155        ViewDimensionsReq(super::ViewDimensionsReq),
156        #[prost(message, tag = "13")]
157        ViewExpressionSchemaReq(super::ViewExpressionSchemaReq),
158        #[prost(message, tag = "14")]
159        ViewGetConfigReq(super::ViewGetConfigReq),
160        #[prost(message, tag = "15")]
161        ViewSchemaReq(super::ViewSchemaReq),
162        #[prost(message, tag = "16")]
163        ViewToArrowReq(super::ViewToArrowReq),
164        /// Optional (we can enable real-time/autocomplete/etc with these, but
165        /// not required).
166        #[prost(message, tag = "17")]
167        ServerSystemInfoReq(super::ServerSystemInfoReq),
168        #[prost(message, tag = "18")]
169        ViewCollapseReq(super::ViewCollapseReq),
170        #[prost(message, tag = "19")]
171        ViewExpandReq(super::ViewExpandReq),
172        #[prost(message, tag = "20")]
173        ViewGetMinMaxReq(super::ViewGetMinMaxReq),
174        #[prost(message, tag = "21")]
175        ViewOnUpdateReq(super::ViewOnUpdateReq),
176        #[prost(message, tag = "22")]
177        ViewRemoveOnUpdateReq(super::ViewRemoveOnUpdateReq),
178        #[prost(message, tag = "23")]
179        ViewSetDepthReq(super::ViewSetDepthReq),
180        #[prost(message, tag = "24")]
181        ViewToColumnsStringReq(super::ViewToColumnsStringReq),
182        #[prost(message, tag = "25")]
183        ViewToCsvReq(super::ViewToCsvReq),
184        #[prost(message, tag = "26")]
185        ViewToRowsStringReq(super::ViewToRowsStringReq),
186        #[prost(message, tag = "36")]
187        ViewToNdjsonStringReq(super::ViewToNdjsonStringReq),
188        /// External (we don't need these for viewer, but the developer may).
189        #[prost(message, tag = "27")]
190        MakeTableReq(super::MakeTableReq),
191        #[prost(message, tag = "28")]
192        TableDeleteReq(super::TableDeleteReq),
193        #[prost(message, tag = "29")]
194        TableOnDeleteReq(super::TableOnDeleteReq),
195        #[prost(message, tag = "30")]
196        TableRemoveDeleteReq(super::TableRemoveDeleteReq),
197        #[prost(message, tag = "31")]
198        TableRemoveReq(super::TableRemoveReq),
199        #[prost(message, tag = "32")]
200        TableReplaceReq(super::TableReplaceReq),
201        #[prost(message, tag = "33")]
202        TableUpdateReq(super::TableUpdateReq),
203        #[prost(message, tag = "34")]
204        ViewOnDeleteReq(super::ViewOnDeleteReq),
205        #[prost(message, tag = "35")]
206        ViewRemoveDeleteReq(super::ViewRemoveDeleteReq),
207        #[prost(message, tag = "38")]
208        MakeJoinTableReq(super::MakeJoinTableReq),
209    }
210}
211#[derive(serde::Serialize)]
212#[allow(clippy::derive_partial_eq_without_eq)]
213#[derive(Clone, PartialEq, ::prost::Message)]
214pub struct Response {
215    #[prost(uint32, tag = "1")]
216    pub msg_id: u32,
217    #[prost(string, tag = "2")]
218    pub entity_id: ::prost::alloc::string::String,
219    #[prost(
220        oneof = "response::ClientResp",
221        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, 38, 50"
222    )]
223    pub client_resp: ::core::option::Option<response::ClientResp>,
224}
225/// Nested message and enum types in `Response`.
226pub mod response {
227    #[derive(serde::Serialize)]
228    #[allow(clippy::derive_partial_eq_without_eq)]
229    #[derive(Clone, PartialEq, ::prost::Oneof)]
230    pub enum ClientResp {
231        #[prost(message, tag = "3")]
232        GetFeaturesResp(super::GetFeaturesResp),
233        #[prost(message, tag = "4")]
234        GetHostedTablesResp(super::GetHostedTablesResp),
235        #[prost(message, tag = "37")]
236        RemoveHostedTablesUpdateResp(super::RemoveHostedTablesUpdateResp),
237        #[prost(message, tag = "5")]
238        TableMakePortResp(super::TableMakePortResp),
239        #[prost(message, tag = "6")]
240        TableMakeViewResp(super::TableMakeViewResp),
241        #[prost(message, tag = "7")]
242        TableSchemaResp(super::TableSchemaResp),
243        #[prost(message, tag = "8")]
244        TableSizeResp(super::TableSizeResp),
245        #[prost(message, tag = "9")]
246        TableValidateExprResp(super::TableValidateExprResp),
247        #[prost(message, tag = "10")]
248        ViewColumnPathsResp(super::ViewColumnPathsResp),
249        #[prost(message, tag = "11")]
250        ViewDeleteResp(super::ViewDeleteResp),
251        #[prost(message, tag = "12")]
252        ViewDimensionsResp(super::ViewDimensionsResp),
253        #[prost(message, tag = "13")]
254        ViewExpressionSchemaResp(super::ViewExpressionSchemaResp),
255        #[prost(message, tag = "14")]
256        ViewGetConfigResp(super::ViewGetConfigResp),
257        #[prost(message, tag = "15")]
258        ViewSchemaResp(super::ViewSchemaResp),
259        #[prost(message, tag = "16")]
260        ViewToArrowResp(super::ViewToArrowResp),
261        #[prost(message, tag = "17")]
262        ServerSystemInfoResp(super::ServerSystemInfoResp),
263        #[prost(message, tag = "18")]
264        ViewCollapseResp(super::ViewCollapseResp),
265        #[prost(message, tag = "19")]
266        ViewExpandResp(super::ViewExpandResp),
267        #[prost(message, tag = "20")]
268        ViewGetMinMaxResp(super::ViewGetMinMaxResp),
269        #[prost(message, tag = "21")]
270        ViewOnUpdateResp(super::ViewOnUpdateResp),
271        #[prost(message, tag = "22")]
272        ViewRemoveOnUpdateResp(super::ViewRemoveOnUpdateResp),
273        #[prost(message, tag = "23")]
274        ViewSetDepthResp(super::ViewSetDepthResp),
275        #[prost(message, tag = "24")]
276        ViewToColumnsStringResp(super::ViewToColumnsStringResp),
277        #[prost(message, tag = "25")]
278        ViewToCsvResp(super::ViewToCsvResp),
279        #[prost(message, tag = "26")]
280        ViewToRowsStringResp(super::ViewToRowsStringResp),
281        #[prost(message, tag = "36")]
282        ViewToNdjsonStringResp(super::ViewToNdjsonStringResp),
283        #[prost(message, tag = "27")]
284        MakeTableResp(super::MakeTableResp),
285        #[prost(message, tag = "28")]
286        TableDeleteResp(super::TableDeleteResp),
287        #[prost(message, tag = "29")]
288        TableOnDeleteResp(super::TableOnDeleteResp),
289        #[prost(message, tag = "30")]
290        TableRemoveDeleteResp(super::TableRemoveDeleteResp),
291        #[prost(message, tag = "31")]
292        TableRemoveResp(super::TableRemoveResp),
293        #[prost(message, tag = "32")]
294        TableReplaceResp(super::TableReplaceResp),
295        #[prost(message, tag = "33")]
296        TableUpdateResp(super::TableUpdateResp),
297        #[prost(message, tag = "34")]
298        ViewOnDeleteResp(super::ViewOnDeleteResp),
299        #[prost(message, tag = "35")]
300        ViewRemoveDeleteResp(super::ViewRemoveDeleteResp),
301        #[prost(message, tag = "38")]
302        MakeJoinTableResp(super::MakeJoinTableResp),
303        #[prost(message, tag = "50")]
304        ServerError(super::ServerError),
305    }
306}
307/// Informs the client of the feature set, e.g. what to expect in the
308/// `ViewConfig` message.
309#[derive(serde::Serialize)]
310#[allow(clippy::derive_partial_eq_without_eq)]
311#[derive(Clone, PartialEq, ::prost::Message)]
312pub struct GetFeaturesReq {}
313#[derive(serde::Serialize)]
314#[allow(clippy::derive_partial_eq_without_eq)]
315#[derive(Clone, PartialEq, ::prost::Message)]
316pub struct GetFeaturesResp {
317    #[prost(bool, tag = "1")]
318    pub group_by: bool,
319    #[prost(bool, tag = "2")]
320    pub split_by: bool,
321    #[prost(bool, tag = "3")]
322    pub expressions: bool,
323    #[prost(bool, tag = "4")]
324    pub on_update: bool,
325    #[prost(bool, tag = "5")]
326    pub sort: bool,
327    #[prost(map = "uint32, message", tag = "6")]
328    pub filter_ops: ::std::collections::HashMap<
329        u32,
330        get_features_resp::ColumnTypeOptions,
331    >,
332    #[prost(map = "uint32, message", tag = "7")]
333    pub aggregates: ::std::collections::HashMap<
334        u32,
335        get_features_resp::AggregateOptions,
336    >,
337    #[prost(enumeration = "GroupRollupMode", repeated, tag = "8")]
338    pub group_rollup_mode: ::prost::alloc::vec::Vec<i32>,
339    #[prost(map = "uint32, message", tag = "9")]
340    pub window_aggregates: ::std::collections::HashMap<
341        u32,
342        get_features_resp::WindowAggregateOptions,
343    >,
344    #[prost(bool, tag = "10")]
345    pub unordered: bool,
346    #[prost(enumeration = "SplitRollupMode", repeated, tag = "11")]
347    pub split_rollup_mode: ::prost::alloc::vec::Vec<i32>,
348}
349/// Nested message and enum types in `GetFeaturesResp`.
350pub mod get_features_resp {
351    #[derive(serde::Serialize)]
352    #[allow(clippy::derive_partial_eq_without_eq)]
353    #[derive(Clone, PartialEq, ::prost::Message)]
354    pub struct WindowAggregateOptions {
355        #[prost(message, repeated, tag = "1")]
356        pub options: ::prost::alloc::vec::Vec<super::WindowAggregateArgs>,
357    }
358    #[derive(serde::Serialize)]
359    #[allow(clippy::derive_partial_eq_without_eq)]
360    #[derive(Clone, PartialEq, ::prost::Message)]
361    pub struct ColumnTypeOptions {
362        #[prost(string, repeated, tag = "1")]
363        pub options: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
364    }
365    #[derive(serde::Serialize)]
366    #[allow(clippy::derive_partial_eq_without_eq)]
367    #[derive(Clone, PartialEq, ::prost::Message)]
368    pub struct AggregateOptions {
369        #[prost(message, repeated, tag = "1")]
370        pub aggregates: ::prost::alloc::vec::Vec<AggregateArgs>,
371    }
372    #[derive(serde::Serialize)]
373    #[allow(clippy::derive_partial_eq_without_eq)]
374    #[derive(Clone, PartialEq, ::prost::Message)]
375    pub struct AggregateArgs {
376        #[prost(string, tag = "1")]
377        pub name: ::prost::alloc::string::String,
378        #[prost(enumeration = "super::ColumnType", repeated, tag = "2")]
379        pub args: ::prost::alloc::vec::Vec<i32>,
380    }
381}
382#[derive(serde::Serialize)]
383#[allow(clippy::derive_partial_eq_without_eq)]
384#[derive(Clone, PartialEq, ::prost::Message)]
385pub struct WindowAggregateArgs {
386    #[prost(string, tag = "1")]
387    pub name: ::prost::alloc::string::String,
388    #[prost(string, repeated, tag = "2")]
389    pub frames: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
390    #[prost(bool, tag = "3")]
391    pub offset: bool,
392    #[prost(bool, tag = "4")]
393    pub alpha: bool,
394    #[prost(enumeration = "ColumnType", optional, tag = "5")]
395    pub result_type: ::core::option::Option<i32>,
396}
397/// `Client::get_hosted_tables`
398#[derive(serde::Serialize)]
399#[allow(clippy::derive_partial_eq_without_eq)]
400#[derive(Clone, PartialEq, ::prost::Message)]
401pub struct GetHostedTablesReq {
402    #[prost(bool, tag = "1")]
403    pub subscribe: bool,
404}
405#[derive(serde::Serialize)]
406#[allow(clippy::derive_partial_eq_without_eq)]
407#[derive(Clone, PartialEq, ::prost::Message)]
408pub struct GetHostedTablesResp {
409    #[prost(message, repeated, tag = "1")]
410    pub table_infos: ::prost::alloc::vec::Vec<HostedTable>,
411}
412#[derive(serde::Serialize)]
413#[allow(clippy::derive_partial_eq_without_eq)]
414#[derive(Clone, PartialEq, ::prost::Message)]
415pub struct HostedTable {
416    #[prost(string, tag = "1")]
417    pub entity_id: ::prost::alloc::string::String,
418    #[prost(string, optional, tag = "2")]
419    pub index: ::core::option::Option<::prost::alloc::string::String>,
420    #[prost(uint32, optional, tag = "3")]
421    pub limit: ::core::option::Option<u32>,
422}
423#[derive(serde::Serialize)]
424#[allow(clippy::derive_partial_eq_without_eq)]
425#[derive(Clone, PartialEq, ::prost::Message)]
426pub struct RemoveHostedTablesUpdateReq {
427    #[prost(uint32, tag = "1")]
428    pub id: u32,
429}
430#[derive(serde::Serialize)]
431#[allow(clippy::derive_partial_eq_without_eq)]
432#[derive(Clone, PartialEq, ::prost::Message)]
433pub struct RemoveHostedTablesUpdateResp {}
434/// `Table::size`
435#[derive(serde::Serialize)]
436#[allow(clippy::derive_partial_eq_without_eq)]
437#[derive(Clone, PartialEq, ::prost::Message)]
438pub struct TableSizeReq {}
439#[derive(serde::Serialize)]
440#[allow(clippy::derive_partial_eq_without_eq)]
441#[derive(Clone, PartialEq, ::prost::Message)]
442pub struct TableSizeResp {
443    #[prost(uint32, tag = "2")]
444    pub size: u32,
445}
446/// `Table::schema`
447#[derive(serde::Serialize)]
448#[allow(clippy::derive_partial_eq_without_eq)]
449#[derive(Clone, PartialEq, ::prost::Message)]
450pub struct TableSchemaReq {}
451#[derive(serde::Serialize)]
452#[allow(clippy::derive_partial_eq_without_eq)]
453#[derive(Clone, PartialEq, ::prost::Message)]
454pub struct TableSchemaResp {
455    #[prost(message, optional, tag = "1")]
456    pub schema: ::core::option::Option<Schema>,
457}
458/// `Table::validate_expressions`
459/// TODO: This should be just `validate()`
460#[derive(serde::Serialize)]
461#[allow(clippy::derive_partial_eq_without_eq)]
462#[derive(Clone, PartialEq, ::prost::Message)]
463pub struct TableValidateExprReq {
464    #[prost(map = "string, string", tag = "1")]
465    pub column_to_expr: ::std::collections::HashMap<
466        ::prost::alloc::string::String,
467        ::prost::alloc::string::String,
468    >,
469}
470#[derive(serde::Serialize)]
471#[derive(serde::Deserialize)]
472#[allow(clippy::derive_partial_eq_without_eq)]
473#[derive(Clone, PartialEq, ::prost::Message)]
474pub struct TableValidateExprResp {
475    #[prost(map = "string, enumeration(ColumnType)", tag = "1")]
476    pub expression_schema: ::std::collections::HashMap<
477        ::prost::alloc::string::String,
478        i32,
479    >,
480    #[prost(map = "string, message", tag = "2")]
481    pub errors: ::std::collections::HashMap<
482        ::prost::alloc::string::String,
483        table_validate_expr_resp::ExprValidationError,
484    >,
485    #[prost(map = "string, string", tag = "3")]
486    pub expression_alias: ::std::collections::HashMap<
487        ::prost::alloc::string::String,
488        ::prost::alloc::string::String,
489    >,
490}
491/// Nested message and enum types in `TableValidateExprResp`.
492pub mod table_validate_expr_resp {
493    #[derive(serde::Serialize)]
494    #[derive(serde::Deserialize)]
495    #[allow(clippy::derive_partial_eq_without_eq)]
496    #[derive(Clone, PartialEq, ::prost::Message)]
497    pub struct ExprValidationError {
498        #[prost(string, tag = "1")]
499        pub error_message: ::prost::alloc::string::String,
500        #[prost(uint32, tag = "2")]
501        pub line: u32,
502        #[prost(uint32, tag = "3")]
503        pub column: u32,
504    }
505}
506/// `Table::view`
507#[derive(serde::Serialize)]
508#[allow(clippy::derive_partial_eq_without_eq)]
509#[derive(Clone, PartialEq, ::prost::Message)]
510pub struct TableMakeViewReq {
511    #[prost(string, tag = "1")]
512    pub view_id: ::prost::alloc::string::String,
513    #[prost(message, optional, tag = "2")]
514    pub config: ::core::option::Option<ViewConfig>,
515}
516#[derive(serde::Serialize)]
517#[allow(clippy::derive_partial_eq_without_eq)]
518#[derive(Clone, PartialEq, ::prost::Message)]
519pub struct TableMakeViewResp {
520    #[prost(string, tag = "1")]
521    pub view_id: ::prost::alloc::string::String,
522}
523/// `View::schema`
524#[derive(serde::Serialize)]
525#[allow(clippy::derive_partial_eq_without_eq)]
526#[derive(Clone, PartialEq, ::prost::Message)]
527pub struct ViewSchemaReq {}
528#[derive(serde::Serialize)]
529#[allow(clippy::derive_partial_eq_without_eq)]
530#[derive(Clone, PartialEq, ::prost::Message)]
531pub struct ViewSchemaResp {
532    #[prost(map = "string, enumeration(ColumnType)", tag = "1")]
533    pub schema: ::std::collections::HashMap<::prost::alloc::string::String, i32>,
534}
535/// `View::dimensions`
536#[derive(serde::Serialize)]
537#[allow(clippy::derive_partial_eq_without_eq)]
538#[derive(Clone, PartialEq, ::prost::Message)]
539pub struct ViewDimensionsReq {}
540#[derive(serde::Serialize)]
541#[derive(serde::Deserialize)]
542#[allow(clippy::derive_partial_eq_without_eq)]
543#[derive(Clone, PartialEq, ::prost::Message)]
544pub struct ViewDimensionsResp {
545    #[prost(uint32, tag = "1")]
546    pub num_table_rows: u32,
547    #[prost(uint32, tag = "2")]
548    pub num_table_columns: u32,
549    #[prost(uint32, tag = "3")]
550    pub num_view_rows: u32,
551    #[prost(uint32, tag = "4")]
552    pub num_view_columns: u32,
553}
554/// `View::get_config`
555#[derive(serde::Serialize)]
556#[allow(clippy::derive_partial_eq_without_eq)]
557#[derive(Clone, PartialEq, ::prost::Message)]
558pub struct ViewGetConfigReq {}
559#[derive(serde::Serialize)]
560#[allow(clippy::derive_partial_eq_without_eq)]
561#[derive(Clone, PartialEq, ::prost::Message)]
562pub struct ViewGetConfigResp {
563    #[prost(message, optional, tag = "1")]
564    pub config: ::core::option::Option<ViewConfig>,
565}
566/// `Client::table`.
567#[derive(serde::Serialize)]
568#[allow(clippy::derive_partial_eq_without_eq)]
569#[derive(Clone, PartialEq, ::prost::Message)]
570pub struct MakeTableReq {
571    #[prost(message, optional, tag = "1")]
572    pub data: ::core::option::Option<MakeTableData>,
573    #[prost(message, optional, tag = "2")]
574    pub options: ::core::option::Option<make_table_req::MakeTableOptions>,
575}
576/// Nested message and enum types in `MakeTableReq`.
577pub mod make_table_req {
578    #[derive(serde::Serialize)]
579    #[allow(clippy::derive_partial_eq_without_eq)]
580    #[derive(Clone, PartialEq, ::prost::Message)]
581    pub struct MakeTableOptions {
582        /// Back this Table's canonical data with the on-disk storage backend
583        /// (memory-mapped file on native; OPFS on WASM) instead of memory.
584        /// Orthogonal to `make_table_type`, so it is a standalone field.
585        #[prost(bool, optional, tag = "3")]
586        pub page_to_disk: ::core::option::Option<bool>,
587        #[prost(enumeration = "super::ListFlatten", optional, tag = "4")]
588        pub list_flatten: ::core::option::Option<i32>,
589        #[prost(oneof = "make_table_options::MakeTableType", tags = "1, 2")]
590        pub make_table_type: ::core::option::Option<make_table_options::MakeTableType>,
591    }
592    /// Nested message and enum types in `MakeTableOptions`.
593    pub mod make_table_options {
594        #[derive(serde::Serialize)]
595        #[allow(clippy::derive_partial_eq_without_eq)]
596        #[derive(Clone, PartialEq, ::prost::Oneof)]
597        pub enum MakeTableType {
598            #[prost(string, tag = "1")]
599            MakeIndexTable(::prost::alloc::string::String),
600            #[prost(uint32, tag = "2")]
601            MakeLimitTable(u32),
602        }
603    }
604}
605#[derive(serde::Serialize)]
606#[allow(clippy::derive_partial_eq_without_eq)]
607#[derive(Clone, PartialEq, ::prost::Message)]
608pub struct MakeTableResp {}
609/// `Client::join` — create a read-only table from a JOIN of two tables.
610#[derive(serde::Serialize)]
611#[allow(clippy::derive_partial_eq_without_eq)]
612#[derive(Clone, PartialEq, ::prost::Message)]
613pub struct MakeJoinTableReq {
614    #[prost(string, tag = "1")]
615    pub left_table_id: ::prost::alloc::string::String,
616    #[prost(string, tag = "2")]
617    pub right_table_id: ::prost::alloc::string::String,
618    #[prost(string, tag = "3")]
619    pub on_column: ::prost::alloc::string::String,
620    #[prost(enumeration = "JoinType", tag = "4")]
621    pub join_type: i32,
622    #[prost(string, tag = "5")]
623    pub right_on_column: ::prost::alloc::string::String,
624}
625#[derive(serde::Serialize)]
626#[allow(clippy::derive_partial_eq_without_eq)]
627#[derive(Clone, PartialEq, ::prost::Message)]
628pub struct MakeJoinTableResp {}
629/// `Table::delete`
630#[derive(serde::Serialize)]
631#[allow(clippy::derive_partial_eq_without_eq)]
632#[derive(Clone, PartialEq, ::prost::Message)]
633pub struct TableDeleteReq {
634    #[prost(bool, tag = "1")]
635    pub is_immediate: bool,
636}
637#[derive(serde::Serialize)]
638#[allow(clippy::derive_partial_eq_without_eq)]
639#[derive(Clone, PartialEq, ::prost::Message)]
640pub struct TableDeleteResp {}
641/// `Table::on_delete`
642#[derive(serde::Serialize)]
643#[allow(clippy::derive_partial_eq_without_eq)]
644#[derive(Clone, PartialEq, ::prost::Message)]
645pub struct TableOnDeleteReq {}
646#[derive(serde::Serialize)]
647#[allow(clippy::derive_partial_eq_without_eq)]
648#[derive(Clone, PartialEq, ::prost::Message)]
649pub struct TableOnDeleteResp {}
650/// `Table::make_port`
651#[derive(serde::Serialize)]
652#[allow(clippy::derive_partial_eq_without_eq)]
653#[derive(Clone, PartialEq, ::prost::Message)]
654pub struct TableMakePortReq {}
655#[derive(serde::Serialize)]
656#[allow(clippy::derive_partial_eq_without_eq)]
657#[derive(Clone, PartialEq, ::prost::Message)]
658pub struct TableMakePortResp {
659    #[prost(uint32, tag = "1")]
660    pub port_id: u32,
661}
662/// `Table::remove_delete`
663#[derive(serde::Serialize)]
664#[allow(clippy::derive_partial_eq_without_eq)]
665#[derive(Clone, PartialEq, ::prost::Message)]
666pub struct TableRemoveDeleteReq {
667    #[prost(uint32, tag = "1")]
668    pub id: u32,
669}
670#[derive(serde::Serialize)]
671#[allow(clippy::derive_partial_eq_without_eq)]
672#[derive(Clone, PartialEq, ::prost::Message)]
673pub struct TableRemoveDeleteResp {}
674/// `Table::update`
675#[derive(serde::Serialize)]
676#[allow(clippy::derive_partial_eq_without_eq)]
677#[derive(Clone, PartialEq, ::prost::Message)]
678pub struct TableUpdateReq {
679    #[prost(message, optional, tag = "1")]
680    pub data: ::core::option::Option<MakeTableData>,
681    #[prost(uint32, tag = "2")]
682    pub port_id: u32,
683}
684#[derive(serde::Serialize)]
685#[allow(clippy::derive_partial_eq_without_eq)]
686#[derive(Clone, PartialEq, ::prost::Message)]
687pub struct TableUpdateResp {}
688/// `Table::replace`
689#[derive(serde::Serialize)]
690#[allow(clippy::derive_partial_eq_without_eq)]
691#[derive(Clone, PartialEq, ::prost::Message)]
692pub struct TableReplaceReq {
693    #[prost(message, optional, tag = "1")]
694    pub data: ::core::option::Option<MakeTableData>,
695}
696#[derive(serde::Serialize)]
697#[allow(clippy::derive_partial_eq_without_eq)]
698#[derive(Clone, PartialEq, ::prost::Message)]
699pub struct TableReplaceResp {}
700/// `Table::remove`
701#[derive(serde::Serialize)]
702#[allow(clippy::derive_partial_eq_without_eq)]
703#[derive(Clone, PartialEq, ::prost::Message)]
704pub struct TableRemoveReq {
705    #[prost(message, optional, tag = "1")]
706    pub data: ::core::option::Option<MakeTableData>,
707}
708#[derive(serde::Serialize)]
709#[allow(clippy::derive_partial_eq_without_eq)]
710#[derive(Clone, PartialEq, ::prost::Message)]
711pub struct TableRemoveResp {}
712#[derive(serde::Serialize)]
713#[allow(clippy::derive_partial_eq_without_eq)]
714#[derive(Clone, PartialEq, ::prost::Message)]
715pub struct ViewOnUpdateReq {
716    #[prost(enumeration = "view_on_update_req::Mode", optional, tag = "1")]
717    pub mode: ::core::option::Option<i32>,
718}
719/// Nested message and enum types in `ViewOnUpdateReq`.
720pub mod view_on_update_req {
721    #[derive(serde::Serialize)]
722    #[derive(
723        Clone,
724        Copy,
725        Debug,
726        PartialEq,
727        Eq,
728        Hash,
729        PartialOrd,
730        Ord,
731        ::prost::Enumeration
732    )]
733    #[repr(i32)]
734    pub enum Mode {
735        Row = 0,
736    }
737    impl Mode {
738        /// String value of the enum field names used in the ProtoBuf definition.
739        ///
740        /// The values are not transformed in any way and thus are considered stable
741        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
742        pub fn as_str_name(&self) -> &'static str {
743            match self {
744                Mode::Row => "ROW",
745            }
746        }
747        /// Creates an enum from field names used in the ProtoBuf definition.
748        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
749            match value {
750                "ROW" => Some(Self::Row),
751                _ => None,
752            }
753        }
754    }
755}
756#[derive(ts_rs::TS)]
757#[derive(serde::Serialize)]
758#[allow(clippy::derive_partial_eq_without_eq)]
759#[derive(Clone, PartialEq, ::prost::Message)]
760pub struct ViewOnUpdateResp {
761    #[prost(bytes = "vec", optional, tag = "1")]
762    #[ts(as = "Vec::<u8>")]
763    #[serde(with = "serde_bytes")]
764    pub delta: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
765    #[prost(uint32, tag = "2")]
766    pub port_id: u32,
767}
768#[derive(serde::Serialize)]
769#[allow(clippy::derive_partial_eq_without_eq)]
770#[derive(Clone, PartialEq, ::prost::Message)]
771pub struct ViewOnDeleteReq {}
772#[derive(serde::Serialize)]
773#[allow(clippy::derive_partial_eq_without_eq)]
774#[derive(Clone, PartialEq, ::prost::Message)]
775pub struct ViewOnDeleteResp {}
776#[derive(serde::Serialize)]
777#[allow(clippy::derive_partial_eq_without_eq)]
778#[derive(Clone, PartialEq, ::prost::Message)]
779pub struct ViewRemoveDeleteReq {
780    #[prost(uint32, tag = "1")]
781    pub id: u32,
782}
783#[derive(serde::Serialize)]
784#[allow(clippy::derive_partial_eq_without_eq)]
785#[derive(Clone, PartialEq, ::prost::Message)]
786pub struct ViewRemoveDeleteResp {}
787#[derive(serde::Serialize)]
788#[allow(clippy::derive_partial_eq_without_eq)]
789#[derive(Clone, PartialEq, ::prost::Message)]
790pub struct ViewToColumnsStringReq {
791    #[prost(message, optional, tag = "1")]
792    pub viewport: ::core::option::Option<ViewPort>,
793    #[prost(bool, optional, tag = "2")]
794    pub id: ::core::option::Option<bool>,
795    #[prost(bool, optional, tag = "3")]
796    pub index: ::core::option::Option<bool>,
797    #[prost(bool, optional, tag = "4")]
798    pub formatted: ::core::option::Option<bool>,
799}
800#[derive(serde::Serialize)]
801#[allow(clippy::derive_partial_eq_without_eq)]
802#[derive(Clone, PartialEq, ::prost::Message)]
803pub struct ViewToColumnsStringResp {
804    #[prost(string, tag = "1")]
805    pub json_string: ::prost::alloc::string::String,
806}
807#[derive(serde::Serialize)]
808#[allow(clippy::derive_partial_eq_without_eq)]
809#[derive(Clone, PartialEq, ::prost::Message)]
810pub struct ViewToRowsStringReq {
811    #[prost(message, optional, tag = "1")]
812    pub viewport: ::core::option::Option<ViewPort>,
813    #[prost(bool, optional, tag = "2")]
814    pub id: ::core::option::Option<bool>,
815    #[prost(bool, optional, tag = "3")]
816    pub index: ::core::option::Option<bool>,
817    #[prost(bool, optional, tag = "4")]
818    pub formatted: ::core::option::Option<bool>,
819}
820#[derive(serde::Serialize)]
821#[allow(clippy::derive_partial_eq_without_eq)]
822#[derive(Clone, PartialEq, ::prost::Message)]
823pub struct ViewToRowsStringResp {
824    #[prost(string, tag = "1")]
825    pub json_string: ::prost::alloc::string::String,
826}
827#[derive(serde::Serialize)]
828#[allow(clippy::derive_partial_eq_without_eq)]
829#[derive(Clone, PartialEq, ::prost::Message)]
830pub struct ViewToNdjsonStringReq {
831    #[prost(message, optional, tag = "1")]
832    pub viewport: ::core::option::Option<ViewPort>,
833    #[prost(bool, optional, tag = "2")]
834    pub id: ::core::option::Option<bool>,
835    #[prost(bool, optional, tag = "3")]
836    pub index: ::core::option::Option<bool>,
837    #[prost(bool, optional, tag = "4")]
838    pub formatted: ::core::option::Option<bool>,
839}
840#[derive(serde::Serialize)]
841#[allow(clippy::derive_partial_eq_without_eq)]
842#[derive(Clone, PartialEq, ::prost::Message)]
843pub struct ViewToNdjsonStringResp {
844    #[prost(string, tag = "1")]
845    pub ndjson_string: ::prost::alloc::string::String,
846}
847#[derive(serde::Serialize)]
848#[allow(clippy::derive_partial_eq_without_eq)]
849#[derive(Clone, PartialEq, ::prost::Message)]
850pub struct ViewToArrowReq {
851    #[prost(message, optional, tag = "1")]
852    pub viewport: ::core::option::Option<ViewPort>,
853    #[prost(string, optional, tag = "2")]
854    pub compression: ::core::option::Option<::prost::alloc::string::String>,
855}
856#[derive(serde::Serialize)]
857#[allow(clippy::derive_partial_eq_without_eq)]
858#[derive(Clone, PartialEq, ::prost::Message)]
859pub struct ViewToArrowResp {
860    #[prost(bytes = "vec", tag = "1")]
861    #[serde(skip)]
862    pub arrow: ::prost::alloc::vec::Vec<u8>,
863}
864#[derive(serde::Serialize)]
865#[allow(clippy::derive_partial_eq_without_eq)]
866#[derive(Clone, PartialEq, ::prost::Message)]
867pub struct ViewColumnPathsReq {
868    #[prost(uint32, optional, tag = "1")]
869    pub start_col: ::core::option::Option<u32>,
870    #[prost(uint32, optional, tag = "2")]
871    pub end_col: ::core::option::Option<u32>,
872}
873#[derive(serde::Serialize)]
874#[allow(clippy::derive_partial_eq_without_eq)]
875#[derive(Clone, PartialEq, ::prost::Message)]
876pub struct ViewColumnPathsResp {
877    /// repeated ColumnPath paths = 1;
878    #[prost(string, repeated, tag = "1")]
879    pub paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
880}
881#[derive(serde::Serialize)]
882#[allow(clippy::derive_partial_eq_without_eq)]
883#[derive(Clone, PartialEq, ::prost::Message)]
884pub struct ViewDeleteReq {}
885#[derive(serde::Serialize)]
886#[allow(clippy::derive_partial_eq_without_eq)]
887#[derive(Clone, PartialEq, ::prost::Message)]
888pub struct ViewDeleteResp {}
889#[derive(serde::Serialize)]
890#[allow(clippy::derive_partial_eq_without_eq)]
891#[derive(Clone, PartialEq, ::prost::Message)]
892pub struct ViewGetMinMaxReq {
893    #[prost(string, tag = "1")]
894    pub column_name: ::prost::alloc::string::String,
895}
896#[derive(serde::Serialize)]
897#[allow(clippy::derive_partial_eq_without_eq)]
898#[derive(Clone, PartialEq, ::prost::Message)]
899pub struct ViewGetMinMaxResp {
900    #[prost(message, optional, tag = "1")]
901    pub min: ::core::option::Option<Scalar>,
902    #[prost(message, optional, tag = "2")]
903    pub max: ::core::option::Option<Scalar>,
904}
905#[derive(serde::Serialize)]
906#[allow(clippy::derive_partial_eq_without_eq)]
907#[derive(Clone, PartialEq, ::prost::Message)]
908pub struct ViewExpressionSchemaReq {}
909#[derive(serde::Serialize)]
910#[allow(clippy::derive_partial_eq_without_eq)]
911#[derive(Clone, PartialEq, ::prost::Message)]
912pub struct ViewExpressionSchemaResp {
913    #[prost(map = "string, enumeration(ColumnType)", tag = "1")]
914    pub schema: ::std::collections::HashMap<::prost::alloc::string::String, i32>,
915}
916#[derive(serde::Serialize)]
917#[allow(clippy::derive_partial_eq_without_eq)]
918#[derive(Clone, PartialEq, ::prost::Message)]
919pub struct ViewToCsvReq {
920    #[prost(message, optional, tag = "1")]
921    pub viewport: ::core::option::Option<ViewPort>,
922}
923#[derive(serde::Serialize)]
924#[allow(clippy::derive_partial_eq_without_eq)]
925#[derive(Clone, PartialEq, ::prost::Message)]
926pub struct ViewToCsvResp {
927    #[prost(string, tag = "1")]
928    pub csv: ::prost::alloc::string::String,
929}
930#[derive(serde::Serialize)]
931#[allow(clippy::derive_partial_eq_without_eq)]
932#[derive(Clone, PartialEq, ::prost::Message)]
933pub struct ViewRemoveOnUpdateReq {
934    #[prost(uint32, tag = "1")]
935    pub id: u32,
936}
937#[derive(serde::Serialize)]
938#[allow(clippy::derive_partial_eq_without_eq)]
939#[derive(Clone, PartialEq, ::prost::Message)]
940pub struct ViewRemoveOnUpdateResp {}
941#[derive(serde::Serialize)]
942#[allow(clippy::derive_partial_eq_without_eq)]
943#[derive(Clone, PartialEq, ::prost::Message)]
944pub struct ViewCollapseReq {
945    #[prost(uint32, tag = "1")]
946    pub row_index: u32,
947}
948#[derive(serde::Serialize)]
949#[allow(clippy::derive_partial_eq_without_eq)]
950#[derive(Clone, PartialEq, ::prost::Message)]
951pub struct ViewCollapseResp {
952    #[prost(uint32, tag = "1")]
953    pub num_changed: u32,
954}
955#[derive(serde::Serialize)]
956#[allow(clippy::derive_partial_eq_without_eq)]
957#[derive(Clone, PartialEq, ::prost::Message)]
958pub struct ViewExpandReq {
959    #[prost(uint32, tag = "1")]
960    pub row_index: u32,
961}
962#[derive(serde::Serialize)]
963#[allow(clippy::derive_partial_eq_without_eq)]
964#[derive(Clone, PartialEq, ::prost::Message)]
965pub struct ViewExpandResp {
966    #[prost(uint32, tag = "1")]
967    pub num_changed: u32,
968}
969/// `View::set_depth`
970#[derive(serde::Serialize)]
971#[allow(clippy::derive_partial_eq_without_eq)]
972#[derive(Clone, PartialEq, ::prost::Message)]
973pub struct ViewSetDepthReq {
974    #[prost(uint32, tag = "1")]
975    pub depth: u32,
976}
977#[derive(serde::Serialize)]
978#[allow(clippy::derive_partial_eq_without_eq)]
979#[derive(Clone, PartialEq, ::prost::Message)]
980pub struct ViewSetDepthResp {}
981#[derive(serde::Serialize)]
982#[allow(clippy::derive_partial_eq_without_eq)]
983#[derive(Clone, PartialEq, ::prost::Message)]
984pub struct ServerSystemInfoReq {}
985#[derive(serde::Serialize)]
986#[allow(clippy::derive_partial_eq_without_eq)]
987#[derive(Clone, PartialEq, ::prost::Message)]
988pub struct ServerSystemInfoResp {
989    #[prost(uint64, tag = "1")]
990    pub heap_size: u64,
991    #[prost(uint64, tag = "2")]
992    pub used_size: u64,
993    #[prost(uint32, tag = "3")]
994    pub cpu_time: u32,
995    #[prost(uint32, tag = "4")]
996    pub cpu_time_epoch: u32,
997}
998#[derive(serde::Serialize)]
999#[allow(clippy::derive_partial_eq_without_eq)]
1000#[derive(Clone, PartialEq, ::prost::Message)]
1001pub struct WindowSpec {
1002    #[prost(string, tag = "2")]
1003    pub source: ::prost::alloc::string::String,
1004    /// The aggregate, in the data model's own vocabulary - see
1005    /// `GetFeaturesResp.WindowAggregateArgs`. A string rather than an enum so
1006    /// that a `View` can carry an op the built-in engine has never heard of,
1007    /// e.g. kdb+'s `mdev`.
1008    #[prost(string, tag = "3")]
1009    pub op: ::prost::alloc::string::String,
1010    #[prost(string, repeated, tag = "4")]
1011    pub partition_by: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1012    #[prost(message, optional, tag = "5")]
1013    pub order_by: ::core::option::Option<window_spec::Order>,
1014    #[prost(uint32, optional, tag = "9")]
1015    pub offset: ::core::option::Option<u32>,
1016    #[prost(double, optional, tag = "10")]
1017    pub alpha: ::core::option::Option<f64>,
1018    #[prost(oneof = "window_spec::Frame", tags = "6, 7, 8")]
1019    pub frame: ::core::option::Option<window_spec::Frame>,
1020}
1021/// Nested message and enum types in `WindowSpec`.
1022pub mod window_spec {
1023    #[derive(serde::Serialize)]
1024    #[allow(clippy::derive_partial_eq_without_eq)]
1025    #[derive(Clone, PartialEq, ::prost::Message)]
1026    pub struct Order {
1027        #[prost(string, tag = "1")]
1028        pub column: ::prost::alloc::string::String,
1029        #[prost(bool, tag = "2")]
1030        pub desc: bool,
1031    }
1032    #[derive(serde::Serialize)]
1033    #[allow(clippy::derive_partial_eq_without_eq)]
1034    #[derive(Clone, PartialEq, ::prost::Oneof)]
1035    pub enum Frame {
1036        #[prost(uint32, tag = "6")]
1037        Rows(u32),
1038        #[prost(double, tag = "7")]
1039        Range(f64),
1040        #[prost(enumeration = "::prost_types::NullValue", tag = "8")]
1041        Cumulative(i32),
1042    }
1043}
1044#[derive(serde::Serialize)]
1045#[allow(clippy::derive_partial_eq_without_eq)]
1046#[derive(Clone, PartialEq, ::prost::Message)]
1047pub struct ViewConfig {
1048    #[prost(string, repeated, tag = "1")]
1049    pub group_by: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1050    #[prost(string, repeated, tag = "2")]
1051    pub split_by: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1052    #[prost(message, optional, tag = "3")]
1053    pub columns: ::core::option::Option<ColumnsUpdate>,
1054    #[prost(message, repeated, tag = "4")]
1055    pub filter: ::prost::alloc::vec::Vec<view_config::Filter>,
1056    #[prost(message, repeated, tag = "5")]
1057    pub sort: ::prost::alloc::vec::Vec<view_config::Sort>,
1058    #[prost(map = "string, string", tag = "6")]
1059    pub expressions: ::std::collections::HashMap<
1060        ::prost::alloc::string::String,
1061        ::prost::alloc::string::String,
1062    >,
1063    #[prost(map = "string, message", tag = "7")]
1064    pub aggregates: ::std::collections::HashMap<
1065        ::prost::alloc::string::String,
1066        view_config::AggList,
1067    >,
1068    #[prost(enumeration = "view_config::FilterReducer", tag = "8")]
1069    pub filter_op: i32,
1070    #[prost(uint32, optional, tag = "9")]
1071    pub group_by_depth: ::core::option::Option<u32>,
1072    #[prost(enumeration = "GroupRollupMode", optional, tag = "10")]
1073    pub group_rollup_mode: ::core::option::Option<i32>,
1074    #[prost(map = "string, message", tag = "11")]
1075    pub windows: ::std::collections::HashMap<::prost::alloc::string::String, WindowSpec>,
1076    #[prost(enumeration = "SplitRollupMode", optional, tag = "12")]
1077    pub split_rollup_mode: ::core::option::Option<i32>,
1078}
1079/// Nested message and enum types in `ViewConfig`.
1080pub mod view_config {
1081    #[derive(serde::Serialize)]
1082    #[allow(clippy::derive_partial_eq_without_eq)]
1083    #[derive(Clone, PartialEq, ::prost::Message)]
1084    pub struct AggList {
1085        #[prost(string, repeated, tag = "1")]
1086        pub aggregations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1087    }
1088    #[derive(serde::Serialize)]
1089    #[allow(clippy::derive_partial_eq_without_eq)]
1090    #[derive(Clone, PartialEq, ::prost::Message)]
1091    pub struct Sort {
1092        #[prost(string, tag = "1")]
1093        pub column: ::prost::alloc::string::String,
1094        #[prost(enumeration = "super::SortOp", tag = "2")]
1095        pub op: i32,
1096    }
1097    #[derive(serde::Serialize)]
1098    #[allow(clippy::derive_partial_eq_without_eq)]
1099    #[derive(Clone, PartialEq, ::prost::Message)]
1100    pub struct Filter {
1101        #[prost(string, tag = "1")]
1102        pub column: ::prost::alloc::string::String,
1103        #[prost(string, tag = "2")]
1104        pub op: ::prost::alloc::string::String,
1105        #[prost(message, repeated, tag = "3")]
1106        pub value: ::prost::alloc::vec::Vec<super::Scalar>,
1107    }
1108    #[derive(serde::Serialize)]
1109    #[derive(
1110        Clone,
1111        Copy,
1112        Debug,
1113        PartialEq,
1114        Eq,
1115        Hash,
1116        PartialOrd,
1117        Ord,
1118        ::prost::Enumeration
1119    )]
1120    #[repr(i32)]
1121    pub enum FilterReducer {
1122        And = 0,
1123        Or = 1,
1124    }
1125    impl FilterReducer {
1126        /// String value of the enum field names used in the ProtoBuf definition.
1127        ///
1128        /// The values are not transformed in any way and thus are considered stable
1129        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1130        pub fn as_str_name(&self) -> &'static str {
1131            match self {
1132                FilterReducer::And => "AND",
1133                FilterReducer::Or => "OR",
1134            }
1135        }
1136        /// Creates an enum from field names used in the ProtoBuf definition.
1137        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1138            match value {
1139                "AND" => Some(Self::And),
1140                "OR" => Some(Self::Or),
1141                _ => None,
1142            }
1143        }
1144    }
1145}
1146#[derive(serde::Serialize)]
1147#[allow(clippy::derive_partial_eq_without_eq)]
1148#[derive(Clone, PartialEq, ::prost::Message)]
1149pub struct ColumnsUpdate {
1150    #[prost(oneof = "columns_update::OptColumns", tags = "1, 2")]
1151    pub opt_columns: ::core::option::Option<columns_update::OptColumns>,
1152}
1153/// Nested message and enum types in `ColumnsUpdate`.
1154pub mod columns_update {
1155    #[derive(serde::Serialize)]
1156    #[allow(clippy::derive_partial_eq_without_eq)]
1157    #[derive(Clone, PartialEq, ::prost::Message)]
1158    pub struct Columns {
1159        #[prost(string, repeated, tag = "1")]
1160        pub columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1161    }
1162    #[derive(serde::Serialize)]
1163    #[allow(clippy::derive_partial_eq_without_eq)]
1164    #[derive(Clone, PartialEq, ::prost::Oneof)]
1165    pub enum OptColumns {
1166        #[prost(enumeration = "::prost_types::NullValue", tag = "1")]
1167        DefaultColumns(i32),
1168        #[prost(message, tag = "2")]
1169        Columns(Columns),
1170    }
1171}
1172#[derive(serde::Serialize)]
1173#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1174#[repr(i32)]
1175pub enum StatusCode {
1176    ServerError = 0,
1177    ViewNotFound = 1,
1178    TransportError = 2,
1179}
1180impl StatusCode {
1181    /// String value of the enum field names used in the ProtoBuf definition.
1182    ///
1183    /// The values are not transformed in any way and thus are considered stable
1184    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1185    pub fn as_str_name(&self) -> &'static str {
1186        match self {
1187            StatusCode::ServerError => "SERVER_ERROR",
1188            StatusCode::ViewNotFound => "VIEW_NOT_FOUND",
1189            StatusCode::TransportError => "TRANSPORT_ERROR",
1190        }
1191    }
1192    /// Creates an enum from field names used in the ProtoBuf definition.
1193    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1194        match value {
1195            "SERVER_ERROR" => Some(Self::ServerError),
1196            "VIEW_NOT_FOUND" => Some(Self::ViewNotFound),
1197            "TRANSPORT_ERROR" => Some(Self::TransportError),
1198            _ => None,
1199        }
1200    }
1201}
1202/// View types
1203#[derive(ts_rs::TS)]
1204#[derive(serde::Serialize)]
1205#[derive(serde::Deserialize)]
1206#[serde(rename_all = "snake_case")]
1207#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1208#[repr(i32)]
1209pub enum ColumnType {
1210    String = 0,
1211    Date = 1,
1212    Datetime = 2,
1213    Integer = 3,
1214    Float = 4,
1215    Boolean = 5,
1216}
1217impl ColumnType {
1218    /// String value of the enum field names used in the ProtoBuf definition.
1219    ///
1220    /// The values are not transformed in any way and thus are considered stable
1221    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1222    pub fn as_str_name(&self) -> &'static str {
1223        match self {
1224            ColumnType::String => "STRING",
1225            ColumnType::Date => "DATE",
1226            ColumnType::Datetime => "DATETIME",
1227            ColumnType::Integer => "INTEGER",
1228            ColumnType::Float => "FLOAT",
1229            ColumnType::Boolean => "BOOLEAN",
1230        }
1231    }
1232    /// Creates an enum from field names used in the ProtoBuf definition.
1233    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1234        match value {
1235            "STRING" => Some(Self::String),
1236            "DATE" => Some(Self::Date),
1237            "DATETIME" => Some(Self::Datetime),
1238            "INTEGER" => Some(Self::Integer),
1239            "FLOAT" => Some(Self::Float),
1240            "BOOLEAN" => Some(Self::Boolean),
1241            _ => None,
1242        }
1243    }
1244}
1245/// TODO This belongs in features
1246#[derive(serde::Serialize)]
1247#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1248#[repr(i32)]
1249pub enum SortOp {
1250    SortNone = 0,
1251    SortAsc = 1,
1252    SortDesc = 2,
1253    SortColAsc = 3,
1254    SortColDesc = 4,
1255    SortAscAbs = 5,
1256    SortDescAbs = 6,
1257    SortColAscAbs = 7,
1258    SortColDescAbs = 8,
1259}
1260impl SortOp {
1261    /// String value of the enum field names used in the ProtoBuf definition.
1262    ///
1263    /// The values are not transformed in any way and thus are considered stable
1264    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1265    pub fn as_str_name(&self) -> &'static str {
1266        match self {
1267            SortOp::SortNone => "SORT_NONE",
1268            SortOp::SortAsc => "SORT_ASC",
1269            SortOp::SortDesc => "SORT_DESC",
1270            SortOp::SortColAsc => "SORT_COL_ASC",
1271            SortOp::SortColDesc => "SORT_COL_DESC",
1272            SortOp::SortAscAbs => "SORT_ASC_ABS",
1273            SortOp::SortDescAbs => "SORT_DESC_ABS",
1274            SortOp::SortColAscAbs => "SORT_COL_ASC_ABS",
1275            SortOp::SortColDescAbs => "SORT_COL_DESC_ABS",
1276        }
1277    }
1278    /// Creates an enum from field names used in the ProtoBuf definition.
1279    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1280        match value {
1281            "SORT_NONE" => Some(Self::SortNone),
1282            "SORT_ASC" => Some(Self::SortAsc),
1283            "SORT_DESC" => Some(Self::SortDesc),
1284            "SORT_COL_ASC" => Some(Self::SortColAsc),
1285            "SORT_COL_DESC" => Some(Self::SortColDesc),
1286            "SORT_ASC_ABS" => Some(Self::SortAscAbs),
1287            "SORT_DESC_ABS" => Some(Self::SortDescAbs),
1288            "SORT_COL_ASC_ABS" => Some(Self::SortColAscAbs),
1289            "SORT_COL_DESC_ABS" => Some(Self::SortColDescAbs),
1290            _ => None,
1291        }
1292    }
1293}
1294#[derive(serde::Serialize)]
1295#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1296#[repr(i32)]
1297pub enum GroupRollupMode {
1298    Rollup = 0,
1299    Flat = 1,
1300    Total = 2,
1301}
1302impl GroupRollupMode {
1303    /// String value of the enum field names used in the ProtoBuf definition.
1304    ///
1305    /// The values are not transformed in any way and thus are considered stable
1306    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1307    pub fn as_str_name(&self) -> &'static str {
1308        match self {
1309            GroupRollupMode::Rollup => "ROLLUP",
1310            GroupRollupMode::Flat => "FLAT",
1311            GroupRollupMode::Total => "TOTAL",
1312        }
1313    }
1314    /// Creates an enum from field names used in the ProtoBuf definition.
1315    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1316        match value {
1317            "ROLLUP" => Some(Self::Rollup),
1318            "FLAT" => Some(Self::Flat),
1319            "TOTAL" => Some(Self::Total),
1320            _ => None,
1321        }
1322    }
1323}
1324/// The `split_by` corollary to `GroupRollupMode`. `FLAT` (the wire default)
1325/// is the historical behavior - only full-depth split combinations are
1326/// emitted as columns. `ROLLUP` additionally emits grand-total and subtotal
1327/// column groups in pre-order ("totals before"). Enum value names are
1328/// prefixed because proto enum values share their parent scope with
1329/// `GroupRollupMode`'s.
1330#[derive(serde::Serialize)]
1331#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1332#[repr(i32)]
1333pub enum SplitRollupMode {
1334    Flat = 0,
1335    Rollup = 1,
1336}
1337impl SplitRollupMode {
1338    /// String value of the enum field names used in the ProtoBuf definition.
1339    ///
1340    /// The values are not transformed in any way and thus are considered stable
1341    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1342    pub fn as_str_name(&self) -> &'static str {
1343        match self {
1344            SplitRollupMode::Flat => "SPLIT_ROLLUP_MODE_FLAT",
1345            SplitRollupMode::Rollup => "SPLIT_ROLLUP_MODE_ROLLUP",
1346        }
1347    }
1348    /// Creates an enum from field names used in the ProtoBuf definition.
1349    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1350        match value {
1351            "SPLIT_ROLLUP_MODE_FLAT" => Some(Self::Flat),
1352            "SPLIT_ROLLUP_MODE_ROLLUP" => Some(Self::Rollup),
1353            _ => None,
1354        }
1355    }
1356}
1357#[derive(serde::Deserialize, ts_rs::TS)]
1358#[serde(rename_all = "snake_case")]
1359#[derive(serde::Serialize)]
1360#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1361#[repr(i32)]
1362pub enum ListFlatten {
1363    Zip = 0,
1364    Cartesian = 1,
1365    Stringify = 2,
1366}
1367impl ListFlatten {
1368    /// String value of the enum field names used in the ProtoBuf definition.
1369    ///
1370    /// The values are not transformed in any way and thus are considered stable
1371    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1372    pub fn as_str_name(&self) -> &'static str {
1373        match self {
1374            ListFlatten::Zip => "LIST_FLATTEN_ZIP",
1375            ListFlatten::Cartesian => "LIST_FLATTEN_CARTESIAN",
1376            ListFlatten::Stringify => "LIST_FLATTEN_STRINGIFY",
1377        }
1378    }
1379    /// Creates an enum from field names used in the ProtoBuf definition.
1380    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1381        match value {
1382            "LIST_FLATTEN_ZIP" => Some(Self::Zip),
1383            "LIST_FLATTEN_CARTESIAN" => Some(Self::Cartesian),
1384            "LIST_FLATTEN_STRINGIFY" => Some(Self::Stringify),
1385            _ => None,
1386        }
1387    }
1388}
1389#[derive(serde::Deserialize, ts_rs::TS)]
1390#[serde(rename_all = "snake_case")]
1391#[derive(serde::Serialize)]
1392#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1393#[repr(i32)]
1394pub enum JoinType {
1395    Inner = 0,
1396    Left = 1,
1397    Outer = 2,
1398}
1399impl JoinType {
1400    /// String value of the enum field names used in the ProtoBuf definition.
1401    ///
1402    /// The values are not transformed in any way and thus are considered stable
1403    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1404    pub fn as_str_name(&self) -> &'static str {
1405        match self {
1406            JoinType::Inner => "INNER",
1407            JoinType::Left => "LEFT",
1408            JoinType::Outer => "OUTER",
1409        }
1410    }
1411    /// Creates an enum from field names used in the ProtoBuf definition.
1412    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1413        match value {
1414            "INNER" => Some(Self::Inner),
1415            "LEFT" => Some(Self::Left),
1416            "OUTER" => Some(Self::Outer),
1417            _ => None,
1418        }
1419    }
1420}