1#[derive(prost_helpers::AnyPB)]
4#[derive(Clone, PartialEq, Eq, Hash, ::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 #[prost(bool, tag = "3")]
26 pub with_ttl: bool,
27}
28#[derive(prost_helpers::AnyPB)]
29#[derive(Eq, Hash)]
30#[derive(Clone, PartialEq, ::prost::Message)]
31pub struct StreamSourceInfo {
32 #[prost(enumeration = "super::plan_common::RowFormatType", tag = "1")]
34 pub row_format: i32,
35 #[prost(string, tag = "2")]
36 pub row_schema_location: ::prost::alloc::string::String,
37 #[prost(bool, tag = "3")]
44 pub use_schema_registry: bool,
45 #[prost(string, tag = "4")]
46 pub proto_message_name: ::prost::alloc::string::String,
47 #[prost(int32, tag = "5")]
48 pub csv_delimiter: i32,
49 #[prost(bool, tag = "6")]
50 pub csv_has_header: bool,
51 #[prost(enumeration = "super::plan_common::FormatType", tag = "8")]
52 pub format: i32,
53 #[prost(enumeration = "super::plan_common::EncodeType", tag = "9")]
54 pub row_encode: i32,
55 #[prost(enumeration = "SchemaRegistryNameStrategy", tag = "10")]
56 pub name_strategy: i32,
57 #[prost(string, optional, tag = "11")]
58 pub key_message_name: ::core::option::Option<::prost::alloc::string::String>,
59 #[prost(message, optional, tag = "12")]
60 pub external_table: ::core::option::Option<super::plan_common::ExternalTableDesc>,
61 #[prost(bool, tag = "13")]
73 pub cdc_source_job: bool,
74 #[prost(bool, tag = "15")]
80 pub is_distributed: bool,
81 #[prost(btree_map = "string, string", tag = "14")]
83 pub format_encode_options: ::prost::alloc::collections::BTreeMap<
84 ::prost::alloc::string::String,
85 ::prost::alloc::string::String,
86 >,
87 #[prost(btree_map = "string, message", tag = "16")]
90 pub format_encode_secret_refs: ::prost::alloc::collections::BTreeMap<
91 ::prost::alloc::string::String,
92 super::secret::SecretRef,
93 >,
94 #[prost(uint32, optional, tag = "17", wrapper = "crate::id::ConnectionId")]
96 pub connection_id: ::core::option::Option<crate::id::ConnectionId>,
97}
98#[derive(prost_helpers::AnyPB)]
99#[derive(Eq, Hash)]
100#[derive(Clone, PartialEq, ::prost::Message)]
101pub struct WebhookSourceInfo {
102 #[prost(message, optional, tag = "1")]
103 pub secret_ref: ::core::option::Option<super::secret::SecretRef>,
104 #[prost(message, optional, tag = "2")]
105 pub signature_expr: ::core::option::Option<super::expr::ExprNode>,
106 #[prost(bool, tag = "3")]
108 pub wait_for_persistence: bool,
109 #[prost(bool, tag = "4")]
111 pub is_batched: bool,
112}
113#[derive(prost_helpers::AnyPB)]
114#[derive(Clone, PartialEq, ::prost::Message)]
115pub struct Source {
116 #[prost(uint32, tag = "1", wrapper = "crate::id::SourceId")]
119 pub id: crate::id::SourceId,
120 #[prost(uint32, tag = "2", wrapper = "crate::id::SchemaId")]
121 pub schema_id: crate::id::SchemaId,
122 #[prost(uint32, tag = "3", wrapper = "crate::id::DatabaseId")]
123 pub database_id: crate::id::DatabaseId,
124 #[prost(string, tag = "4")]
125 pub name: ::prost::alloc::string::String,
126 #[prost(uint32, optional, tag = "5")]
129 pub row_id_index: ::core::option::Option<u32>,
130 #[prost(message, repeated, tag = "6")]
132 pub columns: ::prost::alloc::vec::Vec<super::plan_common::ColumnCatalog>,
133 #[prost(int32, repeated, tag = "7")]
136 pub pk_column_ids: ::prost::alloc::vec::Vec<i32>,
137 #[prost(btree_map = "string, string", tag = "8")]
139 pub with_properties: ::prost::alloc::collections::BTreeMap<
140 ::prost::alloc::string::String,
141 ::prost::alloc::string::String,
142 >,
143 #[prost(uint32, tag = "9", wrapper = "crate::id::UserId")]
144 pub owner: crate::id::UserId,
145 #[prost(message, optional, tag = "10")]
146 pub info: ::core::option::Option<StreamSourceInfo>,
147 #[prost(message, repeated, tag = "11")]
150 pub watermark_descs: ::prost::alloc::vec::Vec<WatermarkDesc>,
151 #[prost(string, tag = "13")]
152 pub definition: ::prost::alloc::string::String,
153 #[prost(uint32, optional, tag = "14", wrapper = "crate::id::ConnectionId")]
155 pub connection_id: ::core::option::Option<crate::id::ConnectionId>,
156 #[prost(uint64, optional, tag = "15")]
157 pub initialized_at_epoch: ::core::option::Option<u64>,
158 #[prost(uint64, optional, tag = "16")]
159 pub created_at_epoch: ::core::option::Option<u64>,
160 #[prost(string, optional, tag = "17")]
162 pub initialized_at_cluster_version: ::core::option::Option<
163 ::prost::alloc::string::String,
164 >,
165 #[prost(string, optional, tag = "18")]
166 pub created_at_cluster_version: ::core::option::Option<
167 ::prost::alloc::string::String,
168 >,
169 #[prost(btree_map = "string, message", tag = "19")]
172 pub secret_refs: ::prost::alloc::collections::BTreeMap<
173 ::prost::alloc::string::String,
174 super::secret::SecretRef,
175 >,
176 #[prost(message, optional, tag = "20")]
178 pub refresh_mode: ::core::option::Option<super::plan_common::SourceRefreshMode>,
179 #[prost(uint64, tag = "100")]
181 pub version: u64,
182 #[prost(uint32, optional, tag = "101")]
183 pub rate_limit: ::core::option::Option<u32>,
184 #[prost(oneof = "source::OptionalAssociatedTableId", tags = "12")]
186 pub optional_associated_table_id: ::core::option::Option<
187 source::OptionalAssociatedTableId,
188 >,
189}
190pub mod source {
192 #[derive(prost_helpers::AnyPB)]
194 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
195 pub enum OptionalAssociatedTableId {
196 #[prost(uint32, tag = "12", wrapper = "crate::id::TableId")]
197 AssociatedTableId(crate::id::TableId),
198 }
199}
200#[derive(prost_helpers::AnyPB)]
202#[derive(Clone, PartialEq, ::prost::Message)]
203pub struct SinkFormatDesc {
204 #[prost(enumeration = "super::plan_common::FormatType", tag = "1")]
205 pub format: i32,
206 #[prost(enumeration = "super::plan_common::EncodeType", tag = "2")]
207 pub encode: i32,
208 #[prost(btree_map = "string, string", tag = "3")]
209 pub options: ::prost::alloc::collections::BTreeMap<
210 ::prost::alloc::string::String,
211 ::prost::alloc::string::String,
212 >,
213 #[prost(enumeration = "super::plan_common::EncodeType", optional, tag = "4")]
214 pub key_encode: ::core::option::Option<i32>,
215 #[prost(btree_map = "string, message", tag = "5")]
217 pub secret_refs: ::prost::alloc::collections::BTreeMap<
218 ::prost::alloc::string::String,
219 super::secret::SecretRef,
220 >,
221 #[prost(uint32, optional, tag = "6", wrapper = "crate::id::ConnectionId")]
223 pub connection_id: ::core::option::Option<crate::id::ConnectionId>,
224}
225#[derive(prost_helpers::AnyPB)]
230#[derive(Clone, PartialEq, ::prost::Message)]
231pub struct Sink {
232 #[prost(uint32, tag = "1", wrapper = "crate::id::SinkId")]
233 pub id: crate::id::SinkId,
234 #[prost(uint32, tag = "2", wrapper = "crate::id::SchemaId")]
235 pub schema_id: crate::id::SchemaId,
236 #[prost(uint32, tag = "3", wrapper = "crate::id::DatabaseId")]
237 pub database_id: crate::id::DatabaseId,
238 #[prost(string, tag = "4")]
239 pub name: ::prost::alloc::string::String,
240 #[prost(message, repeated, tag = "5")]
241 pub columns: ::prost::alloc::vec::Vec<super::plan_common::ColumnCatalog>,
242 #[prost(message, repeated, tag = "6")]
244 pub plan_pk: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
245 #[prost(int32, repeated, tag = "8")]
246 pub distribution_key: ::prost::alloc::vec::Vec<i32>,
247 #[prost(int32, repeated, tag = "9")]
249 pub downstream_pk: ::prost::alloc::vec::Vec<i32>,
250 #[prost(enumeration = "SinkType", tag = "10")]
252 pub sink_type: i32,
253 #[prost(uint32, tag = "11", wrapper = "crate::id::UserId")]
254 pub owner: crate::id::UserId,
255 #[prost(btree_map = "string, string", tag = "12")]
256 pub properties: ::prost::alloc::collections::BTreeMap<
257 ::prost::alloc::string::String,
258 ::prost::alloc::string::String,
259 >,
260 #[prost(string, tag = "13")]
261 pub definition: ::prost::alloc::string::String,
262 #[prost(uint32, optional, tag = "14", wrapper = "crate::id::ConnectionId")]
264 pub connection_id: ::core::option::Option<crate::id::ConnectionId>,
265 #[prost(uint64, optional, tag = "15")]
266 pub initialized_at_epoch: ::core::option::Option<u64>,
267 #[prost(uint64, optional, tag = "16")]
268 pub created_at_epoch: ::core::option::Option<u64>,
269 #[prost(string, tag = "17")]
270 pub db_name: ::prost::alloc::string::String,
271 #[prost(string, tag = "18")]
272 pub sink_from_name: ::prost::alloc::string::String,
273 #[prost(enumeration = "StreamJobStatus", tag = "19")]
274 pub stream_job_status: i32,
275 #[prost(message, optional, tag = "20")]
276 pub format_desc: ::core::option::Option<SinkFormatDesc>,
277 #[prost(uint32, optional, tag = "21", wrapper = "crate::id::TableId")]
279 pub target_table: ::core::option::Option<crate::id::TableId>,
280 #[prost(string, optional, tag = "22")]
282 pub initialized_at_cluster_version: ::core::option::Option<
283 ::prost::alloc::string::String,
284 >,
285 #[prost(string, optional, tag = "23")]
286 pub created_at_cluster_version: ::core::option::Option<
287 ::prost::alloc::string::String,
288 >,
289 #[prost(enumeration = "CreateType", tag = "24")]
291 pub create_type: i32,
292 #[prost(btree_map = "string, message", tag = "25")]
295 pub secret_refs: ::prost::alloc::collections::BTreeMap<
296 ::prost::alloc::string::String,
297 super::secret::SecretRef,
298 >,
299 #[prost(message, repeated, tag = "26")]
301 pub original_target_columns: ::prost::alloc::vec::Vec<
302 super::plan_common::ColumnCatalog,
303 >,
304 #[prost(uint32, optional, tag = "27", wrapper = "crate::id::TableId")]
305 pub auto_refresh_schema_from_table: ::core::option::Option<crate::id::TableId>,
306 #[prost(bool, tag = "28")]
311 pub raw_ignore_delete: bool,
312}
313#[derive(prost_helpers::AnyPB)]
314#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
315pub struct Subscription {
316 #[prost(uint32, tag = "1", wrapper = "crate::id::SubscriptionId")]
317 pub id: crate::id::SubscriptionId,
318 #[prost(string, tag = "2")]
319 pub name: ::prost::alloc::string::String,
320 #[prost(string, tag = "3")]
321 pub definition: ::prost::alloc::string::String,
322 #[prost(uint64, tag = "6")]
323 pub retention_seconds: u64,
324 #[prost(uint32, tag = "8", wrapper = "crate::id::DatabaseId")]
325 pub database_id: crate::id::DatabaseId,
326 #[prost(uint32, tag = "9", wrapper = "crate::id::SchemaId")]
327 pub schema_id: crate::id::SchemaId,
328 #[prost(uint32, tag = "10", wrapper = "crate::id::TableId")]
329 pub dependent_table_id: crate::id::TableId,
330 #[prost(uint64, optional, tag = "11")]
331 pub initialized_at_epoch: ::core::option::Option<u64>,
332 #[prost(uint64, optional, tag = "12")]
333 pub created_at_epoch: ::core::option::Option<u64>,
334 #[prost(uint32, tag = "13", wrapper = "crate::id::UserId")]
335 pub owner: crate::id::UserId,
336 #[prost(string, optional, tag = "15")]
337 pub initialized_at_cluster_version: ::core::option::Option<
338 ::prost::alloc::string::String,
339 >,
340 #[prost(string, optional, tag = "16")]
341 pub created_at_cluster_version: ::core::option::Option<
342 ::prost::alloc::string::String,
343 >,
344 #[prost(enumeration = "subscription::SubscriptionState", tag = "19")]
345 pub subscription_state: i32,
346}
347pub mod subscription {
349 #[derive(prost_helpers::AnyPB)]
350 #[derive(
351 Clone,
352 Copy,
353 Debug,
354 PartialEq,
355 Eq,
356 Hash,
357 PartialOrd,
358 Ord,
359 ::prost::Enumeration
360 )]
361 #[repr(i32)]
362 pub enum SubscriptionState {
363 Unspecified = 0,
364 Init = 1,
365 Created = 2,
366 }
367 impl SubscriptionState {
368 pub fn as_str_name(&self) -> &'static str {
373 match self {
374 Self::Unspecified => "UNSPECIFIED",
375 Self::Init => "INIT",
376 Self::Created => "CREATED",
377 }
378 }
379 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
381 match value {
382 "UNSPECIFIED" => Some(Self::Unspecified),
383 "INIT" => Some(Self::Init),
384 "CREATED" => Some(Self::Created),
385 _ => None,
386 }
387 }
388 }
389}
390#[derive(prost_helpers::AnyPB)]
391#[derive(Clone, PartialEq, ::prost::Message)]
392pub struct ConnectionParams {
393 #[prost(enumeration = "connection_params::ConnectionType", tag = "1")]
394 pub connection_type: i32,
395 #[prost(map = "string, string", tag = "2")]
396 pub properties: ::std::collections::HashMap<
397 ::prost::alloc::string::String,
398 ::prost::alloc::string::String,
399 >,
400 #[prost(map = "string, message", tag = "3")]
401 pub secret_refs: ::std::collections::HashMap<
402 ::prost::alloc::string::String,
403 super::secret::SecretRef,
404 >,
405}
406pub mod connection_params {
408 #[derive(prost_helpers::AnyPB)]
409 #[derive(
410 Clone,
411 Copy,
412 Debug,
413 PartialEq,
414 Eq,
415 Hash,
416 PartialOrd,
417 Ord,
418 ::prost::Enumeration
419 )]
420 #[repr(i32)]
421 pub enum ConnectionType {
422 Unspecified = 0,
423 Kafka = 1,
424 Iceberg = 2,
425 SchemaRegistry = 3,
426 Elasticsearch = 4,
427 }
428 impl ConnectionType {
429 pub fn as_str_name(&self) -> &'static str {
434 match self {
435 Self::Unspecified => "CONNECTION_TYPE_UNSPECIFIED",
436 Self::Kafka => "CONNECTION_TYPE_KAFKA",
437 Self::Iceberg => "CONNECTION_TYPE_ICEBERG",
438 Self::SchemaRegistry => "CONNECTION_TYPE_SCHEMA_REGISTRY",
439 Self::Elasticsearch => "CONNECTION_TYPE_ELASTICSEARCH",
440 }
441 }
442 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
444 match value {
445 "CONNECTION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
446 "CONNECTION_TYPE_KAFKA" => Some(Self::Kafka),
447 "CONNECTION_TYPE_ICEBERG" => Some(Self::Iceberg),
448 "CONNECTION_TYPE_SCHEMA_REGISTRY" => Some(Self::SchemaRegistry),
449 "CONNECTION_TYPE_ELASTICSEARCH" => Some(Self::Elasticsearch),
450 _ => None,
451 }
452 }
453 }
454}
455#[derive(prost_helpers::AnyPB)]
456#[derive(Clone, PartialEq, ::prost::Message)]
457pub struct Connection {
458 #[prost(uint32, tag = "1", wrapper = "crate::id::ConnectionId")]
459 pub id: crate::id::ConnectionId,
460 #[prost(uint32, tag = "2", wrapper = "crate::id::SchemaId")]
461 pub schema_id: crate::id::SchemaId,
462 #[prost(uint32, tag = "3", wrapper = "crate::id::DatabaseId")]
463 pub database_id: crate::id::DatabaseId,
464 #[prost(string, tag = "4")]
465 pub name: ::prost::alloc::string::String,
466 #[prost(uint32, tag = "6", wrapper = "crate::id::UserId")]
467 pub owner: crate::id::UserId,
468 #[prost(oneof = "connection::Info", tags = "5, 7")]
469 pub info: ::core::option::Option<connection::Info>,
470}
471pub mod connection {
473 #[derive(prost_helpers::AnyPB)]
474 #[derive(Clone, PartialEq, ::prost::Message)]
475 pub struct PrivateLinkService {
476 #[prost(enumeration = "private_link_service::PrivateLinkProvider", tag = "1")]
477 pub provider: i32,
478 #[prost(string, tag = "2")]
479 pub service_name: ::prost::alloc::string::String,
480 #[prost(string, tag = "3")]
481 pub endpoint_id: ::prost::alloc::string::String,
482 #[prost(map = "string, string", tag = "4")]
483 pub dns_entries: ::std::collections::HashMap<
484 ::prost::alloc::string::String,
485 ::prost::alloc::string::String,
486 >,
487 #[prost(string, tag = "5")]
488 pub endpoint_dns_name: ::prost::alloc::string::String,
489 }
490 pub mod private_link_service {
492 #[derive(prost_helpers::AnyPB)]
493 #[derive(
494 Clone,
495 Copy,
496 Debug,
497 PartialEq,
498 Eq,
499 Hash,
500 PartialOrd,
501 Ord,
502 ::prost::Enumeration
503 )]
504 #[repr(i32)]
505 pub enum PrivateLinkProvider {
506 Unspecified = 0,
507 Mock = 1,
508 Aws = 2,
509 }
510 impl PrivateLinkProvider {
511 pub fn as_str_name(&self) -> &'static str {
516 match self {
517 Self::Unspecified => "UNSPECIFIED",
518 Self::Mock => "MOCK",
519 Self::Aws => "AWS",
520 }
521 }
522 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
524 match value {
525 "UNSPECIFIED" => Some(Self::Unspecified),
526 "MOCK" => Some(Self::Mock),
527 "AWS" => Some(Self::Aws),
528 _ => None,
529 }
530 }
531 }
532 }
533 #[derive(prost_helpers::AnyPB)]
534 #[derive(Clone, PartialEq, ::prost::Oneof)]
535 pub enum Info {
536 #[deprecated]
537 #[prost(message, tag = "5")]
538 PrivateLinkService(PrivateLinkService),
539 #[prost(message, tag = "7")]
540 ConnectionParams(super::ConnectionParams),
541 }
542}
543#[derive(prost_helpers::AnyPB)]
544#[derive(Clone, PartialEq, ::prost::Message)]
545pub struct Index {
546 #[prost(uint32, tag = "1", wrapper = "crate::id::IndexId")]
547 pub id: crate::id::IndexId,
548 #[prost(uint32, tag = "2", wrapper = "crate::id::SchemaId")]
549 pub schema_id: crate::id::SchemaId,
550 #[prost(uint32, tag = "3", wrapper = "crate::id::DatabaseId")]
551 pub database_id: crate::id::DatabaseId,
552 #[prost(string, tag = "4")]
553 pub name: ::prost::alloc::string::String,
554 #[prost(uint32, tag = "5", wrapper = "crate::id::UserId")]
555 pub owner: crate::id::UserId,
556 #[prost(uint32, tag = "6", wrapper = "crate::id::TableId")]
557 pub index_table_id: crate::id::TableId,
558 #[prost(uint32, tag = "7", wrapper = "crate::id::TableId")]
559 pub primary_table_id: crate::id::TableId,
560 #[prost(message, repeated, tag = "8")]
563 pub index_item: ::prost::alloc::vec::Vec<super::expr::ExprNode>,
564 #[prost(message, repeated, tag = "16")]
565 pub index_column_properties: ::prost::alloc::vec::Vec<IndexColumnProperties>,
566 #[prost(uint64, optional, tag = "10")]
567 pub initialized_at_epoch: ::core::option::Option<u64>,
568 #[prost(uint64, optional, tag = "11")]
569 pub created_at_epoch: ::core::option::Option<u64>,
570 #[prost(enumeration = "StreamJobStatus", tag = "12")]
571 pub stream_job_status: i32,
572 #[prost(uint32, tag = "13")]
575 pub index_columns_len: u32,
576 #[prost(string, optional, tag = "14")]
578 pub initialized_at_cluster_version: ::core::option::Option<
579 ::prost::alloc::string::String,
580 >,
581 #[prost(string, optional, tag = "15")]
582 pub created_at_cluster_version: ::core::option::Option<
583 ::prost::alloc::string::String,
584 >,
585 #[prost(enumeration = "CreateType", tag = "17")]
587 pub create_type: i32,
588}
589#[derive(prost_helpers::AnyPB)]
591#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
592pub struct IndexColumnProperties {
593 #[prost(bool, tag = "1")]
595 pub is_desc: bool,
596 #[prost(bool, tag = "2")]
598 pub nulls_first: bool,
599}
600#[derive(prost_helpers::AnyPB)]
601#[derive(Clone, PartialEq, ::prost::Message)]
602pub struct Function {
603 #[prost(uint32, tag = "1", wrapper = "crate::id::FunctionId")]
604 pub id: crate::id::FunctionId,
605 #[prost(uint32, tag = "2", wrapper = "crate::id::SchemaId")]
606 pub schema_id: crate::id::SchemaId,
607 #[prost(uint32, tag = "3", wrapper = "crate::id::DatabaseId")]
608 pub database_id: crate::id::DatabaseId,
609 #[prost(string, tag = "4")]
610 pub name: ::prost::alloc::string::String,
611 #[prost(uint32, tag = "9", wrapper = "crate::id::UserId")]
612 pub owner: crate::id::UserId,
613 #[prost(string, repeated, tag = "15")]
614 pub arg_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
615 #[prost(message, repeated, tag = "5")]
616 pub arg_types: ::prost::alloc::vec::Vec<super::data::DataType>,
617 #[prost(message, optional, tag = "6")]
618 pub return_type: ::core::option::Option<super::data::DataType>,
619 #[prost(string, tag = "7")]
620 pub language: ::prost::alloc::string::String,
621 #[prost(string, optional, tag = "8")]
622 pub link: ::core::option::Option<::prost::alloc::string::String>,
623 #[prost(string, optional, tag = "10")]
625 pub name_in_runtime: ::core::option::Option<::prost::alloc::string::String>,
626 #[prost(string, optional, tag = "14")]
628 pub body: ::core::option::Option<::prost::alloc::string::String>,
629 #[prost(bytes = "vec", optional, tag = "17")]
631 pub compressed_binary: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
632 #[prost(bool, tag = "16")]
633 pub always_retry_on_network_error: bool,
634 #[prost(string, optional, tag = "18")]
636 pub runtime: ::core::option::Option<::prost::alloc::string::String>,
637 #[prost(bool, optional, tag = "20")]
639 pub is_async: ::core::option::Option<bool>,
640 #[prost(bool, optional, tag = "21")]
641 pub is_batched: ::core::option::Option<bool>,
642 #[prost(uint64, optional, tag = "22")]
643 pub created_at_epoch: ::core::option::Option<u64>,
644 #[prost(string, optional, tag = "23")]
646 pub created_at_cluster_version: ::core::option::Option<
647 ::prost::alloc::string::String,
648 >,
649 #[prost(oneof = "function::Kind", tags = "11, 12, 13")]
650 pub kind: ::core::option::Option<function::Kind>,
651}
652pub mod function {
654 #[derive(prost_helpers::AnyPB)]
655 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
656 pub struct ScalarFunction {}
657 #[derive(prost_helpers::AnyPB)]
658 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
659 pub struct TableFunction {}
660 #[derive(prost_helpers::AnyPB)]
661 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
662 pub struct AggregateFunction {}
663 #[derive(prost_helpers::AnyPB)]
664 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
665 pub enum Kind {
666 #[prost(message, tag = "11")]
667 Scalar(ScalarFunction),
668 #[prost(message, tag = "12")]
669 Table(TableFunction),
670 #[prost(message, tag = "13")]
671 Aggregate(AggregateFunction),
672 }
673}
674#[derive(prost_helpers::AnyPB)]
675#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
676pub struct FlatIndexConfig {}
677#[derive(prost_helpers::AnyPB)]
678#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
679pub struct HnswFlatIndexConfig {
680 #[prost(uint32, tag = "1")]
681 pub m: u32,
682 #[prost(uint32, tag = "2")]
683 pub ef_construction: u32,
684 #[prost(uint32, tag = "3")]
685 pub max_level: u32,
686}
687#[derive(prost_helpers::AnyPB)]
688#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
689pub struct VectorIndexInfo {
690 #[prost(uint32, tag = "1")]
691 pub dimension: u32,
692 #[prost(enumeration = "super::common::DistanceType", tag = "2")]
693 pub distance_type: i32,
694 #[prost(oneof = "vector_index_info::Config", tags = "65, 66")]
695 pub config: ::core::option::Option<vector_index_info::Config>,
696}
697pub mod vector_index_info {
699 #[derive(prost_helpers::AnyPB)]
700 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
701 pub enum Config {
702 #[prost(message, tag = "65")]
704 Flat(super::FlatIndexConfig),
705 #[prost(message, tag = "66")]
706 HnswFlat(super::HnswFlatIndexConfig),
707 }
708}
709#[derive(prost_helpers::AnyPB)]
716#[derive(Clone, PartialEq, ::prost::Message)]
717pub struct Table {
718 #[prost(uint32, tag = "1", wrapper = "crate::id::TableId")]
719 pub id: crate::id::TableId,
720 #[prost(uint32, tag = "2", wrapper = "crate::id::SchemaId")]
721 pub schema_id: crate::id::SchemaId,
722 #[prost(uint32, tag = "3", wrapper = "crate::id::DatabaseId")]
723 pub database_id: crate::id::DatabaseId,
724 #[prost(string, tag = "4")]
725 pub name: ::prost::alloc::string::String,
726 #[prost(message, repeated, tag = "5")]
727 pub columns: ::prost::alloc::vec::Vec<super::plan_common::ColumnCatalog>,
728 #[prost(message, repeated, tag = "6")]
730 pub pk: ::prost::alloc::vec::Vec<super::common::ColumnOrder>,
731 #[prost(enumeration = "table::TableType", tag = "10")]
732 pub table_type: i32,
733 #[prost(int32, repeated, tag = "12")]
734 pub distribution_key: ::prost::alloc::vec::Vec<i32>,
735 #[prost(int32, repeated, tag = "13")]
737 pub stream_key: ::prost::alloc::vec::Vec<i32>,
738 #[prost(bool, tag = "14")]
739 pub append_only: bool,
740 #[prost(uint32, tag = "15", wrapper = "crate::id::UserId")]
741 pub owner: crate::id::UserId,
742 #[prost(uint32, tag = "17", wrapper = "crate::id::FragmentId")]
743 pub fragment_id: crate::id::FragmentId,
744 #[prost(uint32, optional, tag = "18")]
747 pub vnode_col_index: ::core::option::Option<u32>,
748 #[prost(uint32, optional, tag = "19")]
751 pub row_id_index: ::core::option::Option<u32>,
752 #[prost(int32, repeated, tag = "20")]
756 pub value_indices: ::prost::alloc::vec::Vec<i32>,
757 #[prost(string, tag = "21")]
758 pub definition: ::prost::alloc::string::String,
759 #[prost(enumeration = "HandleConflictBehavior", tag = "22")]
761 pub handle_pk_conflict_behavior: i32,
762 #[prost(uint32, tag = "23")]
766 pub read_prefix_len_hint: u32,
767 #[prost(int32, repeated, tag = "24")]
768 pub watermark_indices: ::prost::alloc::vec::Vec<i32>,
769 #[prost(int32, repeated, tag = "25")]
770 pub dist_key_in_pk: ::prost::alloc::vec::Vec<i32>,
771 #[prost(uint32, optional, tag = "26", wrapper = "crate::id::FragmentId")]
774 pub dml_fragment_id: ::core::option::Option<crate::id::FragmentId>,
775 #[prost(message, optional, tag = "27")]
779 pub cardinality: ::core::option::Option<super::plan_common::Cardinality>,
780 #[prost(uint64, optional, tag = "28")]
781 pub initialized_at_epoch: ::core::option::Option<u64>,
782 #[prost(uint64, optional, tag = "29")]
783 pub created_at_epoch: ::core::option::Option<u64>,
784 #[deprecated]
787 #[prost(bool, tag = "30")]
788 pub cleaned_by_watermark: bool,
789 #[prost(enumeration = "StreamJobStatus", tag = "31")]
791 pub stream_job_status: i32,
792 #[prost(enumeration = "CreateType", tag = "32")]
793 pub create_type: i32,
794 #[prost(string, optional, tag = "33")]
796 pub description: ::core::option::Option<::prost::alloc::string::String>,
797 #[deprecated]
799 #[prost(uint32, repeated, packed = "false", tag = "34")]
800 pub incoming_sinks: ::prost::alloc::vec::Vec<u32>,
801 #[prost(string, optional, tag = "35")]
803 pub initialized_at_cluster_version: ::core::option::Option<
804 ::prost::alloc::string::String,
805 >,
806 #[prost(string, optional, tag = "36")]
807 pub created_at_cluster_version: ::core::option::Option<
808 ::prost::alloc::string::String,
809 >,
810 #[prost(uint32, optional, tag = "37")]
813 pub retention_seconds: ::core::option::Option<u32>,
814 #[prost(uint32, repeated, packed = "false", tag = "38")]
818 pub version_column_indices: ::prost::alloc::vec::Vec<u32>,
819 #[prost(string, optional, tag = "39")]
823 pub cdc_table_id: ::core::option::Option<::prost::alloc::string::String>,
824 #[prost(uint32, optional, tag = "40")]
837 pub maybe_vnode_count: ::core::option::Option<u32>,
838 #[prost(message, optional, tag = "41")]
840 pub webhook_info: ::core::option::Option<WebhookSourceInfo>,
841 #[prost(uint32, optional, tag = "42", wrapper = "crate::id::JobId")]
843 pub job_id: ::core::option::Option<crate::id::JobId>,
844 #[prost(enumeration = "table::Engine", optional, tag = "43")]
846 pub engine: ::core::option::Option<i32>,
847 #[deprecated]
851 #[prost(int32, optional, tag = "44")]
852 pub clean_watermark_index_in_pk: ::core::option::Option<i32>,
853 #[prost(bool, tag = "45")]
856 pub refreshable: bool,
857 #[prost(message, optional, tag = "46")]
859 pub vector_index_info: ::core::option::Option<VectorIndexInfo>,
860 #[prost(enumeration = "table::CdcTableType", optional, tag = "47")]
861 pub cdc_table_type: ::core::option::Option<i32>,
862 #[prost(uint32, repeated, tag = "49")]
866 pub clean_watermark_indices: ::prost::alloc::vec::Vec<u32>,
867 #[prost(message, optional, tag = "100")]
871 pub version: ::core::option::Option<table::TableVersion>,
872 #[prost(oneof = "table::OptionalAssociatedSourceId", tags = "9")]
873 pub optional_associated_source_id: ::core::option::Option<
874 table::OptionalAssociatedSourceId,
875 >,
876}
877pub mod table {
879 #[derive(prost_helpers::AnyPB)]
880 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
881 pub struct TableVersion {
882 #[prost(uint64, tag = "1")]
885 pub version: u64,
886 #[prost(int32, tag = "2")]
889 pub next_column_id: i32,
890 }
891 #[derive(prost_helpers::AnyPB)]
892 #[derive(
893 Clone,
894 Copy,
895 Debug,
896 PartialEq,
897 Eq,
898 Hash,
899 PartialOrd,
900 Ord,
901 ::prost::Enumeration
902 )]
903 #[repr(i32)]
904 pub enum TableType {
905 Unspecified = 0,
906 Table = 1,
907 MaterializedView = 2,
908 Index = 3,
909 Internal = 4,
910 VectorIndex = 5,
911 }
912 impl TableType {
913 pub fn as_str_name(&self) -> &'static str {
918 match self {
919 Self::Unspecified => "UNSPECIFIED",
920 Self::Table => "TABLE",
921 Self::MaterializedView => "MATERIALIZED_VIEW",
922 Self::Index => "INDEX",
923 Self::Internal => "INTERNAL",
924 Self::VectorIndex => "VECTOR_INDEX",
925 }
926 }
927 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
929 match value {
930 "UNSPECIFIED" => Some(Self::Unspecified),
931 "TABLE" => Some(Self::Table),
932 "MATERIALIZED_VIEW" => Some(Self::MaterializedView),
933 "INDEX" => Some(Self::Index),
934 "INTERNAL" => Some(Self::Internal),
935 "VECTOR_INDEX" => Some(Self::VectorIndex),
936 _ => None,
937 }
938 }
939 }
940 #[derive(prost_helpers::AnyPB)]
941 #[derive(
942 Clone,
943 Copy,
944 Debug,
945 PartialEq,
946 Eq,
947 Hash,
948 PartialOrd,
949 Ord,
950 ::prost::Enumeration
951 )]
952 #[repr(i32)]
953 pub enum Engine {
954 Unspecified = 0,
955 Hummock = 1,
956 Iceberg = 2,
957 }
958 impl Engine {
959 pub fn as_str_name(&self) -> &'static str {
964 match self {
965 Self::Unspecified => "ENGINE_UNSPECIFIED",
966 Self::Hummock => "HUMMOCK",
967 Self::Iceberg => "ICEBERG",
968 }
969 }
970 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
972 match value {
973 "ENGINE_UNSPECIFIED" => Some(Self::Unspecified),
974 "HUMMOCK" => Some(Self::Hummock),
975 "ICEBERG" => Some(Self::Iceberg),
976 _ => None,
977 }
978 }
979 }
980 #[derive(prost_helpers::AnyPB)]
981 #[derive(
982 Clone,
983 Copy,
984 Debug,
985 PartialEq,
986 Eq,
987 Hash,
988 PartialOrd,
989 Ord,
990 ::prost::Enumeration
991 )]
992 #[repr(i32)]
993 pub enum CdcTableType {
994 Unspecified = 0,
995 Postgres = 1,
996 Mysql = 2,
997 SqlServer = 3,
998 Mongodb = 4,
999 }
1000 impl CdcTableType {
1001 pub fn as_str_name(&self) -> &'static str {
1006 match self {
1007 Self::Unspecified => "CDC_TABLE_TYPE_UNSPECIFIED",
1008 Self::Postgres => "CDC_TABLE_TYPE_POSTGRES",
1009 Self::Mysql => "CDC_TABLE_TYPE_MYSQL",
1010 Self::SqlServer => "CDC_TABLE_TYPE_SQL_SERVER",
1011 Self::Mongodb => "CDC_TABLE_TYPE_MONGODB",
1012 }
1013 }
1014 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1016 match value {
1017 "CDC_TABLE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1018 "CDC_TABLE_TYPE_POSTGRES" => Some(Self::Postgres),
1019 "CDC_TABLE_TYPE_MYSQL" => Some(Self::Mysql),
1020 "CDC_TABLE_TYPE_SQL_SERVER" => Some(Self::SqlServer),
1021 "CDC_TABLE_TYPE_MONGODB" => Some(Self::Mongodb),
1022 _ => None,
1023 }
1024 }
1025 }
1026 #[derive(prost_helpers::AnyPB)]
1027 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
1028 pub enum OptionalAssociatedSourceId {
1029 #[prost(uint32, tag = "9", wrapper = "crate::id::SourceId")]
1030 AssociatedSourceId(crate::id::SourceId),
1031 }
1032}
1033#[derive(prost_helpers::AnyPB)]
1034#[derive(Clone, PartialEq, ::prost::Message)]
1035pub struct View {
1036 #[prost(uint32, tag = "1", wrapper = "crate::id::ViewId")]
1037 pub id: crate::id::ViewId,
1038 #[prost(uint32, tag = "2", wrapper = "crate::id::SchemaId")]
1039 pub schema_id: crate::id::SchemaId,
1040 #[prost(uint32, tag = "3", wrapper = "crate::id::DatabaseId")]
1041 pub database_id: crate::id::DatabaseId,
1042 #[prost(string, tag = "4")]
1043 pub name: ::prost::alloc::string::String,
1044 #[prost(uint32, tag = "5", wrapper = "crate::id::UserId")]
1045 pub owner: crate::id::UserId,
1046 #[prost(btree_map = "string, string", tag = "6")]
1047 pub properties: ::prost::alloc::collections::BTreeMap<
1048 ::prost::alloc::string::String,
1049 ::prost::alloc::string::String,
1050 >,
1051 #[prost(string, tag = "7")]
1052 pub sql: ::prost::alloc::string::String,
1053 #[prost(message, repeated, tag = "9")]
1055 pub columns: ::prost::alloc::vec::Vec<super::plan_common::Field>,
1056 #[prost(uint64, optional, tag = "10")]
1057 pub created_at_epoch: ::core::option::Option<u64>,
1058 #[prost(string, optional, tag = "11")]
1059 pub created_at_cluster_version: ::core::option::Option<
1060 ::prost::alloc::string::String,
1061 >,
1062}
1063#[derive(prost_helpers::AnyPB)]
1064#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1065pub struct Schema {
1066 #[prost(uint32, tag = "1", wrapper = "crate::id::SchemaId")]
1067 pub id: crate::id::SchemaId,
1068 #[prost(uint32, tag = "2", wrapper = "crate::id::DatabaseId")]
1069 pub database_id: crate::id::DatabaseId,
1070 #[prost(string, tag = "3")]
1071 pub name: ::prost::alloc::string::String,
1072 #[prost(uint32, tag = "4", wrapper = "crate::id::UserId")]
1073 pub owner: crate::id::UserId,
1074}
1075#[derive(prost_helpers::AnyPB)]
1076#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1077pub struct Database {
1078 #[prost(uint32, tag = "1", wrapper = "crate::id::DatabaseId")]
1079 pub id: crate::id::DatabaseId,
1080 #[prost(string, tag = "2")]
1081 pub name: ::prost::alloc::string::String,
1082 #[prost(uint32, tag = "3", wrapper = "crate::id::UserId")]
1083 pub owner: crate::id::UserId,
1084 #[prost(string, tag = "4")]
1085 pub resource_group: ::prost::alloc::string::String,
1086 #[prost(uint32, optional, tag = "5")]
1087 pub barrier_interval_ms: ::core::option::Option<u32>,
1088 #[prost(uint64, optional, tag = "6")]
1089 pub checkpoint_frequency: ::core::option::Option<u64>,
1090}
1091#[derive(prost_helpers::AnyPB)]
1092#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1093pub struct Comment {
1094 #[prost(uint32, tag = "1", wrapper = "crate::id::TableId")]
1095 pub table_id: crate::id::TableId,
1096 #[prost(uint32, tag = "2", wrapper = "crate::id::SchemaId")]
1097 pub schema_id: crate::id::SchemaId,
1098 #[prost(uint32, tag = "3", wrapper = "crate::id::DatabaseId")]
1099 pub database_id: crate::id::DatabaseId,
1100 #[prost(uint32, optional, tag = "4")]
1101 pub column_index: ::core::option::Option<u32>,
1102 #[prost(string, optional, tag = "5")]
1103 pub description: ::core::option::Option<::prost::alloc::string::String>,
1104}
1105#[derive(prost_helpers::AnyPB)]
1106#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1107pub struct Secret {
1108 #[prost(uint32, tag = "1", wrapper = "crate::id::SecretId")]
1109 pub id: crate::id::SecretId,
1110 #[prost(string, tag = "2")]
1111 pub name: ::prost::alloc::string::String,
1112 #[prost(uint32, tag = "3", wrapper = "crate::id::DatabaseId")]
1113 pub database_id: crate::id::DatabaseId,
1114 #[prost(bytes = "vec", tag = "4")]
1116 pub value: ::prost::alloc::vec::Vec<u8>,
1117 #[prost(uint32, tag = "5", wrapper = "crate::id::UserId")]
1118 pub owner: crate::id::UserId,
1119 #[prost(uint32, tag = "6", wrapper = "crate::id::SchemaId")]
1120 pub schema_id: crate::id::SchemaId,
1121}
1122#[derive(prost_helpers::AnyPB)]
1123#[derive(Clone, PartialEq, ::prost::Message)]
1124pub struct OptionsWithSecret {
1125 #[prost(map = "string, string", tag = "1")]
1126 pub options: ::std::collections::HashMap<
1127 ::prost::alloc::string::String,
1128 ::prost::alloc::string::String,
1129 >,
1130 #[prost(map = "string, message", tag = "2")]
1131 pub secret_refs: ::std::collections::HashMap<
1132 ::prost::alloc::string::String,
1133 super::secret::SecretRef,
1134 >,
1135}
1136#[derive(prost_helpers::AnyPB)]
1137#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1138#[repr(i32)]
1139pub enum SchemaRegistryNameStrategy {
1140 Unspecified = 0,
1141 RecordNameStrategy = 1,
1142 TopicRecordNameStrategy = 2,
1143}
1144impl SchemaRegistryNameStrategy {
1145 pub fn as_str_name(&self) -> &'static str {
1150 match self {
1151 Self::Unspecified => "SCHEMA_REGISTRY_NAME_STRATEGY_UNSPECIFIED",
1152 Self::RecordNameStrategy => {
1153 "SCHEMA_REGISTRY_NAME_STRATEGY_RECORD_NAME_STRATEGY"
1154 }
1155 Self::TopicRecordNameStrategy => {
1156 "SCHEMA_REGISTRY_NAME_STRATEGY_TOPIC_RECORD_NAME_STRATEGY"
1157 }
1158 }
1159 }
1160 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1162 match value {
1163 "SCHEMA_REGISTRY_NAME_STRATEGY_UNSPECIFIED" => Some(Self::Unspecified),
1164 "SCHEMA_REGISTRY_NAME_STRATEGY_RECORD_NAME_STRATEGY" => {
1165 Some(Self::RecordNameStrategy)
1166 }
1167 "SCHEMA_REGISTRY_NAME_STRATEGY_TOPIC_RECORD_NAME_STRATEGY" => {
1168 Some(Self::TopicRecordNameStrategy)
1169 }
1170 _ => None,
1171 }
1172 }
1173}
1174#[derive(prost_helpers::AnyPB)]
1175#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1176#[repr(i32)]
1177pub enum StreamJobStatus {
1178 Unspecified = 0,
1180 Creating = 1,
1181 Created = 2,
1182}
1183impl StreamJobStatus {
1184 pub fn as_str_name(&self) -> &'static str {
1189 match self {
1190 Self::Unspecified => "STREAM_JOB_STATUS_UNSPECIFIED",
1191 Self::Creating => "STREAM_JOB_STATUS_CREATING",
1192 Self::Created => "STREAM_JOB_STATUS_CREATED",
1193 }
1194 }
1195 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1197 match value {
1198 "STREAM_JOB_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
1199 "STREAM_JOB_STATUS_CREATING" => Some(Self::Creating),
1200 "STREAM_JOB_STATUS_CREATED" => Some(Self::Created),
1201 _ => None,
1202 }
1203 }
1204}
1205#[derive(prost_helpers::AnyPB)]
1208#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1209#[repr(i32)]
1210pub enum CreateType {
1211 Unspecified = 0,
1212 Background = 1,
1213 Foreground = 2,
1214}
1215impl CreateType {
1216 pub fn as_str_name(&self) -> &'static str {
1221 match self {
1222 Self::Unspecified => "CREATE_TYPE_UNSPECIFIED",
1223 Self::Background => "CREATE_TYPE_BACKGROUND",
1224 Self::Foreground => "CREATE_TYPE_FOREGROUND",
1225 }
1226 }
1227 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1229 match value {
1230 "CREATE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1231 "CREATE_TYPE_BACKGROUND" => Some(Self::Background),
1232 "CREATE_TYPE_FOREGROUND" => Some(Self::Foreground),
1233 _ => None,
1234 }
1235 }
1236}
1237#[derive(prost_helpers::AnyPB)]
1238#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1239#[repr(i32)]
1240pub enum SinkType {
1241 Unspecified = 0,
1242 AppendOnly = 1,
1243 #[deprecated]
1245 ForceAppendOnly = 2,
1246 Upsert = 3,
1247 Retract = 4,
1248}
1249impl SinkType {
1250 pub fn as_str_name(&self) -> &'static str {
1255 match self {
1256 Self::Unspecified => "SINK_TYPE_UNSPECIFIED",
1257 Self::AppendOnly => "SINK_TYPE_APPEND_ONLY",
1258 #[allow(deprecated)]
1259 Self::ForceAppendOnly => "SINK_TYPE_FORCE_APPEND_ONLY",
1260 Self::Upsert => "SINK_TYPE_UPSERT",
1261 Self::Retract => "SINK_TYPE_RETRACT",
1262 }
1263 }
1264 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1266 match value {
1267 "SINK_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1268 "SINK_TYPE_APPEND_ONLY" => Some(Self::AppendOnly),
1269 "SINK_TYPE_FORCE_APPEND_ONLY" => {
1270 Some(#[allow(deprecated)] Self::ForceAppendOnly)
1271 }
1272 "SINK_TYPE_UPSERT" => Some(Self::Upsert),
1273 "SINK_TYPE_RETRACT" => Some(Self::Retract),
1274 _ => None,
1275 }
1276 }
1277}
1278#[derive(prost_helpers::AnyPB)]
1279#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1280#[repr(i32)]
1281pub enum HandleConflictBehavior {
1282 Unspecified = 0,
1283 Overwrite = 1,
1284 Ignore = 2,
1285 NoCheck = 3,
1286 DoUpdateIfNotNull = 4,
1287}
1288impl HandleConflictBehavior {
1289 pub fn as_str_name(&self) -> &'static str {
1294 match self {
1295 Self::Unspecified => "HANDLE_CONFLICT_BEHAVIOR_UNSPECIFIED",
1296 Self::Overwrite => "HANDLE_CONFLICT_BEHAVIOR_OVERWRITE",
1297 Self::Ignore => "HANDLE_CONFLICT_BEHAVIOR_IGNORE",
1298 Self::NoCheck => "HANDLE_CONFLICT_BEHAVIOR_NO_CHECK",
1299 Self::DoUpdateIfNotNull => "HANDLE_CONFLICT_BEHAVIOR_DO_UPDATE_IF_NOT_NULL",
1300 }
1301 }
1302 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1304 match value {
1305 "HANDLE_CONFLICT_BEHAVIOR_UNSPECIFIED" => Some(Self::Unspecified),
1306 "HANDLE_CONFLICT_BEHAVIOR_OVERWRITE" => Some(Self::Overwrite),
1307 "HANDLE_CONFLICT_BEHAVIOR_IGNORE" => Some(Self::Ignore),
1308 "HANDLE_CONFLICT_BEHAVIOR_NO_CHECK" => Some(Self::NoCheck),
1309 "HANDLE_CONFLICT_BEHAVIOR_DO_UPDATE_IF_NOT_NULL" => {
1310 Some(Self::DoUpdateIfNotNull)
1311 }
1312 _ => None,
1313 }
1314 }
1315}
1316#[derive(prost_helpers::AnyPB)]
1318#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1319#[repr(i32)]
1320pub enum RefreshState {
1321 Unspecified = 0,
1322 Idle = 1,
1323 Refreshing = 2,
1324 Finishing = 3,
1325}
1326impl RefreshState {
1327 pub fn as_str_name(&self) -> &'static str {
1332 match self {
1333 Self::Unspecified => "REFRESH_STATE_UNSPECIFIED",
1334 Self::Idle => "REFRESH_STATE_IDLE",
1335 Self::Refreshing => "REFRESH_STATE_REFRESHING",
1336 Self::Finishing => "REFRESH_STATE_FINISHING",
1337 }
1338 }
1339 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1341 match value {
1342 "REFRESH_STATE_UNSPECIFIED" => Some(Self::Unspecified),
1343 "REFRESH_STATE_IDLE" => Some(Self::Idle),
1344 "REFRESH_STATE_REFRESHING" => Some(Self::Refreshing),
1345 "REFRESH_STATE_FINISHING" => Some(Self::Finishing),
1346 _ => None,
1347 }
1348 }
1349}