risingwave_pb/
catalog.rs

1// This file is @generated by prost-build.
2/// A mapping of column indices.
3#[derive(prost_helpers::AnyPB)]
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct ColIndexMapping {
6    /// The size of the target space.
7    #[prost(uint64, tag = "1")]
8    pub target_size: u64,
9    /// Each subscript is mapped to the corresponding element.
10    /// For those not mapped, the value will be negative.
11    #[prost(int64, repeated, tag = "2")]
12    pub map: ::prost::alloc::vec::Vec<i64>,
13}
14#[derive(prost_helpers::AnyPB)]
15#[derive(Eq, Hash)]
16#[derive(Clone, PartialEq, ::prost::Message)]
17pub struct WatermarkDesc {
18    /// The column idx the watermark is on
19    #[prost(uint32, tag = "1")]
20    pub watermark_idx: u32,
21    /// The expression to calculate the watermark value.
22    #[prost(message, optional, tag = "2")]
23    pub expr: ::core::option::Option<super::expr::ExprNode>,
24}
25#[derive(prost_helpers::AnyPB)]
26#[derive(Eq, Hash)]
27#[derive(Clone, PartialEq, ::prost::Message)]
28pub struct StreamSourceInfo {
29    /// deprecated
30    #[prost(enumeration = "super::plan_common::RowFormatType", tag = "1")]
31    pub row_format: i32,
32    #[prost(string, tag = "2")]
33    pub row_schema_location: ::prost::alloc::string::String,
34    /// This means *use **confluent** schema registry* and is `false` for **aws glue** schema registry.
35    /// Eventually we will deprecate it and rely on `enum SchemaLocation` derived from `format_encode_options` below.
36    /// * schema.location     false
37    /// * schema.registry     true
38    /// * aws.glue.schema_arn false
39    #[prost(bool, tag = "3")]
40    pub use_schema_registry: bool,
41    #[prost(string, tag = "4")]
42    pub proto_message_name: ::prost::alloc::string::String,
43    #[prost(int32, tag = "5")]
44    pub csv_delimiter: i32,
45    #[prost(bool, tag = "6")]
46    pub csv_has_header: bool,
47    #[prost(enumeration = "super::plan_common::FormatType", tag = "8")]
48    pub format: i32,
49    #[prost(enumeration = "super::plan_common::EncodeType", tag = "9")]
50    pub row_encode: i32,
51    #[prost(enumeration = "SchemaRegistryNameStrategy", tag = "10")]
52    pub name_strategy: i32,
53    #[prost(string, optional, tag = "11")]
54    pub key_message_name: ::core::option::Option<::prost::alloc::string::String>,
55    #[prost(message, optional, tag = "12")]
56    pub external_table: ::core::option::Option<super::plan_common::ExternalTableDesc>,
57    /// **This field should now be called `is_shared`.** Not renamed for backwards
58    /// compatibility.
59    ///
60    /// Whether the stream source is a shared source (it has a streaming job).
61    /// This is related with [RFC: Reusable Source
62    /// Executor](<https://github.com/risingwavelabs/rfcs/pull/72>).
63    ///
64    /// Currently, the following sources can be shared:
65    ///
66    /// - Direct CDC sources (mysql & postgresql & sqlserver)
67    /// - MQ sources (Kafka)
68    #[prost(bool, tag = "13")]
69    pub cdc_source_job: bool,
70    /// Only used when `cdc_source_job` is `true`.
71    /// If `false`, `requires_singleton` will be set in the stream plan.
72    ///
73    /// - Direct CDC sources: `false`
74    /// - MQ sources (Kafka): `true`
75    #[prost(bool, tag = "15")]
76    pub is_distributed: bool,
77    /// Options specified by user in the FORMAT ENCODE clause.
78    #[prost(btree_map = "string, string", tag = "14")]
79    pub format_encode_options: ::prost::alloc::collections::BTreeMap<
80        ::prost::alloc::string::String,
81        ::prost::alloc::string::String,
82    >,
83    /// Handle the source relies on any sceret. The key is the propertity name and the value is the secret id and type.
84    /// For format and encode options.
85    #[prost(btree_map = "string, message", tag = "16")]
86    pub format_encode_secret_refs: ::prost::alloc::collections::BTreeMap<
87        ::prost::alloc::string::String,
88        super::secret::SecretRef,
89    >,
90    /// ref connection for schema registry
91    #[prost(uint32, optional, tag = "17")]
92    pub connection_id: ::core::option::Option<u32>,
93}
94#[derive(prost_helpers::AnyPB)]
95#[derive(Eq, Hash)]
96#[derive(Clone, PartialEq, ::prost::Message)]
97pub struct WebhookSourceInfo {
98    #[prost(message, optional, tag = "1")]
99    pub secret_ref: ::core::option::Option<super::secret::SecretRef>,
100    #[prost(message, optional, tag = "2")]
101    pub signature_expr: ::core::option::Option<super::expr::ExprNode>,
102    /// Return until the data is persisted in the storage layer or not. Default is true.
103    #[prost(bool, tag = "3")]
104    pub wait_for_persistence: bool,
105    /// Whether request is batched as jsonl. Default is false.
106    #[prost(bool, tag = "4")]
107    pub is_batched: bool,
108}
109#[derive(prost_helpers::AnyPB)]
110#[derive(Clone, PartialEq, ::prost::Message)]
111pub struct Source {
112    /// For shared source, this is the same as the job id.
113    /// For non-shared source and table with connector, this is a different oid.
114    #[prost(uint32, tag = "1")]
115    pub id: u32,
116    #[prost(uint32, tag = "2")]
117    pub schema_id: u32,
118    #[prost(uint32, tag = "3")]
119    pub database_id: u32,
120    #[prost(string, tag = "4")]
121    pub name: ::prost::alloc::string::String,
122    /// The column index of row ID. If the primary key is specified by the user,
123    /// this will be `None`.
124    #[prost(uint32, optional, tag = "5")]
125    pub row_id_index: ::core::option::Option<u32>,
126    /// Columns of the source.
127    #[prost(message, repeated, tag = "6")]
128    pub columns: ::prost::alloc::vec::Vec<super::plan_common::ColumnCatalog>,
129    /// Column id of the primary key specified by the user. If the user does not
130    /// specify a primary key, the vector will be empty.
131    #[prost(int32, repeated, tag = "7")]
132    pub pk_column_ids: ::prost::alloc::vec::Vec<i32>,
133    /// Properties specified by the user in WITH clause.
134    #[prost(btree_map = "string, string", tag = "8")]
135    pub with_properties: ::prost::alloc::collections::BTreeMap<
136        ::prost::alloc::string::String,
137        ::prost::alloc::string::String,
138    >,
139    #[prost(uint32, tag = "9")]
140    pub owner: u32,
141    #[prost(message, optional, tag = "10")]
142    pub info: ::core::option::Option<StreamSourceInfo>,
143    /// Define watermarks on the source. The `repeated` is just for forward
144    /// compatibility, currently, only one watermark on the source
145    #[prost(message, repeated, tag = "11")]
146    pub watermark_descs: ::prost::alloc::vec::Vec<WatermarkDesc>,
147    #[prost(string, tag = "13")]
148    pub definition: ::prost::alloc::string::String,
149    /// ref connection for connector
150    #[prost(uint32, optional, tag = "14")]
151    pub connection_id: ::core::option::Option<u32>,
152    #[prost(uint64, optional, tag = "15")]
153    pub initialized_at_epoch: ::core::option::Option<u64>,
154    #[prost(uint64, optional, tag = "16")]
155    pub created_at_epoch: ::core::option::Option<u64>,
156    /// Cluster version (tracked by git commit) when initialized/created
157    #[prost(string, optional, tag = "17")]
158    pub initialized_at_cluster_version: ::core::option::Option<
159        ::prost::alloc::string::String,
160    >,
161    #[prost(string, optional, tag = "18")]
162    pub created_at_cluster_version: ::core::option::Option<
163        ::prost::alloc::string::String,
164    >,
165    /// Handle the source relies on any sceret. The key is the propertity name and the value is the secret id.
166    /// Used for secret connect options.
167    #[prost(btree_map = "string, message", tag = "19")]
168    pub secret_refs: ::prost::alloc::collections::BTreeMap<
169        ::prost::alloc::string::String,
170        super::secret::SecretRef,
171    >,
172    /// Per-source catalog version, used by schema change.
173    #[prost(uint64, tag = "100")]
174    pub version: u64,
175    #[prost(uint32, optional, tag = "101")]
176    pub rate_limit: ::core::option::Option<u32>,
177    /// Indicate whether this source is created by table.
178    #[prost(oneof = "source::OptionalAssociatedTableId", tags = "12")]
179    pub optional_associated_table_id: ::core::option::Option<
180        source::OptionalAssociatedTableId,
181    >,
182}
183/// Nested message and enum types in `Source`.
184pub mod source {
185    /// Indicate whether this source is created by table.
186    #[derive(prost_helpers::AnyPB)]
187    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
188    pub enum OptionalAssociatedTableId {
189        #[prost(uint32, tag = "12")]
190        AssociatedTableId(u32),
191    }
192}
193/// Similar to `StreamSourceInfo`, and may replace `SinkType` later.
194#[derive(prost_helpers::AnyPB)]
195#[derive(Clone, PartialEq, ::prost::Message)]
196pub struct SinkFormatDesc {
197    #[prost(enumeration = "super::plan_common::FormatType", tag = "1")]
198    pub format: i32,
199    #[prost(enumeration = "super::plan_common::EncodeType", tag = "2")]
200    pub encode: i32,
201    #[prost(btree_map = "string, string", tag = "3")]
202    pub options: ::prost::alloc::collections::BTreeMap<
203        ::prost::alloc::string::String,
204        ::prost::alloc::string::String,
205    >,
206    #[prost(enumeration = "super::plan_common::EncodeType", optional, tag = "4")]
207    pub key_encode: ::core::option::Option<i32>,
208    /// Secret used for format encode options.
209    #[prost(btree_map = "string, message", tag = "5")]
210    pub secret_refs: ::prost::alloc::collections::BTreeMap<
211        ::prost::alloc::string::String,
212        super::secret::SecretRef,
213    >,
214    /// ref connection for schema registry
215    #[prost(uint32, optional, tag = "6")]
216    pub connection_id: ::core::option::Option<u32>,
217}
218/// the catalog of the sink. There are two kind of schema here. The full schema is all columns
219/// stored in the `column` which is the sink executor/fragment's output schema. The visible
220/// schema contains the columns whose `is_hidden` is false, which is the columns sink out to the
221/// external system. The distribution key and all other keys are indexed in the full schema.
222#[derive(prost_helpers::AnyPB)]
223#[derive(Clone, PartialEq, ::prost::Message)]
224pub struct Sink {
225    #[prost(uint32, tag = "1")]
226    pub id: u32,
227    #[prost(uint32, tag = "2")]
228    pub schema_id: u32,
229    #[prost(uint32, tag = "3")]
230    pub database_id: u32,
231    #[prost(string, tag = "4")]
232    pub name: ::prost::alloc::string::String,
233    #[prost(message, repeated, tag = "5")]
234    pub columns: ::prost::alloc::vec::Vec<super::plan_common::ColumnCatalog>,
235    /// Primary key derived from the SQL by the frontend.
236    #[prost(message, repeated, tag = "6")]
237    pub plan_pk: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
238    #[deprecated]
239    #[prost(uint32, repeated, packed = "false", tag = "7")]
240    pub dependent_relations: ::prost::alloc::vec::Vec<u32>,
241    #[prost(int32, repeated, tag = "8")]
242    pub distribution_key: ::prost::alloc::vec::Vec<i32>,
243    /// User-defined primary key indices for the upsert sink.
244    #[prost(int32, repeated, tag = "9")]
245    pub downstream_pk: ::prost::alloc::vec::Vec<i32>,
246    /// to be deprecated
247    #[prost(enumeration = "SinkType", tag = "10")]
248    pub sink_type: i32,
249    #[prost(uint32, tag = "11")]
250    pub owner: u32,
251    #[prost(btree_map = "string, string", tag = "12")]
252    pub properties: ::prost::alloc::collections::BTreeMap<
253        ::prost::alloc::string::String,
254        ::prost::alloc::string::String,
255    >,
256    #[prost(string, tag = "13")]
257    pub definition: ::prost::alloc::string::String,
258    /// ref connection for connector
259    #[prost(uint32, optional, tag = "14")]
260    pub connection_id: ::core::option::Option<u32>,
261    #[prost(uint64, optional, tag = "15")]
262    pub initialized_at_epoch: ::core::option::Option<u64>,
263    #[prost(uint64, optional, tag = "16")]
264    pub created_at_epoch: ::core::option::Option<u64>,
265    #[prost(string, tag = "17")]
266    pub db_name: ::prost::alloc::string::String,
267    #[prost(string, tag = "18")]
268    pub sink_from_name: ::prost::alloc::string::String,
269    #[prost(enumeration = "StreamJobStatus", tag = "19")]
270    pub stream_job_status: i32,
271    #[prost(message, optional, tag = "20")]
272    pub format_desc: ::core::option::Option<SinkFormatDesc>,
273    /// Target table id (only applicable for table sink)
274    #[prost(uint32, optional, tag = "21")]
275    pub target_table: ::core::option::Option<u32>,
276    /// Cluster version (tracked by git commit) when initialized/created
277    #[prost(string, optional, tag = "22")]
278    pub initialized_at_cluster_version: ::core::option::Option<
279        ::prost::alloc::string::String,
280    >,
281    #[prost(string, optional, tag = "23")]
282    pub created_at_cluster_version: ::core::option::Option<
283        ::prost::alloc::string::String,
284    >,
285    /// Whether it should use background ddl or block until backfill finishes.
286    #[prost(enumeration = "CreateType", tag = "24")]
287    pub create_type: i32,
288    /// Handle the sink relies on any sceret. The key is the propertity name and the value is the secret id and type.
289    /// Used for connect options.
290    #[prost(btree_map = "string, message", tag = "25")]
291    pub secret_refs: ::prost::alloc::collections::BTreeMap<
292        ::prost::alloc::string::String,
293        super::secret::SecretRef,
294    >,
295    /// only for the sink whose target is a table. Columns of the target table when the sink is created. At this point all the default columns of the target table are all handled by the project operator in the sink plan.
296    #[prost(message, repeated, tag = "26")]
297    pub original_target_columns: ::prost::alloc::vec::Vec<
298        super::plan_common::ColumnCatalog,
299    >,
300}
301#[derive(prost_helpers::AnyPB)]
302#[derive(Clone, PartialEq, ::prost::Message)]
303pub struct Subscription {
304    #[prost(uint32, tag = "1")]
305    pub id: u32,
306    #[prost(string, tag = "2")]
307    pub name: ::prost::alloc::string::String,
308    #[prost(string, tag = "3")]
309    pub definition: ::prost::alloc::string::String,
310    #[prost(uint64, tag = "6")]
311    pub retention_seconds: u64,
312    #[prost(uint32, tag = "8")]
313    pub database_id: u32,
314    #[prost(uint32, tag = "9")]
315    pub schema_id: u32,
316    #[prost(uint32, tag = "10")]
317    pub dependent_table_id: u32,
318    #[prost(uint64, optional, tag = "11")]
319    pub initialized_at_epoch: ::core::option::Option<u64>,
320    #[prost(uint64, optional, tag = "12")]
321    pub created_at_epoch: ::core::option::Option<u64>,
322    #[prost(uint32, tag = "13")]
323    pub owner: u32,
324    #[prost(string, optional, tag = "15")]
325    pub initialized_at_cluster_version: ::core::option::Option<
326        ::prost::alloc::string::String,
327    >,
328    #[prost(string, optional, tag = "16")]
329    pub created_at_cluster_version: ::core::option::Option<
330        ::prost::alloc::string::String,
331    >,
332    #[prost(enumeration = "subscription::SubscriptionState", tag = "19")]
333    pub subscription_state: i32,
334}
335/// Nested message and enum types in `Subscription`.
336pub mod subscription {
337    #[derive(prost_helpers::AnyPB)]
338    #[derive(
339        Clone,
340        Copy,
341        Debug,
342        PartialEq,
343        Eq,
344        Hash,
345        PartialOrd,
346        Ord,
347        ::prost::Enumeration
348    )]
349    #[repr(i32)]
350    pub enum SubscriptionState {
351        Unspecified = 0,
352        Init = 1,
353        Created = 2,
354    }
355    impl SubscriptionState {
356        /// String value of the enum field names used in the ProtoBuf definition.
357        ///
358        /// The values are not transformed in any way and thus are considered stable
359        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
360        pub fn as_str_name(&self) -> &'static str {
361            match self {
362                Self::Unspecified => "UNSPECIFIED",
363                Self::Init => "INIT",
364                Self::Created => "CREATED",
365            }
366        }
367        /// Creates an enum from field names used in the ProtoBuf definition.
368        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
369            match value {
370                "UNSPECIFIED" => Some(Self::Unspecified),
371                "INIT" => Some(Self::Init),
372                "CREATED" => Some(Self::Created),
373                _ => None,
374            }
375        }
376    }
377}
378#[derive(prost_helpers::AnyPB)]
379#[derive(Clone, PartialEq, ::prost::Message)]
380pub struct ConnectionParams {
381    #[prost(enumeration = "connection_params::ConnectionType", tag = "1")]
382    pub connection_type: i32,
383    #[prost(map = "string, string", tag = "2")]
384    pub properties: ::std::collections::HashMap<
385        ::prost::alloc::string::String,
386        ::prost::alloc::string::String,
387    >,
388    #[prost(map = "string, message", tag = "3")]
389    pub secret_refs: ::std::collections::HashMap<
390        ::prost::alloc::string::String,
391        super::secret::SecretRef,
392    >,
393}
394/// Nested message and enum types in `ConnectionParams`.
395pub mod connection_params {
396    #[derive(prost_helpers::AnyPB)]
397    #[derive(
398        Clone,
399        Copy,
400        Debug,
401        PartialEq,
402        Eq,
403        Hash,
404        PartialOrd,
405        Ord,
406        ::prost::Enumeration
407    )]
408    #[repr(i32)]
409    pub enum ConnectionType {
410        Unspecified = 0,
411        Kafka = 1,
412        Iceberg = 2,
413        SchemaRegistry = 3,
414        Elasticsearch = 4,
415    }
416    impl ConnectionType {
417        /// String value of the enum field names used in the ProtoBuf definition.
418        ///
419        /// The values are not transformed in any way and thus are considered stable
420        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
421        pub fn as_str_name(&self) -> &'static str {
422            match self {
423                Self::Unspecified => "CONNECTION_TYPE_UNSPECIFIED",
424                Self::Kafka => "CONNECTION_TYPE_KAFKA",
425                Self::Iceberg => "CONNECTION_TYPE_ICEBERG",
426                Self::SchemaRegistry => "CONNECTION_TYPE_SCHEMA_REGISTRY",
427                Self::Elasticsearch => "CONNECTION_TYPE_ELASTICSEARCH",
428            }
429        }
430        /// Creates an enum from field names used in the ProtoBuf definition.
431        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
432            match value {
433                "CONNECTION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
434                "CONNECTION_TYPE_KAFKA" => Some(Self::Kafka),
435                "CONNECTION_TYPE_ICEBERG" => Some(Self::Iceberg),
436                "CONNECTION_TYPE_SCHEMA_REGISTRY" => Some(Self::SchemaRegistry),
437                "CONNECTION_TYPE_ELASTICSEARCH" => Some(Self::Elasticsearch),
438                _ => None,
439            }
440        }
441    }
442}
443#[derive(prost_helpers::AnyPB)]
444#[derive(Clone, PartialEq, ::prost::Message)]
445pub struct Connection {
446    #[prost(uint32, tag = "1")]
447    pub id: u32,
448    #[prost(uint32, tag = "2")]
449    pub schema_id: u32,
450    #[prost(uint32, tag = "3")]
451    pub database_id: u32,
452    #[prost(string, tag = "4")]
453    pub name: ::prost::alloc::string::String,
454    #[prost(uint32, tag = "6")]
455    pub owner: u32,
456    #[prost(oneof = "connection::Info", tags = "5, 7")]
457    pub info: ::core::option::Option<connection::Info>,
458}
459/// Nested message and enum types in `Connection`.
460pub mod connection {
461    #[derive(prost_helpers::AnyPB)]
462    #[derive(Clone, PartialEq, ::prost::Message)]
463    pub struct PrivateLinkService {
464        #[prost(enumeration = "private_link_service::PrivateLinkProvider", tag = "1")]
465        pub provider: i32,
466        #[prost(string, tag = "2")]
467        pub service_name: ::prost::alloc::string::String,
468        #[prost(string, tag = "3")]
469        pub endpoint_id: ::prost::alloc::string::String,
470        #[prost(map = "string, string", tag = "4")]
471        pub dns_entries: ::std::collections::HashMap<
472            ::prost::alloc::string::String,
473            ::prost::alloc::string::String,
474        >,
475        #[prost(string, tag = "5")]
476        pub endpoint_dns_name: ::prost::alloc::string::String,
477    }
478    /// Nested message and enum types in `PrivateLinkService`.
479    pub mod private_link_service {
480        #[derive(prost_helpers::AnyPB)]
481        #[derive(
482            Clone,
483            Copy,
484            Debug,
485            PartialEq,
486            Eq,
487            Hash,
488            PartialOrd,
489            Ord,
490            ::prost::Enumeration
491        )]
492        #[repr(i32)]
493        pub enum PrivateLinkProvider {
494            Unspecified = 0,
495            Mock = 1,
496            Aws = 2,
497        }
498        impl PrivateLinkProvider {
499            /// String value of the enum field names used in the ProtoBuf definition.
500            ///
501            /// The values are not transformed in any way and thus are considered stable
502            /// (if the ProtoBuf definition does not change) and safe for programmatic use.
503            pub fn as_str_name(&self) -> &'static str {
504                match self {
505                    Self::Unspecified => "UNSPECIFIED",
506                    Self::Mock => "MOCK",
507                    Self::Aws => "AWS",
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                    "UNSPECIFIED" => Some(Self::Unspecified),
514                    "MOCK" => Some(Self::Mock),
515                    "AWS" => Some(Self::Aws),
516                    _ => None,
517                }
518            }
519        }
520    }
521    #[derive(prost_helpers::AnyPB)]
522    #[derive(Clone, PartialEq, ::prost::Oneof)]
523    pub enum Info {
524        #[prost(message, tag = "5")]
525        PrivateLinkService(PrivateLinkService),
526        #[prost(message, tag = "7")]
527        ConnectionParams(super::ConnectionParams),
528    }
529}
530#[derive(prost_helpers::AnyPB)]
531#[derive(Clone, PartialEq, ::prost::Message)]
532pub struct Index {
533    #[prost(uint32, tag = "1")]
534    pub id: u32,
535    #[prost(uint32, tag = "2")]
536    pub schema_id: u32,
537    #[prost(uint32, tag = "3")]
538    pub database_id: u32,
539    #[prost(string, tag = "4")]
540    pub name: ::prost::alloc::string::String,
541    #[prost(uint32, tag = "5")]
542    pub owner: u32,
543    #[prost(uint32, tag = "6")]
544    pub index_table_id: u32,
545    #[prost(uint32, tag = "7")]
546    pub primary_table_id: u32,
547    /// Only `InputRef` type index is supported Now.
548    /// The index of `InputRef` is the column index of the primary table.
549    #[prost(message, repeated, tag = "8")]
550    pub index_item: ::prost::alloc::vec::Vec<super::expr::ExprNode>,
551    #[prost(message, repeated, tag = "16")]
552    pub index_column_properties: ::prost::alloc::vec::Vec<IndexColumnProperties>,
553    #[prost(uint64, optional, tag = "10")]
554    pub initialized_at_epoch: ::core::option::Option<u64>,
555    #[prost(uint64, optional, tag = "11")]
556    pub created_at_epoch: ::core::option::Option<u64>,
557    #[prost(enumeration = "StreamJobStatus", tag = "12")]
558    pub stream_job_status: i32,
559    /// Use to record the prefix len of the index_item to reconstruct index columns
560    /// provided by users.
561    #[prost(uint32, tag = "13")]
562    pub index_columns_len: u32,
563    /// Cluster version (tracked by git commit) when initialized/created
564    #[prost(string, optional, tag = "14")]
565    pub initialized_at_cluster_version: ::core::option::Option<
566        ::prost::alloc::string::String,
567    >,
568    #[prost(string, optional, tag = "15")]
569    pub created_at_cluster_version: ::core::option::Option<
570        ::prost::alloc::string::String,
571    >,
572}
573/// <https://www.postgresql.org/docs/current/functions-info.html#FUNCTIONS-INFO-INDEX-COLUMN-PROPS>
574#[derive(prost_helpers::AnyPB)]
575#[derive(Eq, Hash)]
576#[derive(Clone, Copy, PartialEq, ::prost::Message)]
577pub struct IndexColumnProperties {
578    /// Whether the column sort in ascending(false) or descending(true) order on a forward scan.
579    #[prost(bool, tag = "1")]
580    pub is_desc: bool,
581    /// Does the column sort with nulls first on a forward scan?
582    #[prost(bool, tag = "2")]
583    pub nulls_first: bool,
584}
585#[derive(prost_helpers::AnyPB)]
586#[derive(Clone, PartialEq, ::prost::Message)]
587pub struct Function {
588    #[prost(uint32, tag = "1")]
589    pub id: u32,
590    #[prost(uint32, tag = "2")]
591    pub schema_id: u32,
592    #[prost(uint32, tag = "3")]
593    pub database_id: u32,
594    #[prost(string, tag = "4")]
595    pub name: ::prost::alloc::string::String,
596    #[prost(uint32, tag = "9")]
597    pub owner: u32,
598    #[prost(string, repeated, tag = "15")]
599    pub arg_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
600    #[prost(message, repeated, tag = "5")]
601    pub arg_types: ::prost::alloc::vec::Vec<super::data::DataType>,
602    #[prost(message, optional, tag = "6")]
603    pub return_type: ::core::option::Option<super::data::DataType>,
604    #[prost(string, tag = "7")]
605    pub language: ::prost::alloc::string::String,
606    #[prost(string, optional, tag = "8")]
607    pub link: ::core::option::Option<::prost::alloc::string::String>,
608    /// The function name in the runtime / on the remote side that is bound to the UDF created in RisingWave.
609    #[prost(string, optional, tag = "10")]
610    pub name_in_runtime: ::core::option::Option<::prost::alloc::string::String>,
611    /// The source code of the function.
612    #[prost(string, optional, tag = "14")]
613    pub body: ::core::option::Option<::prost::alloc::string::String>,
614    /// The zstd-compressed binary of the function.
615    #[prost(bytes = "vec", optional, tag = "17")]
616    pub compressed_binary: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
617    #[prost(bool, tag = "16")]
618    pub always_retry_on_network_error: bool,
619    /// The runtime selected when multiple runtimes are available for the language. Now is not used.
620    #[prost(string, optional, tag = "18")]
621    pub runtime: ::core::option::Option<::prost::alloc::string::String>,
622    /// additional options for javascript functions
623    #[prost(bool, optional, tag = "20")]
624    pub is_async: ::core::option::Option<bool>,
625    #[prost(bool, optional, tag = "21")]
626    pub is_batched: ::core::option::Option<bool>,
627    #[prost(oneof = "function::Kind", tags = "11, 12, 13")]
628    pub kind: ::core::option::Option<function::Kind>,
629}
630/// Nested message and enum types in `Function`.
631pub mod function {
632    #[derive(prost_helpers::AnyPB)]
633    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
634    pub struct ScalarFunction {}
635    #[derive(prost_helpers::AnyPB)]
636    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
637    pub struct TableFunction {}
638    #[derive(prost_helpers::AnyPB)]
639    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
640    pub struct AggregateFunction {}
641    #[derive(prost_helpers::AnyPB)]
642    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
643    pub enum Kind {
644        #[prost(message, tag = "11")]
645        Scalar(ScalarFunction),
646        #[prost(message, tag = "12")]
647        Table(TableFunction),
648        #[prost(message, tag = "13")]
649        Aggregate(AggregateFunction),
650    }
651}
652/// Includes full information about a table.
653///
654/// Here `Table` is an internal concept, corresponding to _a table in storage_, all of which can be `SELECT`ed.
655/// It is not the same as a user-side table created by `CREATE TABLE`.
656///
657/// See `TableCatalog` struct in frontend crate for more information.
658#[derive(prost_helpers::AnyPB)]
659#[derive(Clone, PartialEq, ::prost::Message)]
660pub struct Table {
661    #[prost(uint32, tag = "1")]
662    pub id: u32,
663    #[prost(uint32, tag = "2")]
664    pub schema_id: u32,
665    #[prost(uint32, tag = "3")]
666    pub database_id: u32,
667    #[prost(string, tag = "4")]
668    pub name: ::prost::alloc::string::String,
669    #[prost(message, repeated, tag = "5")]
670    pub columns: ::prost::alloc::vec::Vec<super::plan_common::ColumnCatalog>,
671    #[prost(message, repeated, tag = "6")]
672    pub pk: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
673    /// For cdc table created from a cdc source, here records the source id.
674    ///
675    /// TODO(rc): deprecate this by passing dependencies via `Request` message
676    #[prost(uint32, repeated, tag = "8")]
677    pub dependent_relations: ::prost::alloc::vec::Vec<u32>,
678    #[prost(enumeration = "table::TableType", tag = "10")]
679    pub table_type: i32,
680    #[prost(int32, repeated, tag = "12")]
681    pub distribution_key: ::prost::alloc::vec::Vec<i32>,
682    /// pk_indices of the corresponding materialize operator's output.
683    #[prost(int32, repeated, tag = "13")]
684    pub stream_key: ::prost::alloc::vec::Vec<i32>,
685    #[prost(bool, tag = "14")]
686    pub append_only: bool,
687    #[prost(uint32, tag = "15")]
688    pub owner: u32,
689    #[prost(uint32, tag = "17")]
690    pub fragment_id: u32,
691    /// an optional column index which is the vnode of each row computed by the
692    /// table's consistent hash distribution
693    #[prost(uint32, optional, tag = "18")]
694    pub vnode_col_index: ::core::option::Option<u32>,
695    /// An optional column index of row id. If the primary key is specified by
696    /// users, this will be `None`.
697    #[prost(uint32, optional, tag = "19")]
698    pub row_id_index: ::core::option::Option<u32>,
699    /// The column indices which are stored in the state store's value with
700    /// row-encoding. Currently is not supported yet and expected to be
701    /// `\[0..columns.len()\]`.
702    #[prost(int32, repeated, tag = "20")]
703    pub value_indices: ::prost::alloc::vec::Vec<i32>,
704    #[prost(string, tag = "21")]
705    pub definition: ::prost::alloc::string::String,
706    /// Used to control whether handling pk conflict for incoming data.
707    #[prost(enumeration = "HandleConflictBehavior", tag = "22")]
708    pub handle_pk_conflict_behavior: i32,
709    /// Anticipated read prefix pattern (number of fields) for the table, which can
710    /// be utilized for implementing the table's bloom filter or other storage
711    /// optimization techniques.
712    #[prost(uint32, tag = "23")]
713    pub read_prefix_len_hint: u32,
714    #[prost(int32, repeated, tag = "24")]
715    pub watermark_indices: ::prost::alloc::vec::Vec<i32>,
716    #[prost(int32, repeated, tag = "25")]
717    pub dist_key_in_pk: ::prost::alloc::vec::Vec<i32>,
718    /// A dml fragment id corresponds to the table, used to decide where the dml
719    /// statement is executed.
720    #[prost(uint32, optional, tag = "26")]
721    pub dml_fragment_id: ::core::option::Option<u32>,
722    /// The range of row count of the table.
723    /// This field is not always present due to backward compatibility. Use
724    /// `Cardinality::unknown` in this case.
725    #[prost(message, optional, tag = "27")]
726    pub cardinality: ::core::option::Option<super::plan_common::Cardinality>,
727    #[prost(uint64, optional, tag = "28")]
728    pub initialized_at_epoch: ::core::option::Option<u64>,
729    #[prost(uint64, optional, tag = "29")]
730    pub created_at_epoch: ::core::option::Option<u64>,
731    /// This field is introduced in v1.2.0. It is used to indicate whether the
732    /// table should use watermark_cache to avoid state cleaning as a performance
733    /// optimization. In older versions we can just initialize without it.
734    #[prost(bool, tag = "30")]
735    pub cleaned_by_watermark: bool,
736    /// Used to filter created / creating tables in meta.
737    #[prost(enumeration = "StreamJobStatus", tag = "31")]
738    pub stream_job_status: i32,
739    #[prost(enumeration = "CreateType", tag = "32")]
740    pub create_type: i32,
741    /// This field is used to store the description set by the `comment on` clause.
742    #[prost(string, optional, tag = "33")]
743    pub description: ::core::option::Option<::prost::alloc::string::String>,
744    /// This field is used to mark the the sink into this table.
745    #[prost(uint32, repeated, tag = "34")]
746    pub incoming_sinks: ::prost::alloc::vec::Vec<u32>,
747    /// Cluster version (tracked by git commit) when initialized/created
748    #[prost(string, optional, tag = "35")]
749    pub initialized_at_cluster_version: ::core::option::Option<
750        ::prost::alloc::string::String,
751    >,
752    #[prost(string, optional, tag = "36")]
753    pub created_at_cluster_version: ::core::option::Option<
754        ::prost::alloc::string::String,
755    >,
756    /// TTL of the record in the table, to ensure the consistency with other tables
757    /// in the streaming plan, it only applies to append-only tables.
758    #[prost(uint32, optional, tag = "37")]
759    pub retention_seconds: ::core::option::Option<u32>,
760    /// This field specifies the index of the column set in the "with version
761    /// column" within all the columns. It is used for filtering during "on
762    /// conflict" operations.
763    #[prost(uint32, optional, tag = "38")]
764    pub version_column_index: ::core::option::Option<u32>,
765    /// The unique identifier of the upstream table if it is a CDC table.
766    /// It will be used in auto schema change to get the Table which mapped to the
767    /// upstream table.
768    #[prost(string, optional, tag = "39")]
769    pub cdc_table_id: ::core::option::Option<::prost::alloc::string::String>,
770    /// Total vnode count of the table.
771    ///
772    /// Use `VnodeCountCompat::vnode_count` to access it.
773    ///
774    /// - Can be unset if the table is created in older versions where variable vnode count is not
775    ///    supported, in which case a default value of 256 (or 1 for singleton) should be used.
776    /// - Can be placeholder value `Some(0)` if the catalog is generated by the frontend and the
777    ///    corresponding job is still in `Creating` status, in which case calling `vnode_count`
778    ///    will panic.
779    ///
780    /// Please note that this field is not intended to describe the expected vnode count
781    /// for a streaming job. Instead, refer to `stream_plan.StreamFragmentGraph.max_parallelism`.
782    #[prost(uint32, optional, tag = "40")]
783    pub maybe_vnode_count: ::core::option::Option<u32>,
784    /// The information used by webhook source to validate the incoming data.
785    #[prost(message, optional, tag = "41")]
786    pub webhook_info: ::core::option::Option<WebhookSourceInfo>,
787    /// This field stores the job ID for internal tables.
788    #[prost(uint32, optional, tag = "42")]
789    pub job_id: ::core::option::Option<u32>,
790    /// Table Engine, currently only support hummock and iceberg
791    #[prost(enumeration = "table::Engine", optional, tag = "43")]
792    pub engine: ::core::option::Option<i32>,
793    /// Indicate the index of the watermark column in the primary key that should be cleaned.
794    /// NOTICE: when it is "None", the watermark column should be the first column in the pk
795    #[prost(int32, optional, tag = "44")]
796    pub clean_watermark_index_in_pk: ::core::option::Option<i32>,
797    /// Per-table catalog version, used by schema change. `None` for internal
798    /// tables and tests. Not to be confused with the global catalog version for
799    /// notification service.
800    #[prost(message, optional, tag = "100")]
801    pub version: ::core::option::Option<table::TableVersion>,
802    #[prost(oneof = "table::OptionalAssociatedSourceId", tags = "9")]
803    pub optional_associated_source_id: ::core::option::Option<
804        table::OptionalAssociatedSourceId,
805    >,
806}
807/// Nested message and enum types in `Table`.
808pub mod table {
809    #[derive(prost_helpers::AnyPB)]
810    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
811    pub struct TableVersion {
812        /// The version number, which will be 0 by default and be increased by 1 for
813        /// each schema change in the frontend.
814        #[prost(uint64, tag = "1")]
815        pub version: u64,
816        /// The ID of the next column to be added, which is used to make all columns
817        /// in the table have unique IDs, even if some columns have been dropped.
818        #[prost(int32, tag = "2")]
819        pub next_column_id: i32,
820    }
821    #[derive(prost_helpers::AnyPB)]
822    #[derive(
823        Clone,
824        Copy,
825        Debug,
826        PartialEq,
827        Eq,
828        Hash,
829        PartialOrd,
830        Ord,
831        ::prost::Enumeration
832    )]
833    #[repr(i32)]
834    pub enum TableType {
835        Unspecified = 0,
836        Table = 1,
837        MaterializedView = 2,
838        Index = 3,
839        Internal = 4,
840    }
841    impl TableType {
842        /// String value of the enum field names used in the ProtoBuf definition.
843        ///
844        /// The values are not transformed in any way and thus are considered stable
845        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
846        pub fn as_str_name(&self) -> &'static str {
847            match self {
848                Self::Unspecified => "UNSPECIFIED",
849                Self::Table => "TABLE",
850                Self::MaterializedView => "MATERIALIZED_VIEW",
851                Self::Index => "INDEX",
852                Self::Internal => "INTERNAL",
853            }
854        }
855        /// Creates an enum from field names used in the ProtoBuf definition.
856        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
857            match value {
858                "UNSPECIFIED" => Some(Self::Unspecified),
859                "TABLE" => Some(Self::Table),
860                "MATERIALIZED_VIEW" => Some(Self::MaterializedView),
861                "INDEX" => Some(Self::Index),
862                "INTERNAL" => Some(Self::Internal),
863                _ => None,
864            }
865        }
866    }
867    #[derive(prost_helpers::AnyPB)]
868    #[derive(
869        Clone,
870        Copy,
871        Debug,
872        PartialEq,
873        Eq,
874        Hash,
875        PartialOrd,
876        Ord,
877        ::prost::Enumeration
878    )]
879    #[repr(i32)]
880    pub enum Engine {
881        Unspecified = 0,
882        Hummock = 1,
883        Iceberg = 2,
884    }
885    impl Engine {
886        /// String value of the enum field names used in the ProtoBuf definition.
887        ///
888        /// The values are not transformed in any way and thus are considered stable
889        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
890        pub fn as_str_name(&self) -> &'static str {
891            match self {
892                Self::Unspecified => "ENGINE_UNSPECIFIED",
893                Self::Hummock => "HUMMOCK",
894                Self::Iceberg => "ICEBERG",
895            }
896        }
897        /// Creates an enum from field names used in the ProtoBuf definition.
898        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
899            match value {
900                "ENGINE_UNSPECIFIED" => Some(Self::Unspecified),
901                "HUMMOCK" => Some(Self::Hummock),
902                "ICEBERG" => Some(Self::Iceberg),
903                _ => None,
904            }
905        }
906    }
907    #[derive(prost_helpers::AnyPB)]
908    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
909    pub enum OptionalAssociatedSourceId {
910        #[prost(uint32, tag = "9")]
911        AssociatedSourceId(u32),
912    }
913}
914#[derive(prost_helpers::AnyPB)]
915#[derive(Clone, PartialEq, ::prost::Message)]
916pub struct View {
917    #[prost(uint32, tag = "1")]
918    pub id: u32,
919    #[prost(uint32, tag = "2")]
920    pub schema_id: u32,
921    #[prost(uint32, tag = "3")]
922    pub database_id: u32,
923    #[prost(string, tag = "4")]
924    pub name: ::prost::alloc::string::String,
925    #[prost(uint32, tag = "5")]
926    pub owner: u32,
927    #[prost(btree_map = "string, string", tag = "6")]
928    pub properties: ::prost::alloc::collections::BTreeMap<
929        ::prost::alloc::string::String,
930        ::prost::alloc::string::String,
931    >,
932    #[prost(string, tag = "7")]
933    pub sql: ::prost::alloc::string::String,
934    #[prost(uint32, repeated, tag = "8")]
935    pub dependent_relations: ::prost::alloc::vec::Vec<u32>,
936    /// User-specified column names.
937    #[prost(message, repeated, tag = "9")]
938    pub columns: ::prost::alloc::vec::Vec<super::plan_common::Field>,
939}
940#[derive(prost_helpers::AnyPB)]
941#[derive(Clone, PartialEq, ::prost::Message)]
942pub struct Schema {
943    #[prost(uint32, tag = "1")]
944    pub id: u32,
945    #[prost(uint32, tag = "2")]
946    pub database_id: u32,
947    #[prost(string, tag = "3")]
948    pub name: ::prost::alloc::string::String,
949    #[prost(uint32, tag = "4")]
950    pub owner: u32,
951}
952#[derive(prost_helpers::AnyPB)]
953#[derive(Clone, PartialEq, ::prost::Message)]
954pub struct Database {
955    #[prost(uint32, tag = "1")]
956    pub id: u32,
957    #[prost(string, tag = "2")]
958    pub name: ::prost::alloc::string::String,
959    #[prost(uint32, tag = "3")]
960    pub owner: u32,
961    #[prost(string, tag = "4")]
962    pub resource_group: ::prost::alloc::string::String,
963    #[prost(uint32, optional, tag = "5")]
964    pub barrier_interval_ms: ::core::option::Option<u32>,
965    #[prost(uint64, optional, tag = "6")]
966    pub checkpoint_frequency: ::core::option::Option<u64>,
967}
968#[derive(prost_helpers::AnyPB)]
969#[derive(Clone, PartialEq, ::prost::Message)]
970pub struct Comment {
971    #[prost(uint32, tag = "1")]
972    pub table_id: u32,
973    #[prost(uint32, tag = "2")]
974    pub schema_id: u32,
975    #[prost(uint32, tag = "3")]
976    pub database_id: u32,
977    #[prost(uint32, optional, tag = "4")]
978    pub column_index: ::core::option::Option<u32>,
979    #[prost(string, optional, tag = "5")]
980    pub description: ::core::option::Option<::prost::alloc::string::String>,
981}
982#[derive(prost_helpers::AnyPB)]
983#[derive(Clone, PartialEq, ::prost::Message)]
984pub struct Secret {
985    #[prost(uint32, tag = "1")]
986    pub id: u32,
987    #[prost(string, tag = "2")]
988    pub name: ::prost::alloc::string::String,
989    #[prost(uint32, tag = "3")]
990    pub database_id: u32,
991    /// The secret here is encrypted to bytes.
992    #[prost(bytes = "vec", tag = "4")]
993    pub value: ::prost::alloc::vec::Vec<u8>,
994    #[prost(uint32, tag = "5")]
995    pub owner: u32,
996    #[prost(uint32, tag = "6")]
997    pub schema_id: u32,
998}
999#[derive(prost_helpers::AnyPB)]
1000#[derive(Clone, PartialEq, ::prost::Message)]
1001pub struct OptionsWithSecret {
1002    #[prost(map = "string, string", tag = "1")]
1003    pub options: ::std::collections::HashMap<
1004        ::prost::alloc::string::String,
1005        ::prost::alloc::string::String,
1006    >,
1007    #[prost(map = "string, message", tag = "2")]
1008    pub secret_refs: ::std::collections::HashMap<
1009        ::prost::alloc::string::String,
1010        super::secret::SecretRef,
1011    >,
1012}
1013#[derive(prost_helpers::AnyPB)]
1014#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1015#[repr(i32)]
1016pub enum SchemaRegistryNameStrategy {
1017    Unspecified = 0,
1018    RecordNameStrategy = 1,
1019    TopicRecordNameStrategy = 2,
1020}
1021impl SchemaRegistryNameStrategy {
1022    /// String value of the enum field names used in the ProtoBuf definition.
1023    ///
1024    /// The values are not transformed in any way and thus are considered stable
1025    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1026    pub fn as_str_name(&self) -> &'static str {
1027        match self {
1028            Self::Unspecified => "SCHEMA_REGISTRY_NAME_STRATEGY_UNSPECIFIED",
1029            Self::RecordNameStrategy => {
1030                "SCHEMA_REGISTRY_NAME_STRATEGY_RECORD_NAME_STRATEGY"
1031            }
1032            Self::TopicRecordNameStrategy => {
1033                "SCHEMA_REGISTRY_NAME_STRATEGY_TOPIC_RECORD_NAME_STRATEGY"
1034            }
1035        }
1036    }
1037    /// Creates an enum from field names used in the ProtoBuf definition.
1038    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1039        match value {
1040            "SCHEMA_REGISTRY_NAME_STRATEGY_UNSPECIFIED" => Some(Self::Unspecified),
1041            "SCHEMA_REGISTRY_NAME_STRATEGY_RECORD_NAME_STRATEGY" => {
1042                Some(Self::RecordNameStrategy)
1043            }
1044            "SCHEMA_REGISTRY_NAME_STRATEGY_TOPIC_RECORD_NAME_STRATEGY" => {
1045                Some(Self::TopicRecordNameStrategy)
1046            }
1047            _ => None,
1048        }
1049    }
1050}
1051#[derive(prost_helpers::AnyPB)]
1052#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1053#[repr(i32)]
1054pub enum StreamJobStatus {
1055    /// Prefixed by `STREAM_JOB_STATUS` due to protobuf namespacing rules.
1056    Unspecified = 0,
1057    Creating = 1,
1058    Created = 2,
1059}
1060impl StreamJobStatus {
1061    /// String value of the enum field names used in the ProtoBuf definition.
1062    ///
1063    /// The values are not transformed in any way and thus are considered stable
1064    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1065    pub fn as_str_name(&self) -> &'static str {
1066        match self {
1067            Self::Unspecified => "STREAM_JOB_STATUS_UNSPECIFIED",
1068            Self::Creating => "STREAM_JOB_STATUS_CREATING",
1069            Self::Created => "STREAM_JOB_STATUS_CREATED",
1070        }
1071    }
1072    /// Creates an enum from field names used in the ProtoBuf definition.
1073    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1074        match value {
1075            "STREAM_JOB_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
1076            "STREAM_JOB_STATUS_CREATING" => Some(Self::Creating),
1077            "STREAM_JOB_STATUS_CREATED" => Some(Self::Created),
1078            _ => None,
1079        }
1080    }
1081}
1082/// How the stream job was created will determine
1083/// whether they are persisted.
1084#[derive(prost_helpers::AnyPB)]
1085#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1086#[repr(i32)]
1087pub enum CreateType {
1088    Unspecified = 0,
1089    Background = 1,
1090    Foreground = 2,
1091}
1092impl CreateType {
1093    /// String value of the enum field names used in the ProtoBuf definition.
1094    ///
1095    /// The values are not transformed in any way and thus are considered stable
1096    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1097    pub fn as_str_name(&self) -> &'static str {
1098        match self {
1099            Self::Unspecified => "CREATE_TYPE_UNSPECIFIED",
1100            Self::Background => "CREATE_TYPE_BACKGROUND",
1101            Self::Foreground => "CREATE_TYPE_FOREGROUND",
1102        }
1103    }
1104    /// Creates an enum from field names used in the ProtoBuf definition.
1105    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1106        match value {
1107            "CREATE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1108            "CREATE_TYPE_BACKGROUND" => Some(Self::Background),
1109            "CREATE_TYPE_FOREGROUND" => Some(Self::Foreground),
1110            _ => None,
1111        }
1112    }
1113}
1114#[derive(prost_helpers::AnyPB)]
1115#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1116#[repr(i32)]
1117pub enum SinkType {
1118    Unspecified = 0,
1119    AppendOnly = 1,
1120    ForceAppendOnly = 2,
1121    Upsert = 3,
1122}
1123impl SinkType {
1124    /// String value of the enum field names used in the ProtoBuf definition.
1125    ///
1126    /// The values are not transformed in any way and thus are considered stable
1127    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1128    pub fn as_str_name(&self) -> &'static str {
1129        match self {
1130            Self::Unspecified => "SINK_TYPE_UNSPECIFIED",
1131            Self::AppendOnly => "SINK_TYPE_APPEND_ONLY",
1132            Self::ForceAppendOnly => "SINK_TYPE_FORCE_APPEND_ONLY",
1133            Self::Upsert => "SINK_TYPE_UPSERT",
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            "SINK_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1140            "SINK_TYPE_APPEND_ONLY" => Some(Self::AppendOnly),
1141            "SINK_TYPE_FORCE_APPEND_ONLY" => Some(Self::ForceAppendOnly),
1142            "SINK_TYPE_UPSERT" => Some(Self::Upsert),
1143            _ => None,
1144        }
1145    }
1146}
1147#[derive(prost_helpers::AnyPB)]
1148#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1149#[repr(i32)]
1150pub enum HandleConflictBehavior {
1151    Unspecified = 0,
1152    Overwrite = 1,
1153    Ignore = 2,
1154    NoCheck = 3,
1155    DoUpdateIfNotNull = 4,
1156}
1157impl HandleConflictBehavior {
1158    /// String value of the enum field names used in the ProtoBuf definition.
1159    ///
1160    /// The values are not transformed in any way and thus are considered stable
1161    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1162    pub fn as_str_name(&self) -> &'static str {
1163        match self {
1164            Self::Unspecified => "HANDLE_CONFLICT_BEHAVIOR_UNSPECIFIED",
1165            Self::Overwrite => "HANDLE_CONFLICT_BEHAVIOR_OVERWRITE",
1166            Self::Ignore => "HANDLE_CONFLICT_BEHAVIOR_IGNORE",
1167            Self::NoCheck => "HANDLE_CONFLICT_BEHAVIOR_NO_CHECK",
1168            Self::DoUpdateIfNotNull => "HANDLE_CONFLICT_BEHAVIOR_DO_UPDATE_IF_NOT_NULL",
1169        }
1170    }
1171    /// Creates an enum from field names used in the ProtoBuf definition.
1172    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1173        match value {
1174            "HANDLE_CONFLICT_BEHAVIOR_UNSPECIFIED" => Some(Self::Unspecified),
1175            "HANDLE_CONFLICT_BEHAVIOR_OVERWRITE" => Some(Self::Overwrite),
1176            "HANDLE_CONFLICT_BEHAVIOR_IGNORE" => Some(Self::Ignore),
1177            "HANDLE_CONFLICT_BEHAVIOR_NO_CHECK" => Some(Self::NoCheck),
1178            "HANDLE_CONFLICT_BEHAVIOR_DO_UPDATE_IF_NOT_NULL" => {
1179                Some(Self::DoUpdateIfNotNull)
1180            }
1181            _ => None,
1182        }
1183    }
1184}