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