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