risingwave_pb/
catalog.rs

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