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    #[prost(int32, optional, tag = "44")]
844    pub clean_watermark_index_in_pk: ::core::option::Option<i32>,
845    /// Whether the table supports manual refresh operation:
846    /// reload data from external source and emit messages based on the diff with current data.
847    #[prost(bool, tag = "45")]
848    pub refreshable: bool,
849    /// only exist when table_type is VECTOR_INDEX.
850    #[prost(message, optional, tag = "46")]
851    pub vector_index_info: ::core::option::Option<VectorIndexInfo>,
852    #[prost(enumeration = "table::CdcTableType", optional, tag = "47")]
853    pub cdc_table_type: ::core::option::Option<i32>,
854    /// Current refresh state of the table for refreshable tables
855    #[prost(enumeration = "RefreshState", optional, tag = "48")]
856    pub refresh_state: ::core::option::Option<i32>,
857    /// Per-table catalog version, used by schema change. `None` for internal
858    /// tables and tests. Not to be confused with the global catalog version for
859    /// notification service.
860    #[prost(message, optional, tag = "100")]
861    pub version: ::core::option::Option<table::TableVersion>,
862    #[prost(oneof = "table::OptionalAssociatedSourceId", tags = "9")]
863    pub optional_associated_source_id: ::core::option::Option<
864        table::OptionalAssociatedSourceId,
865    >,
866}
867/// Nested message and enum types in `Table`.
868pub mod table {
869    #[derive(prost_helpers::AnyPB)]
870    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
871    pub struct TableVersion {
872        /// The version number, which will be 0 by default and be increased by 1 for
873        /// each schema change in the frontend.
874        #[prost(uint64, tag = "1")]
875        pub version: u64,
876        /// The ID of the next column to be added, which is used to make all columns
877        /// in the table have unique IDs, even if some columns have been dropped.
878        #[prost(int32, tag = "2")]
879        pub next_column_id: i32,
880    }
881    #[derive(prost_helpers::AnyPB)]
882    #[derive(
883        Clone,
884        Copy,
885        Debug,
886        PartialEq,
887        Eq,
888        Hash,
889        PartialOrd,
890        Ord,
891        ::prost::Enumeration
892    )]
893    #[repr(i32)]
894    pub enum TableType {
895        Unspecified = 0,
896        Table = 1,
897        MaterializedView = 2,
898        Index = 3,
899        Internal = 4,
900        VectorIndex = 5,
901    }
902    impl TableType {
903        /// String value of the enum field names used in the ProtoBuf definition.
904        ///
905        /// The values are not transformed in any way and thus are considered stable
906        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
907        pub fn as_str_name(&self) -> &'static str {
908            match self {
909                Self::Unspecified => "UNSPECIFIED",
910                Self::Table => "TABLE",
911                Self::MaterializedView => "MATERIALIZED_VIEW",
912                Self::Index => "INDEX",
913                Self::Internal => "INTERNAL",
914                Self::VectorIndex => "VECTOR_INDEX",
915            }
916        }
917        /// Creates an enum from field names used in the ProtoBuf definition.
918        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
919            match value {
920                "UNSPECIFIED" => Some(Self::Unspecified),
921                "TABLE" => Some(Self::Table),
922                "MATERIALIZED_VIEW" => Some(Self::MaterializedView),
923                "INDEX" => Some(Self::Index),
924                "INTERNAL" => Some(Self::Internal),
925                "VECTOR_INDEX" => Some(Self::VectorIndex),
926                _ => None,
927            }
928        }
929    }
930    #[derive(prost_helpers::AnyPB)]
931    #[derive(
932        Clone,
933        Copy,
934        Debug,
935        PartialEq,
936        Eq,
937        Hash,
938        PartialOrd,
939        Ord,
940        ::prost::Enumeration
941    )]
942    #[repr(i32)]
943    pub enum Engine {
944        Unspecified = 0,
945        Hummock = 1,
946        Iceberg = 2,
947    }
948    impl Engine {
949        /// String value of the enum field names used in the ProtoBuf definition.
950        ///
951        /// The values are not transformed in any way and thus are considered stable
952        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
953        pub fn as_str_name(&self) -> &'static str {
954            match self {
955                Self::Unspecified => "ENGINE_UNSPECIFIED",
956                Self::Hummock => "HUMMOCK",
957                Self::Iceberg => "ICEBERG",
958            }
959        }
960        /// Creates an enum from field names used in the ProtoBuf definition.
961        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
962            match value {
963                "ENGINE_UNSPECIFIED" => Some(Self::Unspecified),
964                "HUMMOCK" => Some(Self::Hummock),
965                "ICEBERG" => Some(Self::Iceberg),
966                _ => None,
967            }
968        }
969    }
970    #[derive(prost_helpers::AnyPB)]
971    #[derive(
972        Clone,
973        Copy,
974        Debug,
975        PartialEq,
976        Eq,
977        Hash,
978        PartialOrd,
979        Ord,
980        ::prost::Enumeration
981    )]
982    #[repr(i32)]
983    pub enum CdcTableType {
984        Unspecified = 0,
985        Postgres = 1,
986        Mysql = 2,
987        Sqlserver = 3,
988        Mongo = 4,
989        Citus = 5,
990    }
991    impl CdcTableType {
992        /// String value of the enum field names used in the ProtoBuf definition.
993        ///
994        /// The values are not transformed in any way and thus are considered stable
995        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
996        pub fn as_str_name(&self) -> &'static str {
997            match self {
998                Self::Unspecified => "CDC_TABLE_TYPE_UNSPECIFIED",
999                Self::Postgres => "CDC_TABLE_TYPE_POSTGRES",
1000                Self::Mysql => "CDC_TABLE_TYPE_MYSQL",
1001                Self::Sqlserver => "CDC_TABLE_TYPE_SQLSERVER",
1002                Self::Mongo => "CDC_TABLE_TYPE_MONGO",
1003                Self::Citus => "CDC_TABLE_TYPE_CITUS",
1004            }
1005        }
1006        /// Creates an enum from field names used in the ProtoBuf definition.
1007        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1008            match value {
1009                "CDC_TABLE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1010                "CDC_TABLE_TYPE_POSTGRES" => Some(Self::Postgres),
1011                "CDC_TABLE_TYPE_MYSQL" => Some(Self::Mysql),
1012                "CDC_TABLE_TYPE_SQLSERVER" => Some(Self::Sqlserver),
1013                "CDC_TABLE_TYPE_MONGO" => Some(Self::Mongo),
1014                "CDC_TABLE_TYPE_CITUS" => Some(Self::Citus),
1015                _ => None,
1016            }
1017        }
1018    }
1019    #[derive(prost_helpers::AnyPB)]
1020    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1021    pub enum OptionalAssociatedSourceId {
1022        #[prost(uint32, tag = "9")]
1023        AssociatedSourceId(u32),
1024    }
1025}
1026#[derive(prost_helpers::AnyPB)]
1027#[derive(Clone, PartialEq, ::prost::Message)]
1028pub struct View {
1029    #[prost(uint32, tag = "1", wrapper = "crate::id::ViewId")]
1030    pub id: crate::id::ViewId,
1031    #[prost(uint32, tag = "2", wrapper = "crate::id::SchemaId")]
1032    pub schema_id: crate::id::SchemaId,
1033    #[prost(uint32, tag = "3", wrapper = "crate::id::DatabaseId")]
1034    pub database_id: crate::id::DatabaseId,
1035    #[prost(string, tag = "4")]
1036    pub name: ::prost::alloc::string::String,
1037    #[prost(uint32, tag = "5")]
1038    pub owner: u32,
1039    #[prost(btree_map = "string, string", tag = "6")]
1040    pub properties: ::prost::alloc::collections::BTreeMap<
1041        ::prost::alloc::string::String,
1042        ::prost::alloc::string::String,
1043    >,
1044    #[prost(string, tag = "7")]
1045    pub sql: ::prost::alloc::string::String,
1046    /// User-specified column names.
1047    #[prost(message, repeated, tag = "9")]
1048    pub columns: ::prost::alloc::vec::Vec<super::plan_common::Field>,
1049}
1050#[derive(prost_helpers::AnyPB)]
1051#[derive(Clone, PartialEq, ::prost::Message)]
1052pub struct Schema {
1053    #[prost(uint32, tag = "1", wrapper = "crate::id::SchemaId")]
1054    pub id: crate::id::SchemaId,
1055    #[prost(uint32, tag = "2", wrapper = "crate::id::DatabaseId")]
1056    pub database_id: crate::id::DatabaseId,
1057    #[prost(string, tag = "3")]
1058    pub name: ::prost::alloc::string::String,
1059    #[prost(uint32, tag = "4")]
1060    pub owner: u32,
1061}
1062#[derive(prost_helpers::AnyPB)]
1063#[derive(Clone, PartialEq, ::prost::Message)]
1064pub struct Database {
1065    #[prost(uint32, tag = "1", wrapper = "crate::id::DatabaseId")]
1066    pub id: crate::id::DatabaseId,
1067    #[prost(string, tag = "2")]
1068    pub name: ::prost::alloc::string::String,
1069    #[prost(uint32, tag = "3")]
1070    pub owner: u32,
1071    #[prost(string, tag = "4")]
1072    pub resource_group: ::prost::alloc::string::String,
1073    #[prost(uint32, optional, tag = "5")]
1074    pub barrier_interval_ms: ::core::option::Option<u32>,
1075    #[prost(uint64, optional, tag = "6")]
1076    pub checkpoint_frequency: ::core::option::Option<u64>,
1077}
1078#[derive(prost_helpers::AnyPB)]
1079#[derive(Clone, PartialEq, ::prost::Message)]
1080pub struct Comment {
1081    #[prost(uint32, tag = "1", wrapper = "crate::id::TableId")]
1082    pub table_id: crate::id::TableId,
1083    #[prost(uint32, tag = "2", wrapper = "crate::id::SchemaId")]
1084    pub schema_id: crate::id::SchemaId,
1085    #[prost(uint32, tag = "3", wrapper = "crate::id::DatabaseId")]
1086    pub database_id: crate::id::DatabaseId,
1087    #[prost(uint32, optional, tag = "4")]
1088    pub column_index: ::core::option::Option<u32>,
1089    #[prost(string, optional, tag = "5")]
1090    pub description: ::core::option::Option<::prost::alloc::string::String>,
1091}
1092#[derive(prost_helpers::AnyPB)]
1093#[derive(Clone, PartialEq, ::prost::Message)]
1094pub struct Secret {
1095    #[prost(uint32, tag = "1", wrapper = "crate::id::SecretId")]
1096    pub id: crate::id::SecretId,
1097    #[prost(string, tag = "2")]
1098    pub name: ::prost::alloc::string::String,
1099    #[prost(uint32, tag = "3", wrapper = "crate::id::DatabaseId")]
1100    pub database_id: crate::id::DatabaseId,
1101    /// The secret here is encrypted to bytes.
1102    #[prost(bytes = "vec", tag = "4")]
1103    pub value: ::prost::alloc::vec::Vec<u8>,
1104    #[prost(uint32, tag = "5")]
1105    pub owner: u32,
1106    #[prost(uint32, tag = "6", wrapper = "crate::id::SchemaId")]
1107    pub schema_id: crate::id::SchemaId,
1108}
1109#[derive(prost_helpers::AnyPB)]
1110#[derive(Clone, PartialEq, ::prost::Message)]
1111pub struct OptionsWithSecret {
1112    #[prost(map = "string, string", tag = "1")]
1113    pub options: ::std::collections::HashMap<
1114        ::prost::alloc::string::String,
1115        ::prost::alloc::string::String,
1116    >,
1117    #[prost(map = "string, message", tag = "2")]
1118    pub secret_refs: ::std::collections::HashMap<
1119        ::prost::alloc::string::String,
1120        super::secret::SecretRef,
1121    >,
1122}
1123#[derive(prost_helpers::AnyPB)]
1124#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1125#[repr(i32)]
1126pub enum SchemaRegistryNameStrategy {
1127    Unspecified = 0,
1128    RecordNameStrategy = 1,
1129    TopicRecordNameStrategy = 2,
1130}
1131impl SchemaRegistryNameStrategy {
1132    /// String value of the enum field names used in the ProtoBuf definition.
1133    ///
1134    /// The values are not transformed in any way and thus are considered stable
1135    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1136    pub fn as_str_name(&self) -> &'static str {
1137        match self {
1138            Self::Unspecified => "SCHEMA_REGISTRY_NAME_STRATEGY_UNSPECIFIED",
1139            Self::RecordNameStrategy => {
1140                "SCHEMA_REGISTRY_NAME_STRATEGY_RECORD_NAME_STRATEGY"
1141            }
1142            Self::TopicRecordNameStrategy => {
1143                "SCHEMA_REGISTRY_NAME_STRATEGY_TOPIC_RECORD_NAME_STRATEGY"
1144            }
1145        }
1146    }
1147    /// Creates an enum from field names used in the ProtoBuf definition.
1148    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1149        match value {
1150            "SCHEMA_REGISTRY_NAME_STRATEGY_UNSPECIFIED" => Some(Self::Unspecified),
1151            "SCHEMA_REGISTRY_NAME_STRATEGY_RECORD_NAME_STRATEGY" => {
1152                Some(Self::RecordNameStrategy)
1153            }
1154            "SCHEMA_REGISTRY_NAME_STRATEGY_TOPIC_RECORD_NAME_STRATEGY" => {
1155                Some(Self::TopicRecordNameStrategy)
1156            }
1157            _ => None,
1158        }
1159    }
1160}
1161#[derive(prost_helpers::AnyPB)]
1162#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1163#[repr(i32)]
1164pub enum StreamJobStatus {
1165    /// Prefixed by `STREAM_JOB_STATUS` due to protobuf namespacing rules.
1166    Unspecified = 0,
1167    Creating = 1,
1168    Created = 2,
1169}
1170impl StreamJobStatus {
1171    /// String value of the enum field names used in the ProtoBuf definition.
1172    ///
1173    /// The values are not transformed in any way and thus are considered stable
1174    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1175    pub fn as_str_name(&self) -> &'static str {
1176        match self {
1177            Self::Unspecified => "STREAM_JOB_STATUS_UNSPECIFIED",
1178            Self::Creating => "STREAM_JOB_STATUS_CREATING",
1179            Self::Created => "STREAM_JOB_STATUS_CREATED",
1180        }
1181    }
1182    /// Creates an enum from field names used in the ProtoBuf definition.
1183    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1184        match value {
1185            "STREAM_JOB_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
1186            "STREAM_JOB_STATUS_CREATING" => Some(Self::Creating),
1187            "STREAM_JOB_STATUS_CREATED" => Some(Self::Created),
1188            _ => None,
1189        }
1190    }
1191}
1192/// How the stream job was created will determine
1193/// whether they are persisted.
1194#[derive(prost_helpers::AnyPB)]
1195#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1196#[repr(i32)]
1197pub enum CreateType {
1198    Unspecified = 0,
1199    Background = 1,
1200    Foreground = 2,
1201}
1202impl CreateType {
1203    /// String value of the enum field names used in the ProtoBuf definition.
1204    ///
1205    /// The values are not transformed in any way and thus are considered stable
1206    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1207    pub fn as_str_name(&self) -> &'static str {
1208        match self {
1209            Self::Unspecified => "CREATE_TYPE_UNSPECIFIED",
1210            Self::Background => "CREATE_TYPE_BACKGROUND",
1211            Self::Foreground => "CREATE_TYPE_FOREGROUND",
1212        }
1213    }
1214    /// Creates an enum from field names used in the ProtoBuf definition.
1215    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1216        match value {
1217            "CREATE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1218            "CREATE_TYPE_BACKGROUND" => Some(Self::Background),
1219            "CREATE_TYPE_FOREGROUND" => Some(Self::Foreground),
1220            _ => None,
1221        }
1222    }
1223}
1224#[derive(prost_helpers::AnyPB)]
1225#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1226#[repr(i32)]
1227pub enum SinkType {
1228    Unspecified = 0,
1229    AppendOnly = 1,
1230    ForceAppendOnly = 2,
1231    Upsert = 3,
1232    Retract = 4,
1233}
1234impl SinkType {
1235    /// String value of the enum field names used in the ProtoBuf definition.
1236    ///
1237    /// The values are not transformed in any way and thus are considered stable
1238    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1239    pub fn as_str_name(&self) -> &'static str {
1240        match self {
1241            Self::Unspecified => "SINK_TYPE_UNSPECIFIED",
1242            Self::AppendOnly => "SINK_TYPE_APPEND_ONLY",
1243            Self::ForceAppendOnly => "SINK_TYPE_FORCE_APPEND_ONLY",
1244            Self::Upsert => "SINK_TYPE_UPSERT",
1245            Self::Retract => "SINK_TYPE_RETRACT",
1246        }
1247    }
1248    /// Creates an enum from field names used in the ProtoBuf definition.
1249    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1250        match value {
1251            "SINK_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1252            "SINK_TYPE_APPEND_ONLY" => Some(Self::AppendOnly),
1253            "SINK_TYPE_FORCE_APPEND_ONLY" => Some(Self::ForceAppendOnly),
1254            "SINK_TYPE_UPSERT" => Some(Self::Upsert),
1255            "SINK_TYPE_RETRACT" => Some(Self::Retract),
1256            _ => None,
1257        }
1258    }
1259}
1260#[derive(prost_helpers::AnyPB)]
1261#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1262#[repr(i32)]
1263pub enum HandleConflictBehavior {
1264    Unspecified = 0,
1265    Overwrite = 1,
1266    Ignore = 2,
1267    NoCheck = 3,
1268    DoUpdateIfNotNull = 4,
1269}
1270impl HandleConflictBehavior {
1271    /// String value of the enum field names used in the ProtoBuf definition.
1272    ///
1273    /// The values are not transformed in any way and thus are considered stable
1274    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1275    pub fn as_str_name(&self) -> &'static str {
1276        match self {
1277            Self::Unspecified => "HANDLE_CONFLICT_BEHAVIOR_UNSPECIFIED",
1278            Self::Overwrite => "HANDLE_CONFLICT_BEHAVIOR_OVERWRITE",
1279            Self::Ignore => "HANDLE_CONFLICT_BEHAVIOR_IGNORE",
1280            Self::NoCheck => "HANDLE_CONFLICT_BEHAVIOR_NO_CHECK",
1281            Self::DoUpdateIfNotNull => "HANDLE_CONFLICT_BEHAVIOR_DO_UPDATE_IF_NOT_NULL",
1282        }
1283    }
1284    /// Creates an enum from field names used in the ProtoBuf definition.
1285    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1286        match value {
1287            "HANDLE_CONFLICT_BEHAVIOR_UNSPECIFIED" => Some(Self::Unspecified),
1288            "HANDLE_CONFLICT_BEHAVIOR_OVERWRITE" => Some(Self::Overwrite),
1289            "HANDLE_CONFLICT_BEHAVIOR_IGNORE" => Some(Self::Ignore),
1290            "HANDLE_CONFLICT_BEHAVIOR_NO_CHECK" => Some(Self::NoCheck),
1291            "HANDLE_CONFLICT_BEHAVIOR_DO_UPDATE_IF_NOT_NULL" => {
1292                Some(Self::DoUpdateIfNotNull)
1293            }
1294            _ => None,
1295        }
1296    }
1297}
1298/// State of refresh operation for refreshable tables
1299#[derive(prost_helpers::AnyPB)]
1300#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1301#[repr(i32)]
1302pub enum RefreshState {
1303    Unspecified = 0,
1304    Idle = 1,
1305    Refreshing = 2,
1306    Finishing = 3,
1307}
1308impl RefreshState {
1309    /// String value of the enum field names used in the ProtoBuf definition.
1310    ///
1311    /// The values are not transformed in any way and thus are considered stable
1312    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1313    pub fn as_str_name(&self) -> &'static str {
1314        match self {
1315            Self::Unspecified => "REFRESH_STATE_UNSPECIFIED",
1316            Self::Idle => "REFRESH_STATE_IDLE",
1317            Self::Refreshing => "REFRESH_STATE_REFRESHING",
1318            Self::Finishing => "REFRESH_STATE_FINISHING",
1319        }
1320    }
1321    /// Creates an enum from field names used in the ProtoBuf definition.
1322    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1323        match value {
1324            "REFRESH_STATE_UNSPECIFIED" => Some(Self::Unspecified),
1325            "REFRESH_STATE_IDLE" => Some(Self::Idle),
1326            "REFRESH_STATE_REFRESHING" => Some(Self::Refreshing),
1327            "REFRESH_STATE_FINISHING" => Some(Self::Finishing),
1328            _ => None,
1329        }
1330    }
1331}