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
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
// This file is @generated by prost-build.
/// FieldRules encapsulates the rules for each type of field. Depending on the
/// field, the correct set should be used to ensure proper validations.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FieldRules {
#[prost(message, optional, tag = "17")]
pub message: ::core::option::Option<MessageRules>,
#[prost(
oneof = "field_rules::Type",
tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22"
)]
pub r#type: ::core::option::Option<field_rules::Type>,
}
/// Nested message and enum types in `FieldRules`.
pub mod field_rules {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Type {
/// Scalar Field Types
#[prost(message, tag = "1")]
Float(super::FloatRules),
#[prost(message, tag = "2")]
Double(super::DoubleRules),
#[prost(message, tag = "3")]
Int32(super::Int32Rules),
#[prost(message, tag = "4")]
Int64(super::Int64Rules),
#[prost(message, tag = "5")]
Uint32(super::UInt32Rules),
#[prost(message, tag = "6")]
Uint64(super::UInt64Rules),
#[prost(message, tag = "7")]
Sint32(super::SInt32Rules),
#[prost(message, tag = "8")]
Sint64(super::SInt64Rules),
#[prost(message, tag = "9")]
Fixed32(super::Fixed32Rules),
#[prost(message, tag = "10")]
Fixed64(super::Fixed64Rules),
#[prost(message, tag = "11")]
Sfixed32(super::SFixed32Rules),
#[prost(message, tag = "12")]
Sfixed64(super::SFixed64Rules),
#[prost(message, tag = "13")]
Bool(super::BoolRules),
#[prost(message, tag = "14")]
String(super::StringRules),
#[prost(message, tag = "15")]
Bytes(super::BytesRules),
/// Complex Field Types
#[prost(message, tag = "16")]
Enum(super::EnumRules),
#[prost(message, tag = "18")]
Repeated(::prost::alloc::boxed::Box<super::RepeatedRules>),
#[prost(message, tag = "19")]
Map(::prost::alloc::boxed::Box<super::MapRules>),
/// Well-Known Field Types
#[prost(message, tag = "20")]
Any(super::AnyRules),
#[prost(message, tag = "21")]
Duration(super::DurationRules),
#[prost(message, tag = "22")]
Timestamp(super::TimestampRules),
}
}
impl ::prost::Name for FieldRules {
const NAME: &'static str = "FieldRules";
const PACKAGE: &'static str = "validate";
fn full_name() -> ::prost::alloc::string::String {
"validate.FieldRules".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/validate.FieldRules".into()
}
}
/// FloatRules describes the constraints applied to `float` values
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FloatRules {
/// Const specifies that this field must be exactly the specified value
#[prost(float, optional, tag = "1")]
pub r#const: ::core::option::Option<f32>,
/// Lt specifies that this field must be less than the specified value,
/// exclusive
#[prost(float, optional, tag = "2")]
pub lt: ::core::option::Option<f32>,
/// Lte specifies that this field must be less than or equal to the
/// specified value, inclusive
#[prost(float, optional, tag = "3")]
pub lte: ::core::option::Option<f32>,
/// Gt specifies that this field must be greater than the specified value,
/// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
/// range is reversed.
#[prost(float, optional, tag = "4")]
pub gt: ::core::option::Option<f32>,
/// Gte specifies that this field must be greater than or equal to the
/// specified value, inclusive. If the value of Gte is larger than a
/// specified Lt or Lte, the range is reversed.
#[prost(float, optional, tag = "5")]
pub gte: ::core::option::Option<f32>,
/// In specifies that this field must be equal to one of the specified
/// values
#[prost(float, repeated, packed = "false", tag = "6")]
pub r#in: ::prost::alloc::vec::Vec<f32>,
/// NotIn specifies that this field cannot be equal to one of the specified
/// values
#[prost(float, repeated, packed = "false", tag = "7")]
pub not_in: ::prost::alloc::vec::Vec<f32>,
/// IgnoreEmpty specifies that the validation rules of this field should be
/// evaluated only if the field is not empty
#[prost(bool, optional, tag = "8")]
pub ignore_empty: ::core::option::Option<bool>,
}
impl ::prost::Name for FloatRules {
const NAME: &'static str = "FloatRules";
const PACKAGE: &'static str = "validate";
fn full_name() -> ::prost::alloc::string::String {
"validate.FloatRules".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/validate.FloatRules".into()
}
}
/// DoubleRules describes the constraints applied to `double` values
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DoubleRules {
/// Const specifies that this field must be exactly the specified value
#[prost(double, optional, tag = "1")]
pub r#const: ::core::option::Option<f64>,
/// Lt specifies that this field must be less than the specified value,
/// exclusive
#[prost(double, optional, tag = "2")]
pub lt: ::core::option::Option<f64>,
/// Lte specifies that this field must be less than or equal to the
/// specified value, inclusive
#[prost(double, optional, tag = "3")]
pub lte: ::core::option::Option<f64>,
/// Gt specifies that this field must be greater than the specified value,
/// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
/// range is reversed.
#[prost(double, optional, tag = "4")]
pub gt: ::core::option::Option<f64>,
/// Gte specifies that this field must be greater than or equal to the
/// specified value, inclusive. If the value of Gte is larger than a
/// specified Lt or Lte, the range is reversed.
#[prost(double, optional, tag = "5")]
pub gte: ::core::option::Option<f64>,
/// In specifies that this field must be equal to one of the specified
/// values
#[prost(double, repeated, packed = "false", tag = "6")]
pub r#in: ::prost::alloc::vec::Vec<f64>,
/// NotIn specifies that this field cannot be equal to one of the specified
/// values
#[prost(double, repeated, packed = "false", tag = "7")]
pub not_in: ::prost::alloc::vec::Vec<f64>,
/// IgnoreEmpty specifies that the validation rules of this field should be
/// evaluated only if the field is not empty
#[prost(bool, optional, tag = "8")]
pub ignore_empty: ::core::option::Option<bool>,
}
impl ::prost::Name for DoubleRules {
const NAME: &'static str = "DoubleRules";
const PACKAGE: &'static str = "validate";
fn full_name() -> ::prost::alloc::string::String {
"validate.DoubleRules".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/validate.DoubleRules".into()
}
}
/// Int32Rules describes the constraints applied to `int32` values
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Int32Rules {
/// Const specifies that this field must be exactly the specified value
#[prost(int32, optional, tag = "1")]
pub r#const: ::core::option::Option<i32>,
/// Lt specifies that this field must be less than the specified value,
/// exclusive
#[prost(int32, optional, tag = "2")]
pub lt: ::core::option::Option<i32>,
/// Lte specifies that this field must be less than or equal to the
/// specified value, inclusive
#[prost(int32, optional, tag = "3")]
pub lte: ::core::option::Option<i32>,
/// Gt specifies that this field must be greater than the specified value,
/// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
/// range is reversed.
#[prost(int32, optional, tag = "4")]
pub gt: ::core::option::Option<i32>,
/// Gte specifies that this field must be greater than or equal to the
/// specified value, inclusive. If the value of Gte is larger than a
/// specified Lt or Lte, the range is reversed.
#[prost(int32, optional, tag = "5")]
pub gte: ::core::option::Option<i32>,
/// In specifies that this field must be equal to one of the specified
/// values
#[prost(int32, repeated, packed = "false", tag = "6")]
pub r#in: ::prost::alloc::vec::Vec<i32>,
/// NotIn specifies that this field cannot be equal to one of the specified
/// values
#[prost(int32, repeated, packed = "false", tag = "7")]
pub not_in: ::prost::alloc::vec::Vec<i32>,
/// IgnoreEmpty specifies that the validation rules of this field should be
/// evaluated only if the field is not empty
#[prost(bool, optional, tag = "8")]
pub ignore_empty: ::core::option::Option<bool>,
}
impl ::prost::Name for Int32Rules {
const NAME: &'static str = "Int32Rules";
const PACKAGE: &'static str = "validate";
fn full_name() -> ::prost::alloc::string::String {
"validate.Int32Rules".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/validate.Int32Rules".into()
}
}
/// Int64Rules describes the constraints applied to `int64` values
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Int64Rules {
/// Const specifies that this field must be exactly the specified value
#[prost(int64, optional, tag = "1")]
pub r#const: ::core::option::Option<i64>,
/// Lt specifies that this field must be less than the specified value,
/// exclusive
#[prost(int64, optional, tag = "2")]
pub lt: ::core::option::Option<i64>,
/// Lte specifies that this field must be less than or equal to the
/// specified value, inclusive
#[prost(int64, optional, tag = "3")]
pub lte: ::core::option::Option<i64>,
/// Gt specifies that this field must be greater than the specified value,
/// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
/// range is reversed.
#[prost(int64, optional, tag = "4")]
pub gt: ::core::option::Option<i64>,
/// Gte specifies that this field must be greater than or equal to the
/// specified value, inclusive. If the value of Gte is larger than a
/// specified Lt or Lte, the range is reversed.
#[prost(int64, optional, tag = "5")]
pub gte: ::core::option::Option<i64>,
/// In specifies that this field must be equal to one of the specified
/// values
#[prost(int64, repeated, packed = "false", tag = "6")]
pub r#in: ::prost::alloc::vec::Vec<i64>,
/// NotIn specifies that this field cannot be equal to one of the specified
/// values
#[prost(int64, repeated, packed = "false", tag = "7")]
pub not_in: ::prost::alloc::vec::Vec<i64>,
/// IgnoreEmpty specifies that the validation rules of this field should be
/// evaluated only if the field is not empty
#[prost(bool, optional, tag = "8")]
pub ignore_empty: ::core::option::Option<bool>,
}
impl ::prost::Name for Int64Rules {
const NAME: &'static str = "Int64Rules";
const PACKAGE: &'static str = "validate";
fn full_name() -> ::prost::alloc::string::String {
"validate.Int64Rules".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/validate.Int64Rules".into()
}
}
/// UInt32Rules describes the constraints applied to `uint32` values
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UInt32Rules {
/// Const specifies that this field must be exactly the specified value
#[prost(uint32, optional, tag = "1")]
pub r#const: ::core::option::Option<u32>,
/// Lt specifies that this field must be less than the specified value,
/// exclusive
#[prost(uint32, optional, tag = "2")]
pub lt: ::core::option::Option<u32>,
/// Lte specifies that this field must be less than or equal to the
/// specified value, inclusive
#[prost(uint32, optional, tag = "3")]
pub lte: ::core::option::Option<u32>,
/// Gt specifies that this field must be greater than the specified value,
/// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
/// range is reversed.
#[prost(uint32, optional, tag = "4")]
pub gt: ::core::option::Option<u32>,
/// Gte specifies that this field must be greater than or equal to the
/// specified value, inclusive. If the value of Gte is larger than a
/// specified Lt or Lte, the range is reversed.
#[prost(uint32, optional, tag = "5")]
pub gte: ::core::option::Option<u32>,
/// In specifies that this field must be equal to one of the specified
/// values
#[prost(uint32, repeated, packed = "false", tag = "6")]
pub r#in: ::prost::alloc::vec::Vec<u32>,
/// NotIn specifies that this field cannot be equal to one of the specified
/// values
#[prost(uint32, repeated, packed = "false", tag = "7")]
pub not_in: ::prost::alloc::vec::Vec<u32>,
/// IgnoreEmpty specifies that the validation rules of this field should be
/// evaluated only if the field is not empty
#[prost(bool, optional, tag = "8")]
pub ignore_empty: ::core::option::Option<bool>,
}
impl ::prost::Name for UInt32Rules {
const NAME: &'static str = "UInt32Rules";
const PACKAGE: &'static str = "validate";
fn full_name() -> ::prost::alloc::string::String {
"validate.UInt32Rules".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/validate.UInt32Rules".into()
}
}
/// UInt64Rules describes the constraints applied to `uint64` values
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UInt64Rules {
/// Const specifies that this field must be exactly the specified value
#[prost(uint64, optional, tag = "1")]
pub r#const: ::core::option::Option<u64>,
/// Lt specifies that this field must be less than the specified value,
/// exclusive
#[prost(uint64, optional, tag = "2")]
pub lt: ::core::option::Option<u64>,
/// Lte specifies that this field must be less than or equal to the
/// specified value, inclusive
#[prost(uint64, optional, tag = "3")]
pub lte: ::core::option::Option<u64>,
/// Gt specifies that this field must be greater than the specified value,
/// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
/// range is reversed.
#[prost(uint64, optional, tag = "4")]
pub gt: ::core::option::Option<u64>,
/// Gte specifies that this field must be greater than or equal to the
/// specified value, inclusive. If the value of Gte is larger than a
/// specified Lt or Lte, the range is reversed.
#[prost(uint64, optional, tag = "5")]
pub gte: ::core::option::Option<u64>,
/// In specifies that this field must be equal to one of the specified
/// values
#[prost(uint64, repeated, packed = "false", tag = "6")]
pub r#in: ::prost::alloc::vec::Vec<u64>,
/// NotIn specifies that this field cannot be equal to one of the specified
/// values
#[prost(uint64, repeated, packed = "false", tag = "7")]
pub not_in: ::prost::alloc::vec::Vec<u64>,
/// IgnoreEmpty specifies that the validation rules of this field should be
/// evaluated only if the field is not empty
#[prost(bool, optional, tag = "8")]
pub ignore_empty: ::core::option::Option<bool>,
}
impl ::prost::Name for UInt64Rules {
const NAME: &'static str = "UInt64Rules";
const PACKAGE: &'static str = "validate";
fn full_name() -> ::prost::alloc::string::String {
"validate.UInt64Rules".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/validate.UInt64Rules".into()
}
}
/// SInt32Rules describes the constraints applied to `sint32` values
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SInt32Rules {
/// Const specifies that this field must be exactly the specified value
#[prost(sint32, optional, tag = "1")]
pub r#const: ::core::option::Option<i32>,
/// Lt specifies that this field must be less than the specified value,
/// exclusive
#[prost(sint32, optional, tag = "2")]
pub lt: ::core::option::Option<i32>,
/// Lte specifies that this field must be less than or equal to the
/// specified value, inclusive
#[prost(sint32, optional, tag = "3")]
pub lte: ::core::option::Option<i32>,
/// Gt specifies that this field must be greater than the specified value,
/// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
/// range is reversed.
#[prost(sint32, optional, tag = "4")]
pub gt: ::core::option::Option<i32>,
/// Gte specifies that this field must be greater than or equal to the
/// specified value, inclusive. If the value of Gte is larger than a
/// specified Lt or Lte, the range is reversed.
#[prost(sint32, optional, tag = "5")]
pub gte: ::core::option::Option<i32>,
/// In specifies that this field must be equal to one of the specified
/// values
#[prost(sint32, repeated, packed = "false", tag = "6")]
pub r#in: ::prost::alloc::vec::Vec<i32>,
/// NotIn specifies that this field cannot be equal to one of the specified
/// values
#[prost(sint32, repeated, packed = "false", tag = "7")]
pub not_in: ::prost::alloc::vec::Vec<i32>,
/// IgnoreEmpty specifies that the validation rules of this field should be
/// evaluated only if the field is not empty
#[prost(bool, optional, tag = "8")]
pub ignore_empty: ::core::option::Option<bool>,
}
impl ::prost::Name for SInt32Rules {
const NAME: &'static str = "SInt32Rules";
const PACKAGE: &'static str = "validate";
fn full_name() -> ::prost::alloc::string::String {
"validate.SInt32Rules".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/validate.SInt32Rules".into()
}
}
/// SInt64Rules describes the constraints applied to `sint64` values
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SInt64Rules {
/// Const specifies that this field must be exactly the specified value
#[prost(sint64, optional, tag = "1")]
pub r#const: ::core::option::Option<i64>,
/// Lt specifies that this field must be less than the specified value,
/// exclusive
#[prost(sint64, optional, tag = "2")]
pub lt: ::core::option::Option<i64>,
/// Lte specifies that this field must be less than or equal to the
/// specified value, inclusive
#[prost(sint64, optional, tag = "3")]
pub lte: ::core::option::Option<i64>,
/// Gt specifies that this field must be greater than the specified value,
/// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
/// range is reversed.
#[prost(sint64, optional, tag = "4")]
pub gt: ::core::option::Option<i64>,
/// Gte specifies that this field must be greater than or equal to the
/// specified value, inclusive. If the value of Gte is larger than a
/// specified Lt or Lte, the range is reversed.
#[prost(sint64, optional, tag = "5")]
pub gte: ::core::option::Option<i64>,
/// In specifies that this field must be equal to one of the specified
/// values
#[prost(sint64, repeated, packed = "false", tag = "6")]
pub r#in: ::prost::alloc::vec::Vec<i64>,
/// NotIn specifies that this field cannot be equal to one of the specified
/// values
#[prost(sint64, repeated, packed = "false", tag = "7")]
pub not_in: ::prost::alloc::vec::Vec<i64>,
/// IgnoreEmpty specifies that the validation rules of this field should be
/// evaluated only if the field is not empty
#[prost(bool, optional, tag = "8")]
pub ignore_empty: ::core::option::Option<bool>,
}
impl ::prost::Name for SInt64Rules {
const NAME: &'static str = "SInt64Rules";
const PACKAGE: &'static str = "validate";
fn full_name() -> ::prost::alloc::string::String {
"validate.SInt64Rules".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/validate.SInt64Rules".into()
}
}
/// Fixed32Rules describes the constraints applied to `fixed32` values
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Fixed32Rules {
/// Const specifies that this field must be exactly the specified value
#[prost(fixed32, optional, tag = "1")]
pub r#const: ::core::option::Option<u32>,
/// Lt specifies that this field must be less than the specified value,
/// exclusive
#[prost(fixed32, optional, tag = "2")]
pub lt: ::core::option::Option<u32>,
/// Lte specifies that this field must be less than or equal to the
/// specified value, inclusive
#[prost(fixed32, optional, tag = "3")]
pub lte: ::core::option::Option<u32>,
/// Gt specifies that this field must be greater than the specified value,
/// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
/// range is reversed.
#[prost(fixed32, optional, tag = "4")]
pub gt: ::core::option::Option<u32>,
/// Gte specifies that this field must be greater than or equal to the
/// specified value, inclusive. If the value of Gte is larger than a
/// specified Lt or Lte, the range is reversed.
#[prost(fixed32, optional, tag = "5")]
pub gte: ::core::option::Option<u32>,
/// In specifies that this field must be equal to one of the specified
/// values
#[prost(fixed32, repeated, packed = "false", tag = "6")]
pub r#in: ::prost::alloc::vec::Vec<u32>,
/// NotIn specifies that this field cannot be equal to one of the specified
/// values
#[prost(fixed32, repeated, packed = "false", tag = "7")]
pub not_in: ::prost::alloc::vec::Vec<u32>,
/// IgnoreEmpty specifies that the validation rules of this field should be
/// evaluated only if the field is not empty
#[prost(bool, optional, tag = "8")]
pub ignore_empty: ::core::option::Option<bool>,
}
impl ::prost::Name for Fixed32Rules {
const NAME: &'static str = "Fixed32Rules";
const PACKAGE: &'static str = "validate";
fn full_name() -> ::prost::alloc::string::String {
"validate.Fixed32Rules".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/validate.Fixed32Rules".into()
}
}
/// Fixed64Rules describes the constraints applied to `fixed64` values
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Fixed64Rules {
/// Const specifies that this field must be exactly the specified value
#[prost(fixed64, optional, tag = "1")]
pub r#const: ::core::option::Option<u64>,
/// Lt specifies that this field must be less than the specified value,
/// exclusive
#[prost(fixed64, optional, tag = "2")]
pub lt: ::core::option::Option<u64>,
/// Lte specifies that this field must be less than or equal to the
/// specified value, inclusive
#[prost(fixed64, optional, tag = "3")]
pub lte: ::core::option::Option<u64>,
/// Gt specifies that this field must be greater than the specified value,
/// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
/// range is reversed.
#[prost(fixed64, optional, tag = "4")]
pub gt: ::core::option::Option<u64>,
/// Gte specifies that this field must be greater than or equal to the
/// specified value, inclusive. If the value of Gte is larger than a
/// specified Lt or Lte, the range is reversed.
#[prost(fixed64, optional, tag = "5")]
pub gte: ::core::option::Option<u64>,
/// In specifies that this field must be equal to one of the specified
/// values
#[prost(fixed64, repeated, packed = "false", tag = "6")]
pub r#in: ::prost::alloc::vec::Vec<u64>,
/// NotIn specifies that this field cannot be equal to one of the specified
/// values
#[prost(fixed64, repeated, packed = "false", tag = "7")]
pub not_in: ::prost::alloc::vec::Vec<u64>,
/// IgnoreEmpty specifies that the validation rules of this field should be
/// evaluated only if the field is not empty
#[prost(bool, optional, tag = "8")]
pub ignore_empty: ::core::option::Option<bool>,
}
impl ::prost::Name for Fixed64Rules {
const NAME: &'static str = "Fixed64Rules";
const PACKAGE: &'static str = "validate";
fn full_name() -> ::prost::alloc::string::String {
"validate.Fixed64Rules".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/validate.Fixed64Rules".into()
}
}
/// SFixed32Rules describes the constraints applied to `sfixed32` values
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SFixed32Rules {
/// Const specifies that this field must be exactly the specified value
#[prost(sfixed32, optional, tag = "1")]
pub r#const: ::core::option::Option<i32>,
/// Lt specifies that this field must be less than the specified value,
/// exclusive
#[prost(sfixed32, optional, tag = "2")]
pub lt: ::core::option::Option<i32>,
/// Lte specifies that this field must be less than or equal to the
/// specified value, inclusive
#[prost(sfixed32, optional, tag = "3")]
pub lte: ::core::option::Option<i32>,
/// Gt specifies that this field must be greater than the specified value,
/// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
/// range is reversed.
#[prost(sfixed32, optional, tag = "4")]
pub gt: ::core::option::Option<i32>,
/// Gte specifies that this field must be greater than or equal to the
/// specified value, inclusive. If the value of Gte is larger than a
/// specified Lt or Lte, the range is reversed.
#[prost(sfixed32, optional, tag = "5")]
pub gte: ::core::option::Option<i32>,
/// In specifies that this field must be equal to one of the specified
/// values
#[prost(sfixed32, repeated, packed = "false", tag = "6")]
pub r#in: ::prost::alloc::vec::Vec<i32>,
/// NotIn specifies that this field cannot be equal to one of the specified
/// values
#[prost(sfixed32, repeated, packed = "false", tag = "7")]
pub not_in: ::prost::alloc::vec::Vec<i32>,
/// IgnoreEmpty specifies that the validation rules of this field should be
/// evaluated only if the field is not empty
#[prost(bool, optional, tag = "8")]
pub ignore_empty: ::core::option::Option<bool>,
}
impl ::prost::Name for SFixed32Rules {
const NAME: &'static str = "SFixed32Rules";
const PACKAGE: &'static str = "validate";
fn full_name() -> ::prost::alloc::string::String {
"validate.SFixed32Rules".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/validate.SFixed32Rules".into()
}
}
/// SFixed64Rules describes the constraints applied to `sfixed64` values
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SFixed64Rules {
/// Const specifies that this field must be exactly the specified value
#[prost(sfixed64, optional, tag = "1")]
pub r#const: ::core::option::Option<i64>,
/// Lt specifies that this field must be less than the specified value,
/// exclusive
#[prost(sfixed64, optional, tag = "2")]
pub lt: ::core::option::Option<i64>,
/// Lte specifies that this field must be less than or equal to the
/// specified value, inclusive
#[prost(sfixed64, optional, tag = "3")]
pub lte: ::core::option::Option<i64>,
/// Gt specifies that this field must be greater than the specified value,
/// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
/// range is reversed.
#[prost(sfixed64, optional, tag = "4")]
pub gt: ::core::option::Option<i64>,
/// Gte specifies that this field must be greater than or equal to the
/// specified value, inclusive. If the value of Gte is larger than a
/// specified Lt or Lte, the range is reversed.
#[prost(sfixed64, optional, tag = "5")]
pub gte: ::core::option::Option<i64>,
/// In specifies that this field must be equal to one of the specified
/// values
#[prost(sfixed64, repeated, packed = "false", tag = "6")]
pub r#in: ::prost::alloc::vec::Vec<i64>,
/// NotIn specifies that this field cannot be equal to one of the specified
/// values
#[prost(sfixed64, repeated, packed = "false", tag = "7")]
pub not_in: ::prost::alloc::vec::Vec<i64>,
/// IgnoreEmpty specifies that the validation rules of this field should be
/// evaluated only if the field is not empty
#[prost(bool, optional, tag = "8")]
pub ignore_empty: ::core::option::Option<bool>,
}
impl ::prost::Name for SFixed64Rules {
const NAME: &'static str = "SFixed64Rules";
const PACKAGE: &'static str = "validate";
fn full_name() -> ::prost::alloc::string::String {
"validate.SFixed64Rules".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/validate.SFixed64Rules".into()
}
}
/// BoolRules describes the constraints applied to `bool` values
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BoolRules {
/// Const specifies that this field must be exactly the specified value
#[prost(bool, optional, tag = "1")]
pub r#const: ::core::option::Option<bool>,
}
impl ::prost::Name for BoolRules {
const NAME: &'static str = "BoolRules";
const PACKAGE: &'static str = "validate";
fn full_name() -> ::prost::alloc::string::String {
"validate.BoolRules".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/validate.BoolRules".into()
}
}
/// StringRules describe the constraints applied to `string` values
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StringRules {
/// Const specifies that this field must be exactly the specified value
#[prost(string, optional, tag = "1")]
pub r#const: ::core::option::Option<::prost::alloc::string::String>,
/// Len specifies that this field must be the specified number of
/// characters (Unicode code points). Note that the number of
/// characters may differ from the number of bytes in the string.
#[prost(uint64, optional, tag = "19")]
pub len: ::core::option::Option<u64>,
/// MinLen specifies that this field must be the specified number of
/// characters (Unicode code points) at a minimum. Note that the number of
/// characters may differ from the number of bytes in the string.
#[prost(uint64, optional, tag = "2")]
pub min_len: ::core::option::Option<u64>,
/// MaxLen specifies that this field must be the specified number of
/// characters (Unicode code points) at a maximum. Note that the number of
/// characters may differ from the number of bytes in the string.
#[prost(uint64, optional, tag = "3")]
pub max_len: ::core::option::Option<u64>,
/// LenBytes specifies that this field must be the specified number of bytes
#[prost(uint64, optional, tag = "20")]
pub len_bytes: ::core::option::Option<u64>,
/// MinBytes specifies that this field must be the specified number of bytes
/// at a minimum
#[prost(uint64, optional, tag = "4")]
pub min_bytes: ::core::option::Option<u64>,
/// MaxBytes specifies that this field must be the specified number of bytes
/// at a maximum
#[prost(uint64, optional, tag = "5")]
pub max_bytes: ::core::option::Option<u64>,
/// Pattern specifies that this field must match against the specified
/// regular expression (RE2 syntax). The included expression should elide
/// any delimiters.
#[prost(string, optional, tag = "6")]
pub pattern: ::core::option::Option<::prost::alloc::string::String>,
/// Prefix specifies that this field must have the specified substring at
/// the beginning of the string.
#[prost(string, optional, tag = "7")]
pub prefix: ::core::option::Option<::prost::alloc::string::String>,
/// Suffix specifies that this field must have the specified substring at
/// the end of the string.
#[prost(string, optional, tag = "8")]
pub suffix: ::core::option::Option<::prost::alloc::string::String>,
/// Contains specifies that this field must have the specified substring
/// anywhere in the string.
#[prost(string, optional, tag = "9")]
pub contains: ::core::option::Option<::prost::alloc::string::String>,
/// NotContains specifies that this field cannot have the specified substring
/// anywhere in the string.
#[prost(string, optional, tag = "23")]
pub not_contains: ::core::option::Option<::prost::alloc::string::String>,
/// In specifies that this field must be equal to one of the specified
/// values
#[prost(string, repeated, tag = "10")]
pub r#in: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// NotIn specifies that this field cannot be equal to one of the specified
/// values
#[prost(string, repeated, tag = "11")]
pub not_in: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable
/// strict header validation.
/// By default, this is true, and HTTP header validations are RFC-compliant.
/// Setting to false will enable a looser validations that only disallows
/// \\r\n\0 characters, which can be used to bypass header matching rules.
#[prost(bool, optional, tag = "25", default = "true")]
pub strict: ::core::option::Option<bool>,
/// IgnoreEmpty specifies that the validation rules of this field should be
/// evaluated only if the field is not empty
#[prost(bool, optional, tag = "26")]
pub ignore_empty: ::core::option::Option<bool>,
/// WellKnown rules provide advanced constraints against common string
/// patterns
#[prost(
oneof = "string_rules::WellKnown",
tags = "12, 13, 14, 15, 16, 17, 18, 21, 22, 24"
)]
pub well_known: ::core::option::Option<string_rules::WellKnown>,
}
/// Nested message and enum types in `StringRules`.
pub mod string_rules {
/// WellKnown rules provide advanced constraints against common string
/// patterns
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum WellKnown {
/// Email specifies that the field must be a valid email address as
/// defined by RFC 5322
#[prost(bool, tag = "12")]
Email(bool),
/// Hostname specifies that the field must be a valid hostname as
/// defined by RFC 1034. This constraint does not support
/// internationalized domain names (IDNs).
#[prost(bool, tag = "13")]
Hostname(bool),
/// Ip specifies that the field must be a valid IP (v4 or v6) address.
/// Valid IPv6 addresses should not include surrounding square brackets.
#[prost(bool, tag = "14")]
Ip(bool),
/// Ipv4 specifies that the field must be a valid IPv4 address.
#[prost(bool, tag = "15")]
Ipv4(bool),
/// Ipv6 specifies that the field must be a valid IPv6 address. Valid
/// IPv6 addresses should not include surrounding square brackets.
#[prost(bool, tag = "16")]
Ipv6(bool),
/// Uri specifies that the field must be a valid, absolute URI as defined
/// by RFC 3986
#[prost(bool, tag = "17")]
Uri(bool),
/// UriRef specifies that the field must be a valid URI as defined by RFC
/// 3986 and may be relative or absolute.
#[prost(bool, tag = "18")]
UriRef(bool),
/// Address specifies that the field must be either a valid hostname as
/// defined by RFC 1034 (which does not support internationalized domain
/// names or IDNs), or it can be a valid IP (v4 or v6).
#[prost(bool, tag = "21")]
Address(bool),
/// Uuid specifies that the field must be a valid UUID as defined by
/// RFC 4122
#[prost(bool, tag = "22")]
Uuid(bool),
/// WellKnownRegex specifies a common well known pattern defined as a regex.
#[prost(enumeration = "super::KnownRegex", tag = "24")]
WellKnownRegex(i32),
}
}
impl ::prost::Name for StringRules {
const NAME: &'static str = "StringRules";
const PACKAGE: &'static str = "validate";
fn full_name() -> ::prost::alloc::string::String {
"validate.StringRules".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/validate.StringRules".into()
}
}
/// BytesRules describe the constraints applied to `bytes` values
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BytesRules {
/// Const specifies that this field must be exactly the specified value
#[prost(bytes = "vec", optional, tag = "1")]
pub r#const: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
/// Len specifies that this field must be the specified number of bytes
#[prost(uint64, optional, tag = "13")]
pub len: ::core::option::Option<u64>,
/// MinLen specifies that this field must be the specified number of bytes
/// at a minimum
#[prost(uint64, optional, tag = "2")]
pub min_len: ::core::option::Option<u64>,
/// MaxLen specifies that this field must be the specified number of bytes
/// at a maximum
#[prost(uint64, optional, tag = "3")]
pub max_len: ::core::option::Option<u64>,
/// Pattern specifies that this field must match against the specified
/// regular expression (RE2 syntax). The included expression should elide
/// any delimiters.
#[prost(string, optional, tag = "4")]
pub pattern: ::core::option::Option<::prost::alloc::string::String>,
/// Prefix specifies that this field must have the specified bytes at the
/// beginning of the string.
#[prost(bytes = "vec", optional, tag = "5")]
pub prefix: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
/// Suffix specifies that this field must have the specified bytes at the
/// end of the string.
#[prost(bytes = "vec", optional, tag = "6")]
pub suffix: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
/// Contains specifies that this field must have the specified bytes
/// anywhere in the string.
#[prost(bytes = "vec", optional, tag = "7")]
pub contains: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
/// In specifies that this field must be equal to one of the specified
/// values
#[prost(bytes = "vec", repeated, tag = "8")]
pub r#in: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
/// NotIn specifies that this field cannot be equal to one of the specified
/// values
#[prost(bytes = "vec", repeated, tag = "9")]
pub not_in: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
/// IgnoreEmpty specifies that the validation rules of this field should be
/// evaluated only if the field is not empty
#[prost(bool, optional, tag = "14")]
pub ignore_empty: ::core::option::Option<bool>,
/// WellKnown rules provide advanced constraints against common byte
/// patterns
#[prost(oneof = "bytes_rules::WellKnown", tags = "10, 11, 12")]
pub well_known: ::core::option::Option<bytes_rules::WellKnown>,
}
/// Nested message and enum types in `BytesRules`.
pub mod bytes_rules {
/// WellKnown rules provide advanced constraints against common byte
/// patterns
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum WellKnown {
/// Ip specifies that the field must be a valid IP (v4 or v6) address in
/// byte format
#[prost(bool, tag = "10")]
Ip(bool),
/// Ipv4 specifies that the field must be a valid IPv4 address in byte
/// format
#[prost(bool, tag = "11")]
Ipv4(bool),
/// Ipv6 specifies that the field must be a valid IPv6 address in byte
/// format
#[prost(bool, tag = "12")]
Ipv6(bool),
}
}
impl ::prost::Name for BytesRules {
const NAME: &'static str = "BytesRules";
const PACKAGE: &'static str = "validate";
fn full_name() -> ::prost::alloc::string::String {
"validate.BytesRules".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/validate.BytesRules".into()
}
}
/// EnumRules describe the constraints applied to enum values
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct EnumRules {
/// Const specifies that this field must be exactly the specified value
#[prost(int32, optional, tag = "1")]
pub r#const: ::core::option::Option<i32>,
/// DefinedOnly specifies that this field must be only one of the defined
/// values for this enum, failing on any undefined value.
#[prost(bool, optional, tag = "2")]
pub defined_only: ::core::option::Option<bool>,
/// In specifies that this field must be equal to one of the specified
/// values
#[prost(int32, repeated, packed = "false", tag = "3")]
pub r#in: ::prost::alloc::vec::Vec<i32>,
/// NotIn specifies that this field cannot be equal to one of the specified
/// values
#[prost(int32, repeated, packed = "false", tag = "4")]
pub not_in: ::prost::alloc::vec::Vec<i32>,
}
impl ::prost::Name for EnumRules {
const NAME: &'static str = "EnumRules";
const PACKAGE: &'static str = "validate";
fn full_name() -> ::prost::alloc::string::String {
"validate.EnumRules".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/validate.EnumRules".into()
}
}
/// MessageRules describe the constraints applied to embedded message values.
/// For message-type fields, validation is performed recursively.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MessageRules {
/// Skip specifies that the validation rules of this field should not be
/// evaluated
#[prost(bool, optional, tag = "1")]
pub skip: ::core::option::Option<bool>,
/// Required specifies that this field must be set
#[prost(bool, optional, tag = "2")]
pub required: ::core::option::Option<bool>,
}
impl ::prost::Name for MessageRules {
const NAME: &'static str = "MessageRules";
const PACKAGE: &'static str = "validate";
fn full_name() -> ::prost::alloc::string::String {
"validate.MessageRules".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/validate.MessageRules".into()
}
}
/// RepeatedRules describe the constraints applied to `repeated` values
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RepeatedRules {
/// MinItems specifies that this field must have the specified number of
/// items at a minimum
#[prost(uint64, optional, tag = "1")]
pub min_items: ::core::option::Option<u64>,
/// MaxItems specifies that this field must have the specified number of
/// items at a maximum
#[prost(uint64, optional, tag = "2")]
pub max_items: ::core::option::Option<u64>,
/// Unique specifies that all elements in this field must be unique. This
/// constraint is only applicable to scalar and enum types (messages are not
/// supported).
#[prost(bool, optional, tag = "3")]
pub unique: ::core::option::Option<bool>,
/// Items specifies the constraints to be applied to each item in the field.
/// Repeated message fields will still execute validation against each item
/// unless skip is specified here.
#[prost(message, optional, boxed, tag = "4")]
pub items: ::core::option::Option<::prost::alloc::boxed::Box<FieldRules>>,
/// IgnoreEmpty specifies that the validation rules of this field should be
/// evaluated only if the field is not empty
#[prost(bool, optional, tag = "5")]
pub ignore_empty: ::core::option::Option<bool>,
}
impl ::prost::Name for RepeatedRules {
const NAME: &'static str = "RepeatedRules";
const PACKAGE: &'static str = "validate";
fn full_name() -> ::prost::alloc::string::String {
"validate.RepeatedRules".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/validate.RepeatedRules".into()
}
}
/// MapRules describe the constraints applied to `map` values
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MapRules {
/// MinPairs specifies that this field must have the specified number of
/// KVs at a minimum
#[prost(uint64, optional, tag = "1")]
pub min_pairs: ::core::option::Option<u64>,
/// MaxPairs specifies that this field must have the specified number of
/// KVs at a maximum
#[prost(uint64, optional, tag = "2")]
pub max_pairs: ::core::option::Option<u64>,
/// NoSparse specifies values in this field cannot be unset. This only
/// applies to map's with message value types.
#[prost(bool, optional, tag = "3")]
pub no_sparse: ::core::option::Option<bool>,
/// Keys specifies the constraints to be applied to each key in the field.
#[prost(message, optional, boxed, tag = "4")]
pub keys: ::core::option::Option<::prost::alloc::boxed::Box<FieldRules>>,
/// Values specifies the constraints to be applied to the value of each key
/// in the field. Message values will still have their validations evaluated
/// unless skip is specified here.
#[prost(message, optional, boxed, tag = "5")]
pub values: ::core::option::Option<::prost::alloc::boxed::Box<FieldRules>>,
/// IgnoreEmpty specifies that the validation rules of this field should be
/// evaluated only if the field is not empty
#[prost(bool, optional, tag = "6")]
pub ignore_empty: ::core::option::Option<bool>,
}
impl ::prost::Name for MapRules {
const NAME: &'static str = "MapRules";
const PACKAGE: &'static str = "validate";
fn full_name() -> ::prost::alloc::string::String {
"validate.MapRules".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/validate.MapRules".into()
}
}
/// AnyRules describe constraints applied exclusively to the
/// `google.protobuf.Any` well-known type
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AnyRules {
/// Required specifies that this field must be set
#[prost(bool, optional, tag = "1")]
pub required: ::core::option::Option<bool>,
/// In specifies that this field's `type_url` must be equal to one of the
/// specified values.
#[prost(string, repeated, tag = "2")]
pub r#in: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// NotIn specifies that this field's `type_url` must not be equal to any of
/// the specified values.
#[prost(string, repeated, tag = "3")]
pub not_in: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for AnyRules {
const NAME: &'static str = "AnyRules";
const PACKAGE: &'static str = "validate";
fn full_name() -> ::prost::alloc::string::String {
"validate.AnyRules".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/validate.AnyRules".into()
}
}
/// DurationRules describe the constraints applied exclusively to the
/// `google.protobuf.Duration` well-known type
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DurationRules {
/// Required specifies that this field must be set
#[prost(bool, optional, tag = "1")]
pub required: ::core::option::Option<bool>,
/// Const specifies that this field must be exactly the specified value
#[prost(message, optional, tag = "2")]
pub r#const: ::core::option::Option<super::google::protobuf::Duration>,
/// Lt specifies that this field must be less than the specified value,
/// exclusive
#[prost(message, optional, tag = "3")]
pub lt: ::core::option::Option<super::google::protobuf::Duration>,
/// Lt specifies that this field must be less than the specified value,
/// inclusive
#[prost(message, optional, tag = "4")]
pub lte: ::core::option::Option<super::google::protobuf::Duration>,
/// Gt specifies that this field must be greater than the specified value,
/// exclusive
#[prost(message, optional, tag = "5")]
pub gt: ::core::option::Option<super::google::protobuf::Duration>,
/// Gte specifies that this field must be greater than the specified value,
/// inclusive
#[prost(message, optional, tag = "6")]
pub gte: ::core::option::Option<super::google::protobuf::Duration>,
/// In specifies that this field must be equal to one of the specified
/// values
#[prost(message, repeated, tag = "7")]
pub r#in: ::prost::alloc::vec::Vec<super::google::protobuf::Duration>,
/// NotIn specifies that this field cannot be equal to one of the specified
/// values
#[prost(message, repeated, tag = "8")]
pub not_in: ::prost::alloc::vec::Vec<super::google::protobuf::Duration>,
}
impl ::prost::Name for DurationRules {
const NAME: &'static str = "DurationRules";
const PACKAGE: &'static str = "validate";
fn full_name() -> ::prost::alloc::string::String {
"validate.DurationRules".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/validate.DurationRules".into()
}
}
/// TimestampRules describe the constraints applied exclusively to the
/// `google.protobuf.Timestamp` well-known type
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TimestampRules {
/// Required specifies that this field must be set
#[prost(bool, optional, tag = "1")]
pub required: ::core::option::Option<bool>,
/// Const specifies that this field must be exactly the specified value
#[prost(message, optional, tag = "2")]
pub r#const: ::core::option::Option<super::google::protobuf::Timestamp>,
/// Lt specifies that this field must be less than the specified value,
/// exclusive
#[prost(message, optional, tag = "3")]
pub lt: ::core::option::Option<super::google::protobuf::Timestamp>,
/// Lte specifies that this field must be less than the specified value,
/// inclusive
#[prost(message, optional, tag = "4")]
pub lte: ::core::option::Option<super::google::protobuf::Timestamp>,
/// Gt specifies that this field must be greater than the specified value,
/// exclusive
#[prost(message, optional, tag = "5")]
pub gt: ::core::option::Option<super::google::protobuf::Timestamp>,
/// Gte specifies that this field must be greater than the specified value,
/// inclusive
#[prost(message, optional, tag = "6")]
pub gte: ::core::option::Option<super::google::protobuf::Timestamp>,
/// LtNow specifies that this must be less than the current time. LtNow
/// can only be used with the Within rule.
#[prost(bool, optional, tag = "7")]
pub lt_now: ::core::option::Option<bool>,
/// GtNow specifies that this must be greater than the current time. GtNow
/// can only be used with the Within rule.
#[prost(bool, optional, tag = "8")]
pub gt_now: ::core::option::Option<bool>,
/// Within specifies that this field must be within this duration of the
/// current time. This constraint can be used alone or with the LtNow and
/// GtNow rules.
#[prost(message, optional, tag = "9")]
pub within: ::core::option::Option<super::google::protobuf::Duration>,
}
impl ::prost::Name for TimestampRules {
const NAME: &'static str = "TimestampRules";
const PACKAGE: &'static str = "validate";
fn full_name() -> ::prost::alloc::string::String {
"validate.TimestampRules".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/validate.TimestampRules".into()
}
}
/// WellKnownRegex contain some well-known patterns.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum KnownRegex {
Unknown = 0,
/// HTTP header name as defined by RFC 7230.
HttpHeaderName = 1,
/// HTTP header value as defined by RFC 7230.
HttpHeaderValue = 2,
}
impl KnownRegex {
/// 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 {
Self::Unknown => "UNKNOWN",
Self::HttpHeaderName => "HTTP_HEADER_NAME",
Self::HttpHeaderValue => "HTTP_HEADER_VALUE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNKNOWN" => Some(Self::Unknown),
"HTTP_HEADER_NAME" => Some(Self::HttpHeaderName),
"HTTP_HEADER_VALUE" => Some(Self::HttpHeaderValue),
_ => None,
}
}
}