risingwave_pb/
catalog.rs

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