1#[derive(prost_helpers::AnyPB)]
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct ColIndexMapping {
6    #[prost(uint64, tag = "1")]
8    pub target_size: u64,
9    #[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    #[prost(uint32, tag = "1")]
20    pub watermark_idx: u32,
21    #[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    #[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    #[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    #[prost(bool, tag = "13")]
69    pub cdc_source_job: bool,
70    #[prost(bool, tag = "15")]
76    pub is_distributed: bool,
77    #[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    #[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    #[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    #[prost(bool, tag = "3")]
104    pub wait_for_persistence: bool,
105    #[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    #[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    #[prost(uint32, optional, tag = "5")]
125    pub row_id_index: ::core::option::Option<u32>,
126    #[prost(message, repeated, tag = "6")]
128    pub columns: ::prost::alloc::vec::Vec<super::plan_common::ColumnCatalog>,
129    #[prost(int32, repeated, tag = "7")]
132    pub pk_column_ids: ::prost::alloc::vec::Vec<i32>,
133    #[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    #[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    #[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    #[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    #[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    #[prost(uint64, tag = "100")]
174    pub version: u64,
175    #[prost(uint32, optional, tag = "101")]
176    pub rate_limit: ::core::option::Option<u32>,
177    #[prost(oneof = "source::OptionalAssociatedTableId", tags = "12")]
179    pub optional_associated_table_id: ::core::option::Option<
180        source::OptionalAssociatedTableId,
181    >,
182}
183pub mod source {
185    #[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#[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    #[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    #[prost(uint32, optional, tag = "6")]
216    pub connection_id: ::core::option::Option<u32>,
217}
218#[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    #[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    #[prost(int32, repeated, tag = "9")]
242    pub downstream_pk: ::prost::alloc::vec::Vec<i32>,
243    #[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    #[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    #[prost(uint32, optional, tag = "21")]
272    pub target_table: ::core::option::Option<u32>,
273    #[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    #[prost(enumeration = "CreateType", tag = "24")]
284    pub create_type: i32,
285    #[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    #[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}
334pub 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        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        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}
393pub 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        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        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}
458pub 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    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            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            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    #[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    #[prost(uint32, tag = "13")]
561    pub index_columns_len: u32,
562    #[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    #[prost(enumeration = "CreateType", tag = "17")]
573    pub create_type: i32,
574}
575#[derive(prost_helpers::AnyPB)]
577#[derive(Eq, Hash)]
578#[derive(Clone, Copy, PartialEq, ::prost::Message)]
579pub struct IndexColumnProperties {
580    #[prost(bool, tag = "1")]
582    pub is_desc: bool,
583    #[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    #[prost(string, optional, tag = "10")]
612    pub name_in_runtime: ::core::option::Option<::prost::alloc::string::String>,
613    #[prost(string, optional, tag = "14")]
615    pub body: ::core::option::Option<::prost::alloc::string::String>,
616    #[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    #[prost(string, optional, tag = "18")]
623    pub runtime: ::core::option::Option<::prost::alloc::string::String>,
624    #[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    #[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}
639pub 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}
687pub 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        #[prost(message, tag = "65")]
695        Flat(super::FlatIndexConfig),
696        #[prost(message, tag = "66")]
697        HnswFlat(super::HnswFlatIndexConfig),
698    }
699}
700#[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")]
721    pub pk: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
722    #[prost(enumeration = "table::TableType", tag = "10")]
723    pub table_type: i32,
724    #[prost(int32, repeated, tag = "12")]
725    pub distribution_key: ::prost::alloc::vec::Vec<i32>,
726    #[prost(int32, repeated, tag = "13")]
728    pub stream_key: ::prost::alloc::vec::Vec<i32>,
729    #[prost(bool, tag = "14")]
730    pub append_only: bool,
731    #[prost(uint32, tag = "15")]
732    pub owner: u32,
733    #[prost(uint32, tag = "17")]
734    pub fragment_id: u32,
735    #[prost(uint32, optional, tag = "18")]
738    pub vnode_col_index: ::core::option::Option<u32>,
739    #[prost(uint32, optional, tag = "19")]
742    pub row_id_index: ::core::option::Option<u32>,
743    #[prost(int32, repeated, tag = "20")]
747    pub value_indices: ::prost::alloc::vec::Vec<i32>,
748    #[prost(string, tag = "21")]
749    pub definition: ::prost::alloc::string::String,
750    #[prost(enumeration = "HandleConflictBehavior", tag = "22")]
752    pub handle_pk_conflict_behavior: i32,
753    #[prost(uint32, tag = "23")]
757    pub read_prefix_len_hint: u32,
758    #[prost(int32, repeated, tag = "24")]
759    pub watermark_indices: ::prost::alloc::vec::Vec<i32>,
760    #[prost(int32, repeated, tag = "25")]
761    pub dist_key_in_pk: ::prost::alloc::vec::Vec<i32>,
762    #[prost(uint32, optional, tag = "26")]
765    pub dml_fragment_id: ::core::option::Option<u32>,
766    #[prost(message, optional, tag = "27")]
770    pub cardinality: ::core::option::Option<super::plan_common::Cardinality>,
771    #[prost(uint64, optional, tag = "28")]
772    pub initialized_at_epoch: ::core::option::Option<u64>,
773    #[prost(uint64, optional, tag = "29")]
774    pub created_at_epoch: ::core::option::Option<u64>,
775    #[prost(bool, tag = "30")]
779    pub cleaned_by_watermark: bool,
780    #[prost(enumeration = "StreamJobStatus", tag = "31")]
782    pub stream_job_status: i32,
783    #[prost(enumeration = "CreateType", tag = "32")]
784    pub create_type: i32,
785    #[prost(string, optional, tag = "33")]
787    pub description: ::core::option::Option<::prost::alloc::string::String>,
788    #[deprecated]
790    #[prost(uint32, repeated, packed = "false", tag = "34")]
791    pub incoming_sinks: ::prost::alloc::vec::Vec<u32>,
792    #[prost(string, optional, tag = "35")]
794    pub initialized_at_cluster_version: ::core::option::Option<
795        ::prost::alloc::string::String,
796    >,
797    #[prost(string, optional, tag = "36")]
798    pub created_at_cluster_version: ::core::option::Option<
799        ::prost::alloc::string::String,
800    >,
801    #[prost(uint32, optional, tag = "37")]
804    pub retention_seconds: ::core::option::Option<u32>,
805    #[prost(uint32, repeated, packed = "false", tag = "38")]
809    pub version_column_indices: ::prost::alloc::vec::Vec<u32>,
810    #[prost(string, optional, tag = "39")]
814    pub cdc_table_id: ::core::option::Option<::prost::alloc::string::String>,
815    #[prost(uint32, optional, tag = "40")]
828    pub maybe_vnode_count: ::core::option::Option<u32>,
829    #[prost(message, optional, tag = "41")]
831    pub webhook_info: ::core::option::Option<WebhookSourceInfo>,
832    #[prost(uint32, optional, tag = "42")]
834    pub job_id: ::core::option::Option<u32>,
835    #[prost(enumeration = "table::Engine", optional, tag = "43")]
837    pub engine: ::core::option::Option<i32>,
838    #[prost(int32, optional, tag = "44")]
841    pub clean_watermark_index_in_pk: ::core::option::Option<i32>,
842    #[prost(bool, tag = "45")]
845    pub refreshable: bool,
846    #[prost(message, optional, tag = "46")]
848    pub vector_index_info: ::core::option::Option<VectorIndexInfo>,
849    #[prost(enumeration = "table::CdcTableType", optional, tag = "47")]
850    pub cdc_table_type: ::core::option::Option<i32>,
851    #[prost(enumeration = "RefreshState", optional, tag = "48")]
853    pub refresh_state: ::core::option::Option<i32>,
854    #[prost(message, optional, tag = "100")]
858    pub version: ::core::option::Option<table::TableVersion>,
859    #[prost(oneof = "table::OptionalAssociatedSourceId", tags = "9")]
860    pub optional_associated_source_id: ::core::option::Option<
861        table::OptionalAssociatedSourceId,
862    >,
863}
864pub mod table {
866    #[derive(prost_helpers::AnyPB)]
867    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
868    pub struct TableVersion {
869        #[prost(uint64, tag = "1")]
872        pub version: u64,
873        #[prost(int32, tag = "2")]
876        pub next_column_id: i32,
877    }
878    #[derive(prost_helpers::AnyPB)]
879    #[derive(
880        Clone,
881        Copy,
882        Debug,
883        PartialEq,
884        Eq,
885        Hash,
886        PartialOrd,
887        Ord,
888        ::prost::Enumeration
889    )]
890    #[repr(i32)]
891    pub enum TableType {
892        Unspecified = 0,
893        Table = 1,
894        MaterializedView = 2,
895        Index = 3,
896        Internal = 4,
897        VectorIndex = 5,
898    }
899    impl TableType {
900        pub fn as_str_name(&self) -> &'static str {
905            match self {
906                Self::Unspecified => "UNSPECIFIED",
907                Self::Table => "TABLE",
908                Self::MaterializedView => "MATERIALIZED_VIEW",
909                Self::Index => "INDEX",
910                Self::Internal => "INTERNAL",
911                Self::VectorIndex => "VECTOR_INDEX",
912            }
913        }
914        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
916            match value {
917                "UNSPECIFIED" => Some(Self::Unspecified),
918                "TABLE" => Some(Self::Table),
919                "MATERIALIZED_VIEW" => Some(Self::MaterializedView),
920                "INDEX" => Some(Self::Index),
921                "INTERNAL" => Some(Self::Internal),
922                "VECTOR_INDEX" => Some(Self::VectorIndex),
923                _ => None,
924            }
925        }
926    }
927    #[derive(prost_helpers::AnyPB)]
928    #[derive(
929        Clone,
930        Copy,
931        Debug,
932        PartialEq,
933        Eq,
934        Hash,
935        PartialOrd,
936        Ord,
937        ::prost::Enumeration
938    )]
939    #[repr(i32)]
940    pub enum Engine {
941        Unspecified = 0,
942        Hummock = 1,
943        Iceberg = 2,
944    }
945    impl Engine {
946        pub fn as_str_name(&self) -> &'static str {
951            match self {
952                Self::Unspecified => "ENGINE_UNSPECIFIED",
953                Self::Hummock => "HUMMOCK",
954                Self::Iceberg => "ICEBERG",
955            }
956        }
957        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
959            match value {
960                "ENGINE_UNSPECIFIED" => Some(Self::Unspecified),
961                "HUMMOCK" => Some(Self::Hummock),
962                "ICEBERG" => Some(Self::Iceberg),
963                _ => None,
964            }
965        }
966    }
967    #[derive(prost_helpers::AnyPB)]
968    #[derive(
969        Clone,
970        Copy,
971        Debug,
972        PartialEq,
973        Eq,
974        Hash,
975        PartialOrd,
976        Ord,
977        ::prost::Enumeration
978    )]
979    #[repr(i32)]
980    pub enum CdcTableType {
981        Unspecified = 0,
982        Postgres = 1,
983        Mysql = 2,
984        Sqlserver = 3,
985        Mongo = 4,
986        Citus = 5,
987    }
988    impl CdcTableType {
989        pub fn as_str_name(&self) -> &'static str {
994            match self {
995                Self::Unspecified => "CDC_TABLE_TYPE_UNSPECIFIED",
996                Self::Postgres => "CDC_TABLE_TYPE_POSTGRES",
997                Self::Mysql => "CDC_TABLE_TYPE_MYSQL",
998                Self::Sqlserver => "CDC_TABLE_TYPE_SQLSERVER",
999                Self::Mongo => "CDC_TABLE_TYPE_MONGO",
1000                Self::Citus => "CDC_TABLE_TYPE_CITUS",
1001            }
1002        }
1003        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1005            match value {
1006                "CDC_TABLE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1007                "CDC_TABLE_TYPE_POSTGRES" => Some(Self::Postgres),
1008                "CDC_TABLE_TYPE_MYSQL" => Some(Self::Mysql),
1009                "CDC_TABLE_TYPE_SQLSERVER" => Some(Self::Sqlserver),
1010                "CDC_TABLE_TYPE_MONGO" => Some(Self::Mongo),
1011                "CDC_TABLE_TYPE_CITUS" => Some(Self::Citus),
1012                _ => None,
1013            }
1014        }
1015    }
1016    #[derive(prost_helpers::AnyPB)]
1017    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1018    pub enum OptionalAssociatedSourceId {
1019        #[prost(uint32, tag = "9")]
1020        AssociatedSourceId(u32),
1021    }
1022}
1023#[derive(prost_helpers::AnyPB)]
1024#[derive(Clone, PartialEq, ::prost::Message)]
1025pub struct View {
1026    #[prost(uint32, tag = "1")]
1027    pub id: u32,
1028    #[prost(uint32, tag = "2")]
1029    pub schema_id: u32,
1030    #[prost(uint32, tag = "3")]
1031    pub database_id: u32,
1032    #[prost(string, tag = "4")]
1033    pub name: ::prost::alloc::string::String,
1034    #[prost(uint32, tag = "5")]
1035    pub owner: u32,
1036    #[prost(btree_map = "string, string", tag = "6")]
1037    pub properties: ::prost::alloc::collections::BTreeMap<
1038        ::prost::alloc::string::String,
1039        ::prost::alloc::string::String,
1040    >,
1041    #[prost(string, tag = "7")]
1042    pub sql: ::prost::alloc::string::String,
1043    #[prost(message, repeated, tag = "9")]
1045    pub columns: ::prost::alloc::vec::Vec<super::plan_common::Field>,
1046}
1047#[derive(prost_helpers::AnyPB)]
1048#[derive(Clone, PartialEq, ::prost::Message)]
1049pub struct Schema {
1050    #[prost(uint32, tag = "1")]
1051    pub id: u32,
1052    #[prost(uint32, tag = "2")]
1053    pub database_id: u32,
1054    #[prost(string, tag = "3")]
1055    pub name: ::prost::alloc::string::String,
1056    #[prost(uint32, tag = "4")]
1057    pub owner: u32,
1058}
1059#[derive(prost_helpers::AnyPB)]
1060#[derive(Clone, PartialEq, ::prost::Message)]
1061pub struct Database {
1062    #[prost(uint32, tag = "1")]
1063    pub id: u32,
1064    #[prost(string, tag = "2")]
1065    pub name: ::prost::alloc::string::String,
1066    #[prost(uint32, tag = "3")]
1067    pub owner: u32,
1068    #[prost(string, tag = "4")]
1069    pub resource_group: ::prost::alloc::string::String,
1070    #[prost(uint32, optional, tag = "5")]
1071    pub barrier_interval_ms: ::core::option::Option<u32>,
1072    #[prost(uint64, optional, tag = "6")]
1073    pub checkpoint_frequency: ::core::option::Option<u64>,
1074}
1075#[derive(prost_helpers::AnyPB)]
1076#[derive(Clone, PartialEq, ::prost::Message)]
1077pub struct Comment {
1078    #[prost(uint32, tag = "1")]
1079    pub table_id: u32,
1080    #[prost(uint32, tag = "2")]
1081    pub schema_id: u32,
1082    #[prost(uint32, tag = "3")]
1083    pub database_id: u32,
1084    #[prost(uint32, optional, tag = "4")]
1085    pub column_index: ::core::option::Option<u32>,
1086    #[prost(string, optional, tag = "5")]
1087    pub description: ::core::option::Option<::prost::alloc::string::String>,
1088}
1089#[derive(prost_helpers::AnyPB)]
1090#[derive(Clone, PartialEq, ::prost::Message)]
1091pub struct Secret {
1092    #[prost(uint32, tag = "1")]
1093    pub id: u32,
1094    #[prost(string, tag = "2")]
1095    pub name: ::prost::alloc::string::String,
1096    #[prost(uint32, tag = "3")]
1097    pub database_id: u32,
1098    #[prost(bytes = "vec", tag = "4")]
1100    pub value: ::prost::alloc::vec::Vec<u8>,
1101    #[prost(uint32, tag = "5")]
1102    pub owner: u32,
1103    #[prost(uint32, tag = "6")]
1104    pub schema_id: u32,
1105}
1106#[derive(prost_helpers::AnyPB)]
1107#[derive(Clone, PartialEq, ::prost::Message)]
1108pub struct OptionsWithSecret {
1109    #[prost(map = "string, string", tag = "1")]
1110    pub options: ::std::collections::HashMap<
1111        ::prost::alloc::string::String,
1112        ::prost::alloc::string::String,
1113    >,
1114    #[prost(map = "string, message", tag = "2")]
1115    pub secret_refs: ::std::collections::HashMap<
1116        ::prost::alloc::string::String,
1117        super::secret::SecretRef,
1118    >,
1119}
1120#[derive(prost_helpers::AnyPB)]
1121#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1122#[repr(i32)]
1123pub enum SchemaRegistryNameStrategy {
1124    Unspecified = 0,
1125    RecordNameStrategy = 1,
1126    TopicRecordNameStrategy = 2,
1127}
1128impl SchemaRegistryNameStrategy {
1129    pub fn as_str_name(&self) -> &'static str {
1134        match self {
1135            Self::Unspecified => "SCHEMA_REGISTRY_NAME_STRATEGY_UNSPECIFIED",
1136            Self::RecordNameStrategy => {
1137                "SCHEMA_REGISTRY_NAME_STRATEGY_RECORD_NAME_STRATEGY"
1138            }
1139            Self::TopicRecordNameStrategy => {
1140                "SCHEMA_REGISTRY_NAME_STRATEGY_TOPIC_RECORD_NAME_STRATEGY"
1141            }
1142        }
1143    }
1144    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1146        match value {
1147            "SCHEMA_REGISTRY_NAME_STRATEGY_UNSPECIFIED" => Some(Self::Unspecified),
1148            "SCHEMA_REGISTRY_NAME_STRATEGY_RECORD_NAME_STRATEGY" => {
1149                Some(Self::RecordNameStrategy)
1150            }
1151            "SCHEMA_REGISTRY_NAME_STRATEGY_TOPIC_RECORD_NAME_STRATEGY" => {
1152                Some(Self::TopicRecordNameStrategy)
1153            }
1154            _ => None,
1155        }
1156    }
1157}
1158#[derive(prost_helpers::AnyPB)]
1159#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1160#[repr(i32)]
1161pub enum StreamJobStatus {
1162    Unspecified = 0,
1164    Creating = 1,
1165    Created = 2,
1166}
1167impl StreamJobStatus {
1168    pub fn as_str_name(&self) -> &'static str {
1173        match self {
1174            Self::Unspecified => "STREAM_JOB_STATUS_UNSPECIFIED",
1175            Self::Creating => "STREAM_JOB_STATUS_CREATING",
1176            Self::Created => "STREAM_JOB_STATUS_CREATED",
1177        }
1178    }
1179    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1181        match value {
1182            "STREAM_JOB_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
1183            "STREAM_JOB_STATUS_CREATING" => Some(Self::Creating),
1184            "STREAM_JOB_STATUS_CREATED" => Some(Self::Created),
1185            _ => None,
1186        }
1187    }
1188}
1189#[derive(prost_helpers::AnyPB)]
1192#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1193#[repr(i32)]
1194pub enum CreateType {
1195    Unspecified = 0,
1196    Background = 1,
1197    Foreground = 2,
1198}
1199impl CreateType {
1200    pub fn as_str_name(&self) -> &'static str {
1205        match self {
1206            Self::Unspecified => "CREATE_TYPE_UNSPECIFIED",
1207            Self::Background => "CREATE_TYPE_BACKGROUND",
1208            Self::Foreground => "CREATE_TYPE_FOREGROUND",
1209        }
1210    }
1211    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1213        match value {
1214            "CREATE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1215            "CREATE_TYPE_BACKGROUND" => Some(Self::Background),
1216            "CREATE_TYPE_FOREGROUND" => Some(Self::Foreground),
1217            _ => None,
1218        }
1219    }
1220}
1221#[derive(prost_helpers::AnyPB)]
1222#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1223#[repr(i32)]
1224pub enum SinkType {
1225    Unspecified = 0,
1226    AppendOnly = 1,
1227    ForceAppendOnly = 2,
1228    Upsert = 3,
1229    Retract = 4,
1230}
1231impl SinkType {
1232    pub fn as_str_name(&self) -> &'static str {
1237        match self {
1238            Self::Unspecified => "SINK_TYPE_UNSPECIFIED",
1239            Self::AppendOnly => "SINK_TYPE_APPEND_ONLY",
1240            Self::ForceAppendOnly => "SINK_TYPE_FORCE_APPEND_ONLY",
1241            Self::Upsert => "SINK_TYPE_UPSERT",
1242            Self::Retract => "SINK_TYPE_RETRACT",
1243        }
1244    }
1245    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1247        match value {
1248            "SINK_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1249            "SINK_TYPE_APPEND_ONLY" => Some(Self::AppendOnly),
1250            "SINK_TYPE_FORCE_APPEND_ONLY" => Some(Self::ForceAppendOnly),
1251            "SINK_TYPE_UPSERT" => Some(Self::Upsert),
1252            "SINK_TYPE_RETRACT" => Some(Self::Retract),
1253            _ => None,
1254        }
1255    }
1256}
1257#[derive(prost_helpers::AnyPB)]
1258#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1259#[repr(i32)]
1260pub enum HandleConflictBehavior {
1261    Unspecified = 0,
1262    Overwrite = 1,
1263    Ignore = 2,
1264    NoCheck = 3,
1265    DoUpdateIfNotNull = 4,
1266}
1267impl HandleConflictBehavior {
1268    pub fn as_str_name(&self) -> &'static str {
1273        match self {
1274            Self::Unspecified => "HANDLE_CONFLICT_BEHAVIOR_UNSPECIFIED",
1275            Self::Overwrite => "HANDLE_CONFLICT_BEHAVIOR_OVERWRITE",
1276            Self::Ignore => "HANDLE_CONFLICT_BEHAVIOR_IGNORE",
1277            Self::NoCheck => "HANDLE_CONFLICT_BEHAVIOR_NO_CHECK",
1278            Self::DoUpdateIfNotNull => "HANDLE_CONFLICT_BEHAVIOR_DO_UPDATE_IF_NOT_NULL",
1279        }
1280    }
1281    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1283        match value {
1284            "HANDLE_CONFLICT_BEHAVIOR_UNSPECIFIED" => Some(Self::Unspecified),
1285            "HANDLE_CONFLICT_BEHAVIOR_OVERWRITE" => Some(Self::Overwrite),
1286            "HANDLE_CONFLICT_BEHAVIOR_IGNORE" => Some(Self::Ignore),
1287            "HANDLE_CONFLICT_BEHAVIOR_NO_CHECK" => Some(Self::NoCheck),
1288            "HANDLE_CONFLICT_BEHAVIOR_DO_UPDATE_IF_NOT_NULL" => {
1289                Some(Self::DoUpdateIfNotNull)
1290            }
1291            _ => None,
1292        }
1293    }
1294}
1295#[derive(prost_helpers::AnyPB)]
1297#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1298#[repr(i32)]
1299pub enum RefreshState {
1300    Unspecified = 0,
1301    Idle = 1,
1302    Refreshing = 2,
1303    Finishing = 3,
1304}
1305impl RefreshState {
1306    pub fn as_str_name(&self) -> &'static str {
1311        match self {
1312            Self::Unspecified => "REFRESH_STATE_UNSPECIFIED",
1313            Self::Idle => "REFRESH_STATE_IDLE",
1314            Self::Refreshing => "REFRESH_STATE_REFRESHING",
1315            Self::Finishing => "REFRESH_STATE_FINISHING",
1316        }
1317    }
1318    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1320        match value {
1321            "REFRESH_STATE_UNSPECIFIED" => Some(Self::Unspecified),
1322            "REFRESH_STATE_IDLE" => Some(Self::Idle),
1323            "REFRESH_STATE_REFRESHING" => Some(Self::Refreshing),
1324            "REFRESH_STATE_FINISHING" => Some(Self::Finishing),
1325            _ => None,
1326        }
1327    }
1328}