risingwave_pb/
plan_common.rs

1// This file is @generated by prost-build.
2/// Field is a column in the streaming or batch plan.
3#[derive(prost_helpers::AnyPB)]
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct Field {
6    #[prost(message, optional, tag = "1")]
7    pub data_type: ::core::option::Option<super::data::DataType>,
8    #[prost(string, tag = "2")]
9    pub name: ::prost::alloc::string::String,
10}
11#[derive(prost_helpers::AnyPB)]
12#[derive(Eq, Hash)]
13#[derive(Clone, PartialEq, ::prost::Message)]
14#[prost(skip_debug)]
15pub struct ColumnDesc {
16    #[prost(message, optional, tag = "1")]
17    pub column_type: ::core::option::Option<super::data::DataType>,
18    #[prost(int32, tag = "2")]
19    pub column_id: i32,
20    /// we store the column name in column desc now just for debug, but in future
21    /// we should store it in ColumnCatalog but not here
22    #[prost(string, tag = "3")]
23    pub name: ::prost::alloc::string::String,
24    /// This field is used to store the description set by the `comment on` clause.
25    #[prost(string, optional, tag = "8")]
26    pub description: ::core::option::Option<::prost::alloc::string::String>,
27    /// deprecated, use AdditionalColumn instead, keep for compatibility with v1.6.x
28    #[prost(enumeration = "AdditionalColumnType", tag = "9")]
29    pub additional_column_type: i32,
30    #[prost(enumeration = "ColumnDescVersion", tag = "10")]
31    pub version: i32,
32    #[prost(message, optional, tag = "11")]
33    pub additional_column: ::core::option::Option<AdditionalColumn>,
34    #[prost(bool, optional, tag = "12")]
35    pub nullable: ::core::option::Option<bool>,
36    /// Optional description for the generated column or default value.
37    #[prost(oneof = "column_desc::GeneratedOrDefaultColumn", tags = "6, 7")]
38    pub generated_or_default_column: ::core::option::Option<
39        column_desc::GeneratedOrDefaultColumn,
40    >,
41}
42/// Nested message and enum types in `ColumnDesc`.
43pub mod column_desc {
44    /// Optional description for the generated column or default value.
45    #[derive(prost_helpers::AnyPB)]
46    #[derive(Eq, Hash)]
47    #[derive(Clone, PartialEq, ::prost::Oneof)]
48    #[prost(skip_debug)]
49    pub enum GeneratedOrDefaultColumn {
50        #[prost(message, tag = "6")]
51        GeneratedColumn(super::GeneratedColumnDesc),
52        #[prost(message, tag = "7")]
53        DefaultColumn(super::DefaultColumnDesc),
54    }
55}
56#[derive(prost_helpers::AnyPB)]
57#[derive(Clone, PartialEq, ::prost::Message)]
58pub struct ColumnCatalog {
59    #[prost(message, optional, tag = "1")]
60    pub column_desc: ::core::option::Option<ColumnDesc>,
61    #[prost(bool, tag = "2")]
62    pub is_hidden: bool,
63}
64#[derive(prost_helpers::AnyPB)]
65#[derive(Eq, Hash)]
66#[derive(Clone, PartialEq, ::prost::Message)]
67pub struct GeneratedColumnDesc {
68    #[prost(message, optional, tag = "1")]
69    pub expr: ::core::option::Option<super::expr::ExprNode>,
70}
71#[derive(prost_helpers::AnyPB)]
72#[derive(Eq, Hash)]
73#[derive(Clone, PartialEq, ::prost::Message)]
74pub struct DefaultColumnDesc {
75    /// Expression of the `DEFAULT`. Used when inserting new records.
76    #[prost(message, optional, tag = "1")]
77    pub expr: ::core::option::Option<super::expr::ExprNode>,
78    /// Evaluated value of the expression at the time of the table creation or the
79    /// column addition. Used when filling the default value for the records where
80    /// the column is missing.
81    #[prost(message, optional, tag = "2")]
82    pub snapshot_value: ::core::option::Option<super::data::Datum>,
83}
84#[derive(prost_helpers::AnyPB)]
85#[derive(Clone, PartialEq, ::prost::Message)]
86pub struct StorageTableDesc {
87    #[prost(uint32, tag = "1")]
88    pub table_id: u32,
89    #[prost(message, repeated, tag = "2")]
90    pub columns: ::prost::alloc::vec::Vec<ColumnDesc>,
91    /// TODO: may refactor primary key representations
92    #[prost(message, repeated, tag = "3")]
93    pub pk: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
94    #[prost(uint32, repeated, tag = "4")]
95    pub dist_key_in_pk_indices: ::prost::alloc::vec::Vec<u32>,
96    #[prost(uint32, repeated, tag = "6")]
97    pub value_indices: ::prost::alloc::vec::Vec<u32>,
98    #[prost(uint32, tag = "7")]
99    pub read_prefix_len_hint: u32,
100    /// Whether the table is versioned. If `true`, column-aware row encoding will
101    /// be used to be compatible with schema changes.
102    #[prost(bool, tag = "8")]
103    pub versioned: bool,
104    #[prost(uint32, repeated, tag = "9")]
105    pub stream_key: ::prost::alloc::vec::Vec<u32>,
106    #[prost(uint32, optional, tag = "10")]
107    pub vnode_col_idx_in_pk: ::core::option::Option<u32>,
108    #[prost(uint32, optional, tag = "11")]
109    pub retention_seconds: ::core::option::Option<u32>,
110    /// Total vnode count of the table.
111    ///
112    /// Can be unset if the table is created in older versions where variable vnode count is not
113    /// supported, in which case a default value of 256 (or 1 for singleton) should be used.
114    /// Use `VnodeCountCompat::vnode_count` to access it.
115    #[prost(uint32, optional, tag = "12")]
116    pub maybe_vnode_count: ::core::option::Option<u32>,
117}
118#[derive(prost_helpers::AnyPB)]
119#[derive(Clone, PartialEq, ::prost::Message)]
120pub struct VectorIndexReaderDesc {
121    /// The table_id of the vector index to search.
122    #[prost(uint32, tag = "1")]
123    pub table_id: u32,
124    /// The columns of the vector index info.
125    #[prost(message, repeated, tag = "2")]
126    pub info_column_desc: ::prost::alloc::vec::Vec<ColumnDesc>,
127    #[prost(uint32, repeated, tag = "3")]
128    pub info_output_indices: ::prost::alloc::vec::Vec<u32>,
129    /// Whether or not to include the distance column in the output
130    #[prost(bool, tag = "4")]
131    pub include_distance: bool,
132    /// The number of nearest neighbors to return.
133    #[prost(uint32, tag = "5")]
134    pub top_n: u32,
135    /// The distance metric to use for the search.
136    #[prost(enumeration = "super::common::DistanceType", tag = "6")]
137    pub distance_type: i32,
138    /// The ef_search used to query hnsw index
139    #[prost(uint32, tag = "7")]
140    pub hnsw_ef_search: u32,
141}
142/// Represents a table in external database for CDC scenario
143#[derive(prost_helpers::AnyPB)]
144#[derive(Eq, Hash)]
145#[derive(Clone, PartialEq, ::prost::Message)]
146pub struct ExternalTableDesc {
147    #[prost(uint32, tag = "1")]
148    pub table_id: u32,
149    #[prost(message, repeated, tag = "2")]
150    pub columns: ::prost::alloc::vec::Vec<ColumnDesc>,
151    /// TODO: may refactor primary key representations
152    #[prost(message, repeated, tag = "3")]
153    pub pk: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
154    #[prost(string, tag = "4")]
155    pub table_name: ::prost::alloc::string::String,
156    #[prost(uint32, repeated, tag = "5")]
157    pub stream_key: ::prost::alloc::vec::Vec<u32>,
158    #[prost(btree_map = "string, string", tag = "6")]
159    pub connect_properties: ::prost::alloc::collections::BTreeMap<
160        ::prost::alloc::string::String,
161        ::prost::alloc::string::String,
162    >,
163    /// upstream cdc source job id
164    #[prost(uint32, tag = "7")]
165    pub source_id: u32,
166    #[prost(btree_map = "string, message", tag = "8")]
167    pub secret_refs: ::prost::alloc::collections::BTreeMap<
168        ::prost::alloc::string::String,
169        super::secret::SecretRef,
170    >,
171}
172#[derive(prost_helpers::AnyPB)]
173#[derive(Eq, Hash)]
174#[derive(Clone, Copy, PartialEq, ::prost::Message)]
175pub struct AsOfJoinDesc {
176    /// The index of the right side's as of column.
177    #[prost(uint32, tag = "1")]
178    pub right_idx: u32,
179    /// The index of the left side's as of column.
180    #[prost(uint32, tag = "2")]
181    pub left_idx: u32,
182    /// The type of the inequality.
183    #[prost(enumeration = "AsOfJoinInequalityType", tag = "3")]
184    pub inequality_type: i32,
185}
186#[derive(prost_helpers::AnyPB)]
187#[derive(Clone, PartialEq, ::prost::Message)]
188pub struct IndexAndExpr {
189    #[prost(uint32, tag = "1")]
190    pub index: u32,
191    #[prost(message, optional, tag = "2")]
192    pub expr: ::core::option::Option<super::expr::ExprNode>,
193}
194#[derive(prost_helpers::AnyPB)]
195#[derive(Clone, PartialEq, ::prost::Message)]
196pub struct DefaultColumns {
197    #[prost(message, repeated, tag = "1")]
198    pub default_columns: ::prost::alloc::vec::Vec<IndexAndExpr>,
199}
200/// The cardinality of the output rows of a plan node. Bounds are inclusive.
201#[derive(prost_helpers::AnyPB)]
202#[derive(Eq, Hash)]
203#[derive(Clone, Copy, PartialEq, ::prost::Message)]
204pub struct Cardinality {
205    #[prost(uint64, tag = "1")]
206    pub lo: u64,
207    /// Unbounded if not set.
208    #[prost(uint64, optional, tag = "2")]
209    pub hi: ::core::option::Option<u64>,
210}
211/// Provide statement-local context, e.g. session info like time zone, for execution.
212#[derive(prost_helpers::AnyPB)]
213#[derive(Clone, PartialEq, ::prost::Message)]
214pub struct ExprContext {
215    #[prost(string, tag = "1")]
216    pub time_zone: ::prost::alloc::string::String,
217    #[prost(bool, tag = "2")]
218    pub strict_mode: bool,
219}
220#[derive(prost_helpers::AnyPB)]
221#[derive(Eq, Hash)]
222#[derive(Clone, Copy, PartialEq, ::prost::Message)]
223pub struct AdditionalColumnKey {}
224#[derive(prost_helpers::AnyPB)]
225#[derive(Eq, Hash)]
226#[derive(Clone, Copy, PartialEq, ::prost::Message)]
227pub struct AdditionalColumnTimestamp {}
228#[derive(prost_helpers::AnyPB)]
229#[derive(Eq, Hash)]
230#[derive(Clone, Copy, PartialEq, ::prost::Message)]
231pub struct AdditionalColumnPartition {}
232#[derive(prost_helpers::AnyPB)]
233#[derive(Eq, Hash)]
234#[derive(Clone, Copy, PartialEq, ::prost::Message)]
235pub struct AdditionalColumnOffset {}
236#[derive(prost_helpers::AnyPB)]
237#[derive(Eq, Hash)]
238#[derive(Clone, Copy, PartialEq, ::prost::Message)]
239pub struct AdditionalColumnFilename {}
240#[derive(prost_helpers::AnyPB)]
241#[derive(Eq, Hash)]
242#[derive(Clone, PartialEq, ::prost::Message)]
243pub struct AdditionalColumnHeader {
244    #[prost(string, tag = "1")]
245    pub inner_field: ::prost::alloc::string::String,
246    #[prost(message, optional, tag = "2")]
247    pub data_type: ::core::option::Option<super::data::DataType>,
248}
249/// metadata column for cdc table
250#[derive(prost_helpers::AnyPB)]
251#[derive(Eq, Hash)]
252#[derive(Clone, Copy, PartialEq, ::prost::Message)]
253pub struct AdditionalDatabaseName {}
254#[derive(prost_helpers::AnyPB)]
255#[derive(Eq, Hash)]
256#[derive(Clone, Copy, PartialEq, ::prost::Message)]
257pub struct AdditionalSchemaName {}
258#[derive(prost_helpers::AnyPB)]
259#[derive(Eq, Hash)]
260#[derive(Clone, Copy, PartialEq, ::prost::Message)]
261pub struct AdditionalTableName {}
262#[derive(prost_helpers::AnyPB)]
263#[derive(Eq, Hash)]
264#[derive(Clone, Copy, PartialEq, ::prost::Message)]
265pub struct AdditionalCollectionName {}
266#[derive(prost_helpers::AnyPB)]
267#[derive(Eq, Hash)]
268#[derive(Clone, Copy, PartialEq, ::prost::Message)]
269pub struct AdditionalColumnPayload {}
270/// this type means we read all headers as a whole
271#[derive(prost_helpers::AnyPB)]
272#[derive(Eq, Hash)]
273#[derive(Clone, Copy, PartialEq, ::prost::Message)]
274pub struct AdditionalColumnHeaders {}
275#[derive(prost_helpers::AnyPB)]
276#[derive(Eq, Hash)]
277#[derive(Clone, Copy, PartialEq, ::prost::Message)]
278pub struct AdditionalSubject {}
279#[derive(prost_helpers::AnyPB)]
280#[derive(Eq, Hash)]
281#[derive(Clone, PartialEq, ::prost::Message)]
282pub struct AdditionalColumn {
283    #[prost(
284        oneof = "additional_column::ColumnType",
285        tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13"
286    )]
287    pub column_type: ::core::option::Option<additional_column::ColumnType>,
288}
289/// Nested message and enum types in `AdditionalColumn`.
290pub mod additional_column {
291    #[derive(prost_helpers::AnyPB)]
292    #[derive(Eq, Hash)]
293    #[derive(Clone, PartialEq, ::prost::Oneof)]
294    pub enum ColumnType {
295        #[prost(message, tag = "1")]
296        Key(super::AdditionalColumnKey),
297        #[prost(message, tag = "2")]
298        Timestamp(super::AdditionalColumnTimestamp),
299        #[prost(message, tag = "3")]
300        Partition(super::AdditionalColumnPartition),
301        #[prost(message, tag = "4")]
302        Offset(super::AdditionalColumnOffset),
303        #[prost(message, tag = "5")]
304        HeaderInner(super::AdditionalColumnHeader),
305        #[prost(message, tag = "6")]
306        Filename(super::AdditionalColumnFilename),
307        #[prost(message, tag = "7")]
308        Headers(super::AdditionalColumnHeaders),
309        #[prost(message, tag = "8")]
310        DatabaseName(super::AdditionalDatabaseName),
311        #[prost(message, tag = "9")]
312        SchemaName(super::AdditionalSchemaName),
313        #[prost(message, tag = "10")]
314        TableName(super::AdditionalTableName),
315        #[prost(message, tag = "11")]
316        CollectionName(super::AdditionalCollectionName),
317        #[prost(message, tag = "12")]
318        Payload(super::AdditionalColumnPayload),
319        #[prost(message, tag = "13")]
320        Subject(super::AdditionalSubject),
321    }
322}
323#[derive(prost_helpers::AnyPB)]
324#[derive(prost_helpers::Version)]
325#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
326#[repr(i32)]
327pub enum ColumnDescVersion {
328    Unspecified = 0,
329    /// Introduced in <https://github.com/risingwavelabs/risingwave/pull/13707#discussion_r1429947537,>
330    /// in case DEFAULT_KEY_COLUMN_NAME changes
331    Pr13707 = 1,
332}
333impl ColumnDescVersion {
334    /// String value of the enum field names used in the ProtoBuf definition.
335    ///
336    /// The values are not transformed in any way and thus are considered stable
337    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
338    pub fn as_str_name(&self) -> &'static str {
339        match self {
340            Self::Unspecified => "COLUMN_DESC_VERSION_UNSPECIFIED",
341            Self::Pr13707 => "COLUMN_DESC_VERSION_PR_13707",
342        }
343    }
344    /// Creates an enum from field names used in the ProtoBuf definition.
345    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
346        match value {
347            "COLUMN_DESC_VERSION_UNSPECIFIED" => Some(Self::Unspecified),
348            "COLUMN_DESC_VERSION_PR_13707" => Some(Self::Pr13707),
349            _ => None,
350        }
351    }
352}
353#[derive(prost_helpers::AnyPB)]
354#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
355#[repr(i32)]
356pub enum JoinType {
357    /// Note that it comes from Calcite's JoinRelType.
358    /// DO NOT HAVE direction for SEMI and ANTI now.
359    Unspecified = 0,
360    Inner = 1,
361    LeftOuter = 2,
362    RightOuter = 3,
363    FullOuter = 4,
364    LeftSemi = 5,
365    LeftAnti = 6,
366    RightSemi = 7,
367    RightAnti = 8,
368    AsofInner = 9,
369    AsofLeftOuter = 10,
370}
371impl JoinType {
372    /// String value of the enum field names used in the ProtoBuf definition.
373    ///
374    /// The values are not transformed in any way and thus are considered stable
375    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
376    pub fn as_str_name(&self) -> &'static str {
377        match self {
378            Self::Unspecified => "JOIN_TYPE_UNSPECIFIED",
379            Self::Inner => "JOIN_TYPE_INNER",
380            Self::LeftOuter => "JOIN_TYPE_LEFT_OUTER",
381            Self::RightOuter => "JOIN_TYPE_RIGHT_OUTER",
382            Self::FullOuter => "JOIN_TYPE_FULL_OUTER",
383            Self::LeftSemi => "JOIN_TYPE_LEFT_SEMI",
384            Self::LeftAnti => "JOIN_TYPE_LEFT_ANTI",
385            Self::RightSemi => "JOIN_TYPE_RIGHT_SEMI",
386            Self::RightAnti => "JOIN_TYPE_RIGHT_ANTI",
387            Self::AsofInner => "JOIN_TYPE_ASOF_INNER",
388            Self::AsofLeftOuter => "JOIN_TYPE_ASOF_LEFT_OUTER",
389        }
390    }
391    /// Creates an enum from field names used in the ProtoBuf definition.
392    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
393        match value {
394            "JOIN_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
395            "JOIN_TYPE_INNER" => Some(Self::Inner),
396            "JOIN_TYPE_LEFT_OUTER" => Some(Self::LeftOuter),
397            "JOIN_TYPE_RIGHT_OUTER" => Some(Self::RightOuter),
398            "JOIN_TYPE_FULL_OUTER" => Some(Self::FullOuter),
399            "JOIN_TYPE_LEFT_SEMI" => Some(Self::LeftSemi),
400            "JOIN_TYPE_LEFT_ANTI" => Some(Self::LeftAnti),
401            "JOIN_TYPE_RIGHT_SEMI" => Some(Self::RightSemi),
402            "JOIN_TYPE_RIGHT_ANTI" => Some(Self::RightAnti),
403            "JOIN_TYPE_ASOF_INNER" => Some(Self::AsofInner),
404            "JOIN_TYPE_ASOF_LEFT_OUTER" => Some(Self::AsofLeftOuter),
405            _ => None,
406        }
407    }
408}
409#[derive(prost_helpers::AnyPB)]
410#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
411#[repr(i32)]
412pub enum AsOfJoinType {
413    Unspecified = 0,
414    Inner = 1,
415    LeftOuter = 2,
416}
417impl AsOfJoinType {
418    /// String value of the enum field names used in the ProtoBuf definition.
419    ///
420    /// The values are not transformed in any way and thus are considered stable
421    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
422    pub fn as_str_name(&self) -> &'static str {
423        match self {
424            Self::Unspecified => "AS_OF_JOIN_TYPE_UNSPECIFIED",
425            Self::Inner => "AS_OF_JOIN_TYPE_INNER",
426            Self::LeftOuter => "AS_OF_JOIN_TYPE_LEFT_OUTER",
427        }
428    }
429    /// Creates an enum from field names used in the ProtoBuf definition.
430    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
431        match value {
432            "AS_OF_JOIN_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
433            "AS_OF_JOIN_TYPE_INNER" => Some(Self::Inner),
434            "AS_OF_JOIN_TYPE_LEFT_OUTER" => Some(Self::LeftOuter),
435            _ => None,
436        }
437    }
438}
439#[derive(prost_helpers::AnyPB)]
440#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
441#[repr(i32)]
442pub enum AsOfJoinInequalityType {
443    AsOfInequalityTypeUnspecified = 0,
444    AsOfInequalityTypeGt = 1,
445    AsOfInequalityTypeGe = 2,
446    AsOfInequalityTypeLt = 3,
447    AsOfInequalityTypeLe = 4,
448}
449impl AsOfJoinInequalityType {
450    /// String value of the enum field names used in the ProtoBuf definition.
451    ///
452    /// The values are not transformed in any way and thus are considered stable
453    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
454    pub fn as_str_name(&self) -> &'static str {
455        match self {
456            Self::AsOfInequalityTypeUnspecified => "AS_OF_INEQUALITY_TYPE_UNSPECIFIED",
457            Self::AsOfInequalityTypeGt => "AS_OF_INEQUALITY_TYPE_GT",
458            Self::AsOfInequalityTypeGe => "AS_OF_INEQUALITY_TYPE_GE",
459            Self::AsOfInequalityTypeLt => "AS_OF_INEQUALITY_TYPE_LT",
460            Self::AsOfInequalityTypeLe => "AS_OF_INEQUALITY_TYPE_LE",
461        }
462    }
463    /// Creates an enum from field names used in the ProtoBuf definition.
464    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
465        match value {
466            "AS_OF_INEQUALITY_TYPE_UNSPECIFIED" => {
467                Some(Self::AsOfInequalityTypeUnspecified)
468            }
469            "AS_OF_INEQUALITY_TYPE_GT" => Some(Self::AsOfInequalityTypeGt),
470            "AS_OF_INEQUALITY_TYPE_GE" => Some(Self::AsOfInequalityTypeGe),
471            "AS_OF_INEQUALITY_TYPE_LT" => Some(Self::AsOfInequalityTypeLt),
472            "AS_OF_INEQUALITY_TYPE_LE" => Some(Self::AsOfInequalityTypeLe),
473            _ => None,
474        }
475    }
476}
477/// <https://github.com/tokio-rs/prost/issues/80>
478#[derive(prost_helpers::AnyPB)]
479#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
480#[repr(i32)]
481pub enum FormatType {
482    Unspecified = 0,
483    Native = 1,
484    Debezium = 2,
485    DebeziumMongo = 3,
486    Maxwell = 4,
487    Canal = 5,
488    Upsert = 6,
489    Plain = 7,
490    None = 8,
491}
492impl FormatType {
493    /// String value of the enum field names used in the ProtoBuf definition.
494    ///
495    /// The values are not transformed in any way and thus are considered stable
496    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
497    pub fn as_str_name(&self) -> &'static str {
498        match self {
499            Self::Unspecified => "FORMAT_TYPE_UNSPECIFIED",
500            Self::Native => "FORMAT_TYPE_NATIVE",
501            Self::Debezium => "FORMAT_TYPE_DEBEZIUM",
502            Self::DebeziumMongo => "FORMAT_TYPE_DEBEZIUM_MONGO",
503            Self::Maxwell => "FORMAT_TYPE_MAXWELL",
504            Self::Canal => "FORMAT_TYPE_CANAL",
505            Self::Upsert => "FORMAT_TYPE_UPSERT",
506            Self::Plain => "FORMAT_TYPE_PLAIN",
507            Self::None => "FORMAT_TYPE_NONE",
508        }
509    }
510    /// Creates an enum from field names used in the ProtoBuf definition.
511    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
512        match value {
513            "FORMAT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
514            "FORMAT_TYPE_NATIVE" => Some(Self::Native),
515            "FORMAT_TYPE_DEBEZIUM" => Some(Self::Debezium),
516            "FORMAT_TYPE_DEBEZIUM_MONGO" => Some(Self::DebeziumMongo),
517            "FORMAT_TYPE_MAXWELL" => Some(Self::Maxwell),
518            "FORMAT_TYPE_CANAL" => Some(Self::Canal),
519            "FORMAT_TYPE_UPSERT" => Some(Self::Upsert),
520            "FORMAT_TYPE_PLAIN" => Some(Self::Plain),
521            "FORMAT_TYPE_NONE" => Some(Self::None),
522            _ => None,
523        }
524    }
525}
526#[derive(prost_helpers::AnyPB)]
527#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
528#[repr(i32)]
529pub enum EncodeType {
530    Unspecified = 0,
531    Native = 1,
532    Avro = 2,
533    Csv = 3,
534    Protobuf = 4,
535    Json = 5,
536    Bytes = 6,
537    Template = 7,
538    None = 8,
539    Text = 9,
540    Parquet = 10,
541}
542impl EncodeType {
543    /// String value of the enum field names used in the ProtoBuf definition.
544    ///
545    /// The values are not transformed in any way and thus are considered stable
546    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
547    pub fn as_str_name(&self) -> &'static str {
548        match self {
549            Self::Unspecified => "ENCODE_TYPE_UNSPECIFIED",
550            Self::Native => "ENCODE_TYPE_NATIVE",
551            Self::Avro => "ENCODE_TYPE_AVRO",
552            Self::Csv => "ENCODE_TYPE_CSV",
553            Self::Protobuf => "ENCODE_TYPE_PROTOBUF",
554            Self::Json => "ENCODE_TYPE_JSON",
555            Self::Bytes => "ENCODE_TYPE_BYTES",
556            Self::Template => "ENCODE_TYPE_TEMPLATE",
557            Self::None => "ENCODE_TYPE_NONE",
558            Self::Text => "ENCODE_TYPE_TEXT",
559            Self::Parquet => "ENCODE_TYPE_PARQUET",
560        }
561    }
562    /// Creates an enum from field names used in the ProtoBuf definition.
563    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
564        match value {
565            "ENCODE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
566            "ENCODE_TYPE_NATIVE" => Some(Self::Native),
567            "ENCODE_TYPE_AVRO" => Some(Self::Avro),
568            "ENCODE_TYPE_CSV" => Some(Self::Csv),
569            "ENCODE_TYPE_PROTOBUF" => Some(Self::Protobuf),
570            "ENCODE_TYPE_JSON" => Some(Self::Json),
571            "ENCODE_TYPE_BYTES" => Some(Self::Bytes),
572            "ENCODE_TYPE_TEMPLATE" => Some(Self::Template),
573            "ENCODE_TYPE_NONE" => Some(Self::None),
574            "ENCODE_TYPE_TEXT" => Some(Self::Text),
575            "ENCODE_TYPE_PARQUET" => Some(Self::Parquet),
576            _ => None,
577        }
578    }
579}
580#[derive(prost_helpers::AnyPB)]
581#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
582#[repr(i32)]
583pub enum RowFormatType {
584    RowUnspecified = 0,
585    Json = 1,
586    Protobuf = 2,
587    DebeziumJson = 3,
588    Avro = 4,
589    Maxwell = 5,
590    CanalJson = 6,
591    Csv = 7,
592    Native = 8,
593    DebeziumAvro = 9,
594    UpsertJson = 10,
595    UpsertAvro = 11,
596    DebeziumMongoJson = 12,
597    Bytes = 13,
598}
599impl RowFormatType {
600    /// String value of the enum field names used in the ProtoBuf definition.
601    ///
602    /// The values are not transformed in any way and thus are considered stable
603    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
604    pub fn as_str_name(&self) -> &'static str {
605        match self {
606            Self::RowUnspecified => "ROW_UNSPECIFIED",
607            Self::Json => "JSON",
608            Self::Protobuf => "PROTOBUF",
609            Self::DebeziumJson => "DEBEZIUM_JSON",
610            Self::Avro => "AVRO",
611            Self::Maxwell => "MAXWELL",
612            Self::CanalJson => "CANAL_JSON",
613            Self::Csv => "CSV",
614            Self::Native => "NATIVE",
615            Self::DebeziumAvro => "DEBEZIUM_AVRO",
616            Self::UpsertJson => "UPSERT_JSON",
617            Self::UpsertAvro => "UPSERT_AVRO",
618            Self::DebeziumMongoJson => "DEBEZIUM_MONGO_JSON",
619            Self::Bytes => "BYTES",
620        }
621    }
622    /// Creates an enum from field names used in the ProtoBuf definition.
623    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
624        match value {
625            "ROW_UNSPECIFIED" => Some(Self::RowUnspecified),
626            "JSON" => Some(Self::Json),
627            "PROTOBUF" => Some(Self::Protobuf),
628            "DEBEZIUM_JSON" => Some(Self::DebeziumJson),
629            "AVRO" => Some(Self::Avro),
630            "MAXWELL" => Some(Self::Maxwell),
631            "CANAL_JSON" => Some(Self::CanalJson),
632            "CSV" => Some(Self::Csv),
633            "NATIVE" => Some(Self::Native),
634            "DEBEZIUM_AVRO" => Some(Self::DebeziumAvro),
635            "UPSERT_JSON" => Some(Self::UpsertJson),
636            "UPSERT_AVRO" => Some(Self::UpsertAvro),
637            "DEBEZIUM_MONGO_JSON" => Some(Self::DebeziumMongoJson),
638            "BYTES" => Some(Self::Bytes),
639            _ => None,
640        }
641    }
642}
643#[derive(prost_helpers::AnyPB)]
644#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
645#[repr(i32)]
646pub enum AdditionalColumnType {
647    Unspecified = 0,
648    Key = 1,
649    Timestamp = 2,
650    Partition = 3,
651    Offset = 4,
652    Header = 5,
653    Filename = 6,
654    Normal = 7,
655    Payload = 8,
656}
657impl AdditionalColumnType {
658    /// String value of the enum field names used in the ProtoBuf definition.
659    ///
660    /// The values are not transformed in any way and thus are considered stable
661    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
662    pub fn as_str_name(&self) -> &'static str {
663        match self {
664            Self::Unspecified => "ADDITIONAL_COLUMN_TYPE_UNSPECIFIED",
665            Self::Key => "ADDITIONAL_COLUMN_TYPE_KEY",
666            Self::Timestamp => "ADDITIONAL_COLUMN_TYPE_TIMESTAMP",
667            Self::Partition => "ADDITIONAL_COLUMN_TYPE_PARTITION",
668            Self::Offset => "ADDITIONAL_COLUMN_TYPE_OFFSET",
669            Self::Header => "ADDITIONAL_COLUMN_TYPE_HEADER",
670            Self::Filename => "ADDITIONAL_COLUMN_TYPE_FILENAME",
671            Self::Normal => "ADDITIONAL_COLUMN_TYPE_NORMAL",
672            Self::Payload => "ADDITIONAL_COLUMN_TYPE_PAYLOAD",
673        }
674    }
675    /// Creates an enum from field names used in the ProtoBuf definition.
676    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
677        match value {
678            "ADDITIONAL_COLUMN_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
679            "ADDITIONAL_COLUMN_TYPE_KEY" => Some(Self::Key),
680            "ADDITIONAL_COLUMN_TYPE_TIMESTAMP" => Some(Self::Timestamp),
681            "ADDITIONAL_COLUMN_TYPE_PARTITION" => Some(Self::Partition),
682            "ADDITIONAL_COLUMN_TYPE_OFFSET" => Some(Self::Offset),
683            "ADDITIONAL_COLUMN_TYPE_HEADER" => Some(Self::Header),
684            "ADDITIONAL_COLUMN_TYPE_FILENAME" => Some(Self::Filename),
685            "ADDITIONAL_COLUMN_TYPE_NORMAL" => Some(Self::Normal),
686            "ADDITIONAL_COLUMN_TYPE_PAYLOAD" => Some(Self::Payload),
687            _ => None,
688        }
689    }
690}