Skip to main content

megacommerce_proto/envoy/
validate.rs

1// This file is @generated by prost-build.
2/// FieldRules encapsulates the rules for each type of field. Depending on the
3/// field, the correct set should be used to ensure proper validations.
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct FieldRules {
6    #[prost(message, optional, tag = "17")]
7    pub message: ::core::option::Option<MessageRules>,
8    #[prost(
9        oneof = "field_rules::Type",
10        tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22"
11    )]
12    pub r#type: ::core::option::Option<field_rules::Type>,
13}
14/// Nested message and enum types in `FieldRules`.
15pub mod field_rules {
16    #[derive(Clone, PartialEq, ::prost::Oneof)]
17    pub enum Type {
18        /// Scalar Field Types
19        #[prost(message, tag = "1")]
20        Float(super::FloatRules),
21        #[prost(message, tag = "2")]
22        Double(super::DoubleRules),
23        #[prost(message, tag = "3")]
24        Int32(super::Int32Rules),
25        #[prost(message, tag = "4")]
26        Int64(super::Int64Rules),
27        #[prost(message, tag = "5")]
28        Uint32(super::UInt32Rules),
29        #[prost(message, tag = "6")]
30        Uint64(super::UInt64Rules),
31        #[prost(message, tag = "7")]
32        Sint32(super::SInt32Rules),
33        #[prost(message, tag = "8")]
34        Sint64(super::SInt64Rules),
35        #[prost(message, tag = "9")]
36        Fixed32(super::Fixed32Rules),
37        #[prost(message, tag = "10")]
38        Fixed64(super::Fixed64Rules),
39        #[prost(message, tag = "11")]
40        Sfixed32(super::SFixed32Rules),
41        #[prost(message, tag = "12")]
42        Sfixed64(super::SFixed64Rules),
43        #[prost(message, tag = "13")]
44        Bool(super::BoolRules),
45        #[prost(message, tag = "14")]
46        String(super::StringRules),
47        #[prost(message, tag = "15")]
48        Bytes(super::BytesRules),
49        /// Complex Field Types
50        #[prost(message, tag = "16")]
51        Enum(super::EnumRules),
52        #[prost(message, tag = "18")]
53        Repeated(::prost::alloc::boxed::Box<super::RepeatedRules>),
54        #[prost(message, tag = "19")]
55        Map(::prost::alloc::boxed::Box<super::MapRules>),
56        /// Well-Known Field Types
57        #[prost(message, tag = "20")]
58        Any(super::AnyRules),
59        #[prost(message, tag = "21")]
60        Duration(super::DurationRules),
61        #[prost(message, tag = "22")]
62        Timestamp(super::TimestampRules),
63    }
64}
65/// FloatRules describes the constraints applied to `float` values
66#[derive(Clone, PartialEq, ::prost::Message)]
67pub struct FloatRules {
68    /// Const specifies that this field must be exactly the specified value
69    #[prost(float, optional, tag = "1")]
70    pub r#const: ::core::option::Option<f32>,
71    /// Lt specifies that this field must be less than the specified value,
72    /// exclusive
73    #[prost(float, optional, tag = "2")]
74    pub lt: ::core::option::Option<f32>,
75    /// Lte specifies that this field must be less than or equal to the
76    /// specified value, inclusive
77    #[prost(float, optional, tag = "3")]
78    pub lte: ::core::option::Option<f32>,
79    /// Gt specifies that this field must be greater than the specified value,
80    /// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
81    /// range is reversed.
82    #[prost(float, optional, tag = "4")]
83    pub gt: ::core::option::Option<f32>,
84    /// Gte specifies that this field must be greater than or equal to the
85    /// specified value, inclusive. If the value of Gte is larger than a
86    /// specified Lt or Lte, the range is reversed.
87    #[prost(float, optional, tag = "5")]
88    pub gte: ::core::option::Option<f32>,
89    /// In specifies that this field must be equal to one of the specified
90    /// values
91    #[prost(float, repeated, packed = "false", tag = "6")]
92    pub r#in: ::prost::alloc::vec::Vec<f32>,
93    /// NotIn specifies that this field cannot be equal to one of the specified
94    /// values
95    #[prost(float, repeated, packed = "false", tag = "7")]
96    pub not_in: ::prost::alloc::vec::Vec<f32>,
97    /// IgnoreEmpty specifies that the validation rules of this field should be
98    /// evaluated only if the field is not empty
99    #[prost(bool, optional, tag = "8")]
100    pub ignore_empty: ::core::option::Option<bool>,
101}
102/// DoubleRules describes the constraints applied to `double` values
103#[derive(Clone, PartialEq, ::prost::Message)]
104pub struct DoubleRules {
105    /// Const specifies that this field must be exactly the specified value
106    #[prost(double, optional, tag = "1")]
107    pub r#const: ::core::option::Option<f64>,
108    /// Lt specifies that this field must be less than the specified value,
109    /// exclusive
110    #[prost(double, optional, tag = "2")]
111    pub lt: ::core::option::Option<f64>,
112    /// Lte specifies that this field must be less than or equal to the
113    /// specified value, inclusive
114    #[prost(double, optional, tag = "3")]
115    pub lte: ::core::option::Option<f64>,
116    /// Gt specifies that this field must be greater than the specified value,
117    /// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
118    /// range is reversed.
119    #[prost(double, optional, tag = "4")]
120    pub gt: ::core::option::Option<f64>,
121    /// Gte specifies that this field must be greater than or equal to the
122    /// specified value, inclusive. If the value of Gte is larger than a
123    /// specified Lt or Lte, the range is reversed.
124    #[prost(double, optional, tag = "5")]
125    pub gte: ::core::option::Option<f64>,
126    /// In specifies that this field must be equal to one of the specified
127    /// values
128    #[prost(double, repeated, packed = "false", tag = "6")]
129    pub r#in: ::prost::alloc::vec::Vec<f64>,
130    /// NotIn specifies that this field cannot be equal to one of the specified
131    /// values
132    #[prost(double, repeated, packed = "false", tag = "7")]
133    pub not_in: ::prost::alloc::vec::Vec<f64>,
134    /// IgnoreEmpty specifies that the validation rules of this field should be
135    /// evaluated only if the field is not empty
136    #[prost(bool, optional, tag = "8")]
137    pub ignore_empty: ::core::option::Option<bool>,
138}
139/// Int32Rules describes the constraints applied to `int32` values
140#[derive(Clone, PartialEq, ::prost::Message)]
141pub struct Int32Rules {
142    /// Const specifies that this field must be exactly the specified value
143    #[prost(int32, optional, tag = "1")]
144    pub r#const: ::core::option::Option<i32>,
145    /// Lt specifies that this field must be less than the specified value,
146    /// exclusive
147    #[prost(int32, optional, tag = "2")]
148    pub lt: ::core::option::Option<i32>,
149    /// Lte specifies that this field must be less than or equal to the
150    /// specified value, inclusive
151    #[prost(int32, optional, tag = "3")]
152    pub lte: ::core::option::Option<i32>,
153    /// Gt specifies that this field must be greater than the specified value,
154    /// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
155    /// range is reversed.
156    #[prost(int32, optional, tag = "4")]
157    pub gt: ::core::option::Option<i32>,
158    /// Gte specifies that this field must be greater than or equal to the
159    /// specified value, inclusive. If the value of Gte is larger than a
160    /// specified Lt or Lte, the range is reversed.
161    #[prost(int32, optional, tag = "5")]
162    pub gte: ::core::option::Option<i32>,
163    /// In specifies that this field must be equal to one of the specified
164    /// values
165    #[prost(int32, repeated, packed = "false", tag = "6")]
166    pub r#in: ::prost::alloc::vec::Vec<i32>,
167    /// NotIn specifies that this field cannot be equal to one of the specified
168    /// values
169    #[prost(int32, repeated, packed = "false", tag = "7")]
170    pub not_in: ::prost::alloc::vec::Vec<i32>,
171    /// IgnoreEmpty specifies that the validation rules of this field should be
172    /// evaluated only if the field is not empty
173    #[prost(bool, optional, tag = "8")]
174    pub ignore_empty: ::core::option::Option<bool>,
175}
176/// Int64Rules describes the constraints applied to `int64` values
177#[derive(Clone, PartialEq, ::prost::Message)]
178pub struct Int64Rules {
179    /// Const specifies that this field must be exactly the specified value
180    #[prost(int64, optional, tag = "1")]
181    pub r#const: ::core::option::Option<i64>,
182    /// Lt specifies that this field must be less than the specified value,
183    /// exclusive
184    #[prost(int64, optional, tag = "2")]
185    pub lt: ::core::option::Option<i64>,
186    /// Lte specifies that this field must be less than or equal to the
187    /// specified value, inclusive
188    #[prost(int64, optional, tag = "3")]
189    pub lte: ::core::option::Option<i64>,
190    /// Gt specifies that this field must be greater than the specified value,
191    /// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
192    /// range is reversed.
193    #[prost(int64, optional, tag = "4")]
194    pub gt: ::core::option::Option<i64>,
195    /// Gte specifies that this field must be greater than or equal to the
196    /// specified value, inclusive. If the value of Gte is larger than a
197    /// specified Lt or Lte, the range is reversed.
198    #[prost(int64, optional, tag = "5")]
199    pub gte: ::core::option::Option<i64>,
200    /// In specifies that this field must be equal to one of the specified
201    /// values
202    #[prost(int64, repeated, packed = "false", tag = "6")]
203    pub r#in: ::prost::alloc::vec::Vec<i64>,
204    /// NotIn specifies that this field cannot be equal to one of the specified
205    /// values
206    #[prost(int64, repeated, packed = "false", tag = "7")]
207    pub not_in: ::prost::alloc::vec::Vec<i64>,
208    /// IgnoreEmpty specifies that the validation rules of this field should be
209    /// evaluated only if the field is not empty
210    #[prost(bool, optional, tag = "8")]
211    pub ignore_empty: ::core::option::Option<bool>,
212}
213/// UInt32Rules describes the constraints applied to `uint32` values
214#[derive(Clone, PartialEq, ::prost::Message)]
215pub struct UInt32Rules {
216    /// Const specifies that this field must be exactly the specified value
217    #[prost(uint32, optional, tag = "1")]
218    pub r#const: ::core::option::Option<u32>,
219    /// Lt specifies that this field must be less than the specified value,
220    /// exclusive
221    #[prost(uint32, optional, tag = "2")]
222    pub lt: ::core::option::Option<u32>,
223    /// Lte specifies that this field must be less than or equal to the
224    /// specified value, inclusive
225    #[prost(uint32, optional, tag = "3")]
226    pub lte: ::core::option::Option<u32>,
227    /// Gt specifies that this field must be greater than the specified value,
228    /// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
229    /// range is reversed.
230    #[prost(uint32, optional, tag = "4")]
231    pub gt: ::core::option::Option<u32>,
232    /// Gte specifies that this field must be greater than or equal to the
233    /// specified value, inclusive. If the value of Gte is larger than a
234    /// specified Lt or Lte, the range is reversed.
235    #[prost(uint32, optional, tag = "5")]
236    pub gte: ::core::option::Option<u32>,
237    /// In specifies that this field must be equal to one of the specified
238    /// values
239    #[prost(uint32, repeated, packed = "false", tag = "6")]
240    pub r#in: ::prost::alloc::vec::Vec<u32>,
241    /// NotIn specifies that this field cannot be equal to one of the specified
242    /// values
243    #[prost(uint32, repeated, packed = "false", tag = "7")]
244    pub not_in: ::prost::alloc::vec::Vec<u32>,
245    /// IgnoreEmpty specifies that the validation rules of this field should be
246    /// evaluated only if the field is not empty
247    #[prost(bool, optional, tag = "8")]
248    pub ignore_empty: ::core::option::Option<bool>,
249}
250/// UInt64Rules describes the constraints applied to `uint64` values
251#[derive(Clone, PartialEq, ::prost::Message)]
252pub struct UInt64Rules {
253    /// Const specifies that this field must be exactly the specified value
254    #[prost(uint64, optional, tag = "1")]
255    pub r#const: ::core::option::Option<u64>,
256    /// Lt specifies that this field must be less than the specified value,
257    /// exclusive
258    #[prost(uint64, optional, tag = "2")]
259    pub lt: ::core::option::Option<u64>,
260    /// Lte specifies that this field must be less than or equal to the
261    /// specified value, inclusive
262    #[prost(uint64, optional, tag = "3")]
263    pub lte: ::core::option::Option<u64>,
264    /// Gt specifies that this field must be greater than the specified value,
265    /// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
266    /// range is reversed.
267    #[prost(uint64, optional, tag = "4")]
268    pub gt: ::core::option::Option<u64>,
269    /// Gte specifies that this field must be greater than or equal to the
270    /// specified value, inclusive. If the value of Gte is larger than a
271    /// specified Lt or Lte, the range is reversed.
272    #[prost(uint64, optional, tag = "5")]
273    pub gte: ::core::option::Option<u64>,
274    /// In specifies that this field must be equal to one of the specified
275    /// values
276    #[prost(uint64, repeated, packed = "false", tag = "6")]
277    pub r#in: ::prost::alloc::vec::Vec<u64>,
278    /// NotIn specifies that this field cannot be equal to one of the specified
279    /// values
280    #[prost(uint64, repeated, packed = "false", tag = "7")]
281    pub not_in: ::prost::alloc::vec::Vec<u64>,
282    /// IgnoreEmpty specifies that the validation rules of this field should be
283    /// evaluated only if the field is not empty
284    #[prost(bool, optional, tag = "8")]
285    pub ignore_empty: ::core::option::Option<bool>,
286}
287/// SInt32Rules describes the constraints applied to `sint32` values
288#[derive(Clone, PartialEq, ::prost::Message)]
289pub struct SInt32Rules {
290    /// Const specifies that this field must be exactly the specified value
291    #[prost(sint32, optional, tag = "1")]
292    pub r#const: ::core::option::Option<i32>,
293    /// Lt specifies that this field must be less than the specified value,
294    /// exclusive
295    #[prost(sint32, optional, tag = "2")]
296    pub lt: ::core::option::Option<i32>,
297    /// Lte specifies that this field must be less than or equal to the
298    /// specified value, inclusive
299    #[prost(sint32, optional, tag = "3")]
300    pub lte: ::core::option::Option<i32>,
301    /// Gt specifies that this field must be greater than the specified value,
302    /// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
303    /// range is reversed.
304    #[prost(sint32, optional, tag = "4")]
305    pub gt: ::core::option::Option<i32>,
306    /// Gte specifies that this field must be greater than or equal to the
307    /// specified value, inclusive. If the value of Gte is larger than a
308    /// specified Lt or Lte, the range is reversed.
309    #[prost(sint32, optional, tag = "5")]
310    pub gte: ::core::option::Option<i32>,
311    /// In specifies that this field must be equal to one of the specified
312    /// values
313    #[prost(sint32, repeated, packed = "false", tag = "6")]
314    pub r#in: ::prost::alloc::vec::Vec<i32>,
315    /// NotIn specifies that this field cannot be equal to one of the specified
316    /// values
317    #[prost(sint32, repeated, packed = "false", tag = "7")]
318    pub not_in: ::prost::alloc::vec::Vec<i32>,
319    /// IgnoreEmpty specifies that the validation rules of this field should be
320    /// evaluated only if the field is not empty
321    #[prost(bool, optional, tag = "8")]
322    pub ignore_empty: ::core::option::Option<bool>,
323}
324/// SInt64Rules describes the constraints applied to `sint64` values
325#[derive(Clone, PartialEq, ::prost::Message)]
326pub struct SInt64Rules {
327    /// Const specifies that this field must be exactly the specified value
328    #[prost(sint64, optional, tag = "1")]
329    pub r#const: ::core::option::Option<i64>,
330    /// Lt specifies that this field must be less than the specified value,
331    /// exclusive
332    #[prost(sint64, optional, tag = "2")]
333    pub lt: ::core::option::Option<i64>,
334    /// Lte specifies that this field must be less than or equal to the
335    /// specified value, inclusive
336    #[prost(sint64, optional, tag = "3")]
337    pub lte: ::core::option::Option<i64>,
338    /// Gt specifies that this field must be greater than the specified value,
339    /// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
340    /// range is reversed.
341    #[prost(sint64, optional, tag = "4")]
342    pub gt: ::core::option::Option<i64>,
343    /// Gte specifies that this field must be greater than or equal to the
344    /// specified value, inclusive. If the value of Gte is larger than a
345    /// specified Lt or Lte, the range is reversed.
346    #[prost(sint64, optional, tag = "5")]
347    pub gte: ::core::option::Option<i64>,
348    /// In specifies that this field must be equal to one of the specified
349    /// values
350    #[prost(sint64, repeated, packed = "false", tag = "6")]
351    pub r#in: ::prost::alloc::vec::Vec<i64>,
352    /// NotIn specifies that this field cannot be equal to one of the specified
353    /// values
354    #[prost(sint64, repeated, packed = "false", tag = "7")]
355    pub not_in: ::prost::alloc::vec::Vec<i64>,
356    /// IgnoreEmpty specifies that the validation rules of this field should be
357    /// evaluated only if the field is not empty
358    #[prost(bool, optional, tag = "8")]
359    pub ignore_empty: ::core::option::Option<bool>,
360}
361/// Fixed32Rules describes the constraints applied to `fixed32` values
362#[derive(Clone, PartialEq, ::prost::Message)]
363pub struct Fixed32Rules {
364    /// Const specifies that this field must be exactly the specified value
365    #[prost(fixed32, optional, tag = "1")]
366    pub r#const: ::core::option::Option<u32>,
367    /// Lt specifies that this field must be less than the specified value,
368    /// exclusive
369    #[prost(fixed32, optional, tag = "2")]
370    pub lt: ::core::option::Option<u32>,
371    /// Lte specifies that this field must be less than or equal to the
372    /// specified value, inclusive
373    #[prost(fixed32, optional, tag = "3")]
374    pub lte: ::core::option::Option<u32>,
375    /// Gt specifies that this field must be greater than the specified value,
376    /// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
377    /// range is reversed.
378    #[prost(fixed32, optional, tag = "4")]
379    pub gt: ::core::option::Option<u32>,
380    /// Gte specifies that this field must be greater than or equal to the
381    /// specified value, inclusive. If the value of Gte is larger than a
382    /// specified Lt or Lte, the range is reversed.
383    #[prost(fixed32, optional, tag = "5")]
384    pub gte: ::core::option::Option<u32>,
385    /// In specifies that this field must be equal to one of the specified
386    /// values
387    #[prost(fixed32, repeated, packed = "false", tag = "6")]
388    pub r#in: ::prost::alloc::vec::Vec<u32>,
389    /// NotIn specifies that this field cannot be equal to one of the specified
390    /// values
391    #[prost(fixed32, repeated, packed = "false", tag = "7")]
392    pub not_in: ::prost::alloc::vec::Vec<u32>,
393    /// IgnoreEmpty specifies that the validation rules of this field should be
394    /// evaluated only if the field is not empty
395    #[prost(bool, optional, tag = "8")]
396    pub ignore_empty: ::core::option::Option<bool>,
397}
398/// Fixed64Rules describes the constraints applied to `fixed64` values
399#[derive(Clone, PartialEq, ::prost::Message)]
400pub struct Fixed64Rules {
401    /// Const specifies that this field must be exactly the specified value
402    #[prost(fixed64, optional, tag = "1")]
403    pub r#const: ::core::option::Option<u64>,
404    /// Lt specifies that this field must be less than the specified value,
405    /// exclusive
406    #[prost(fixed64, optional, tag = "2")]
407    pub lt: ::core::option::Option<u64>,
408    /// Lte specifies that this field must be less than or equal to the
409    /// specified value, inclusive
410    #[prost(fixed64, optional, tag = "3")]
411    pub lte: ::core::option::Option<u64>,
412    /// Gt specifies that this field must be greater than the specified value,
413    /// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
414    /// range is reversed.
415    #[prost(fixed64, optional, tag = "4")]
416    pub gt: ::core::option::Option<u64>,
417    /// Gte specifies that this field must be greater than or equal to the
418    /// specified value, inclusive. If the value of Gte is larger than a
419    /// specified Lt or Lte, the range is reversed.
420    #[prost(fixed64, optional, tag = "5")]
421    pub gte: ::core::option::Option<u64>,
422    /// In specifies that this field must be equal to one of the specified
423    /// values
424    #[prost(fixed64, repeated, packed = "false", tag = "6")]
425    pub r#in: ::prost::alloc::vec::Vec<u64>,
426    /// NotIn specifies that this field cannot be equal to one of the specified
427    /// values
428    #[prost(fixed64, repeated, packed = "false", tag = "7")]
429    pub not_in: ::prost::alloc::vec::Vec<u64>,
430    /// IgnoreEmpty specifies that the validation rules of this field should be
431    /// evaluated only if the field is not empty
432    #[prost(bool, optional, tag = "8")]
433    pub ignore_empty: ::core::option::Option<bool>,
434}
435/// SFixed32Rules describes the constraints applied to `sfixed32` values
436#[derive(Clone, PartialEq, ::prost::Message)]
437pub struct SFixed32Rules {
438    /// Const specifies that this field must be exactly the specified value
439    #[prost(sfixed32, optional, tag = "1")]
440    pub r#const: ::core::option::Option<i32>,
441    /// Lt specifies that this field must be less than the specified value,
442    /// exclusive
443    #[prost(sfixed32, optional, tag = "2")]
444    pub lt: ::core::option::Option<i32>,
445    /// Lte specifies that this field must be less than or equal to the
446    /// specified value, inclusive
447    #[prost(sfixed32, optional, tag = "3")]
448    pub lte: ::core::option::Option<i32>,
449    /// Gt specifies that this field must be greater than the specified value,
450    /// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
451    /// range is reversed.
452    #[prost(sfixed32, optional, tag = "4")]
453    pub gt: ::core::option::Option<i32>,
454    /// Gte specifies that this field must be greater than or equal to the
455    /// specified value, inclusive. If the value of Gte is larger than a
456    /// specified Lt or Lte, the range is reversed.
457    #[prost(sfixed32, optional, tag = "5")]
458    pub gte: ::core::option::Option<i32>,
459    /// In specifies that this field must be equal to one of the specified
460    /// values
461    #[prost(sfixed32, repeated, packed = "false", tag = "6")]
462    pub r#in: ::prost::alloc::vec::Vec<i32>,
463    /// NotIn specifies that this field cannot be equal to one of the specified
464    /// values
465    #[prost(sfixed32, repeated, packed = "false", tag = "7")]
466    pub not_in: ::prost::alloc::vec::Vec<i32>,
467    /// IgnoreEmpty specifies that the validation rules of this field should be
468    /// evaluated only if the field is not empty
469    #[prost(bool, optional, tag = "8")]
470    pub ignore_empty: ::core::option::Option<bool>,
471}
472/// SFixed64Rules describes the constraints applied to `sfixed64` values
473#[derive(Clone, PartialEq, ::prost::Message)]
474pub struct SFixed64Rules {
475    /// Const specifies that this field must be exactly the specified value
476    #[prost(sfixed64, optional, tag = "1")]
477    pub r#const: ::core::option::Option<i64>,
478    /// Lt specifies that this field must be less than the specified value,
479    /// exclusive
480    #[prost(sfixed64, optional, tag = "2")]
481    pub lt: ::core::option::Option<i64>,
482    /// Lte specifies that this field must be less than or equal to the
483    /// specified value, inclusive
484    #[prost(sfixed64, optional, tag = "3")]
485    pub lte: ::core::option::Option<i64>,
486    /// Gt specifies that this field must be greater than the specified value,
487    /// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
488    /// range is reversed.
489    #[prost(sfixed64, optional, tag = "4")]
490    pub gt: ::core::option::Option<i64>,
491    /// Gte specifies that this field must be greater than or equal to the
492    /// specified value, inclusive. If the value of Gte is larger than a
493    /// specified Lt or Lte, the range is reversed.
494    #[prost(sfixed64, optional, tag = "5")]
495    pub gte: ::core::option::Option<i64>,
496    /// In specifies that this field must be equal to one of the specified
497    /// values
498    #[prost(sfixed64, repeated, packed = "false", tag = "6")]
499    pub r#in: ::prost::alloc::vec::Vec<i64>,
500    /// NotIn specifies that this field cannot be equal to one of the specified
501    /// values
502    #[prost(sfixed64, repeated, packed = "false", tag = "7")]
503    pub not_in: ::prost::alloc::vec::Vec<i64>,
504    /// IgnoreEmpty specifies that the validation rules of this field should be
505    /// evaluated only if the field is not empty
506    #[prost(bool, optional, tag = "8")]
507    pub ignore_empty: ::core::option::Option<bool>,
508}
509/// BoolRules describes the constraints applied to `bool` values
510#[derive(Clone, Copy, PartialEq, ::prost::Message)]
511pub struct BoolRules {
512    /// Const specifies that this field must be exactly the specified value
513    #[prost(bool, optional, tag = "1")]
514    pub r#const: ::core::option::Option<bool>,
515}
516/// StringRules describe the constraints applied to `string` values
517#[derive(Clone, PartialEq, ::prost::Message)]
518pub struct StringRules {
519    /// Const specifies that this field must be exactly the specified value
520    #[prost(string, optional, tag = "1")]
521    pub r#const: ::core::option::Option<::prost::alloc::string::String>,
522    /// Len specifies that this field must be the specified number of
523    /// characters (Unicode code points). Note that the number of
524    /// characters may differ from the number of bytes in the string.
525    #[prost(uint64, optional, tag = "19")]
526    pub len: ::core::option::Option<u64>,
527    /// MinLen specifies that this field must be the specified number of
528    /// characters (Unicode code points) at a minimum. Note that the number of
529    /// characters may differ from the number of bytes in the string.
530    #[prost(uint64, optional, tag = "2")]
531    pub min_len: ::core::option::Option<u64>,
532    /// MaxLen specifies that this field must be the specified number of
533    /// characters (Unicode code points) at a maximum. Note that the number of
534    /// characters may differ from the number of bytes in the string.
535    #[prost(uint64, optional, tag = "3")]
536    pub max_len: ::core::option::Option<u64>,
537    /// LenBytes specifies that this field must be the specified number of bytes
538    #[prost(uint64, optional, tag = "20")]
539    pub len_bytes: ::core::option::Option<u64>,
540    /// MinBytes specifies that this field must be the specified number of bytes
541    /// at a minimum
542    #[prost(uint64, optional, tag = "4")]
543    pub min_bytes: ::core::option::Option<u64>,
544    /// MaxBytes specifies that this field must be the specified number of bytes
545    /// at a maximum
546    #[prost(uint64, optional, tag = "5")]
547    pub max_bytes: ::core::option::Option<u64>,
548    /// Pattern specifies that this field must match against the specified
549    /// regular expression (RE2 syntax). The included expression should elide
550    /// any delimiters.
551    #[prost(string, optional, tag = "6")]
552    pub pattern: ::core::option::Option<::prost::alloc::string::String>,
553    /// Prefix specifies that this field must have the specified substring at
554    /// the beginning of the string.
555    #[prost(string, optional, tag = "7")]
556    pub prefix: ::core::option::Option<::prost::alloc::string::String>,
557    /// Suffix specifies that this field must have the specified substring at
558    /// the end of the string.
559    #[prost(string, optional, tag = "8")]
560    pub suffix: ::core::option::Option<::prost::alloc::string::String>,
561    /// Contains specifies that this field must have the specified substring
562    /// anywhere in the string.
563    #[prost(string, optional, tag = "9")]
564    pub contains: ::core::option::Option<::prost::alloc::string::String>,
565    /// NotContains specifies that this field cannot have the specified substring
566    /// anywhere in the string.
567    #[prost(string, optional, tag = "23")]
568    pub not_contains: ::core::option::Option<::prost::alloc::string::String>,
569    /// In specifies that this field must be equal to one of the specified
570    /// values
571    #[prost(string, repeated, tag = "10")]
572    pub r#in: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
573    /// NotIn specifies that this field cannot be equal to one of the specified
574    /// values
575    #[prost(string, repeated, tag = "11")]
576    pub not_in: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
577    /// This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable
578    /// strict header validation.
579    /// By default, this is true, and HTTP header validations are RFC-compliant.
580    /// Setting to false will enable a looser validations that only disallows
581    /// \r\n\0 characters, which can be used to bypass header matching rules.
582    #[prost(bool, optional, tag = "25", default = "true")]
583    pub strict: ::core::option::Option<bool>,
584    /// IgnoreEmpty specifies that the validation rules of this field should be
585    /// evaluated only if the field is not empty
586    #[prost(bool, optional, tag = "26")]
587    pub ignore_empty: ::core::option::Option<bool>,
588    /// WellKnown rules provide advanced constraints against common string
589    /// patterns
590    #[prost(
591        oneof = "string_rules::WellKnown",
592        tags = "12, 13, 14, 15, 16, 17, 18, 21, 22, 24"
593    )]
594    pub well_known: ::core::option::Option<string_rules::WellKnown>,
595}
596/// Nested message and enum types in `StringRules`.
597pub mod string_rules {
598    /// WellKnown rules provide advanced constraints against common string
599    /// patterns
600    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
601    pub enum WellKnown {
602        /// Email specifies that the field must be a valid email address as
603        /// defined by RFC 5322
604        #[prost(bool, tag = "12")]
605        Email(bool),
606        /// Hostname specifies that the field must be a valid hostname as
607        /// defined by RFC 1034. This constraint does not support
608        /// internationalized domain names (IDNs).
609        #[prost(bool, tag = "13")]
610        Hostname(bool),
611        /// Ip specifies that the field must be a valid IP (v4 or v6) address.
612        /// Valid IPv6 addresses should not include surrounding square brackets.
613        #[prost(bool, tag = "14")]
614        Ip(bool),
615        /// Ipv4 specifies that the field must be a valid IPv4 address.
616        #[prost(bool, tag = "15")]
617        Ipv4(bool),
618        /// Ipv6 specifies that the field must be a valid IPv6 address. Valid
619        /// IPv6 addresses should not include surrounding square brackets.
620        #[prost(bool, tag = "16")]
621        Ipv6(bool),
622        /// Uri specifies that the field must be a valid, absolute URI as defined
623        /// by RFC 3986
624        #[prost(bool, tag = "17")]
625        Uri(bool),
626        /// UriRef specifies that the field must be a valid URI as defined by RFC
627        /// 3986 and may be relative or absolute.
628        #[prost(bool, tag = "18")]
629        UriRef(bool),
630        /// Address specifies that the field must be either a valid hostname as
631        /// defined by RFC 1034 (which does not support internationalized domain
632        /// names or IDNs), or it can be a valid IP (v4 or v6).
633        #[prost(bool, tag = "21")]
634        Address(bool),
635        /// Uuid specifies that the field must be a valid UUID as defined by
636        /// RFC 4122
637        #[prost(bool, tag = "22")]
638        Uuid(bool),
639        /// WellKnownRegex specifies a common well known pattern defined as a regex.
640        #[prost(enumeration = "super::KnownRegex", tag = "24")]
641        WellKnownRegex(i32),
642    }
643}
644/// BytesRules describe the constraints applied to `bytes` values
645#[derive(Clone, PartialEq, ::prost::Message)]
646pub struct BytesRules {
647    /// Const specifies that this field must be exactly the specified value
648    #[prost(bytes = "vec", optional, tag = "1")]
649    pub r#const: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
650    /// Len specifies that this field must be the specified number of bytes
651    #[prost(uint64, optional, tag = "13")]
652    pub len: ::core::option::Option<u64>,
653    /// MinLen specifies that this field must be the specified number of bytes
654    /// at a minimum
655    #[prost(uint64, optional, tag = "2")]
656    pub min_len: ::core::option::Option<u64>,
657    /// MaxLen specifies that this field must be the specified number of bytes
658    /// at a maximum
659    #[prost(uint64, optional, tag = "3")]
660    pub max_len: ::core::option::Option<u64>,
661    /// Pattern specifies that this field must match against the specified
662    /// regular expression (RE2 syntax). The included expression should elide
663    /// any delimiters.
664    #[prost(string, optional, tag = "4")]
665    pub pattern: ::core::option::Option<::prost::alloc::string::String>,
666    /// Prefix specifies that this field must have the specified bytes at the
667    /// beginning of the string.
668    #[prost(bytes = "vec", optional, tag = "5")]
669    pub prefix: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
670    /// Suffix specifies that this field must have the specified bytes at the
671    /// end of the string.
672    #[prost(bytes = "vec", optional, tag = "6")]
673    pub suffix: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
674    /// Contains specifies that this field must have the specified bytes
675    /// anywhere in the string.
676    #[prost(bytes = "vec", optional, tag = "7")]
677    pub contains: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
678    /// In specifies that this field must be equal to one of the specified
679    /// values
680    #[prost(bytes = "vec", repeated, tag = "8")]
681    pub r#in: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
682    /// NotIn specifies that this field cannot be equal to one of the specified
683    /// values
684    #[prost(bytes = "vec", repeated, tag = "9")]
685    pub not_in: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
686    /// IgnoreEmpty specifies that the validation rules of this field should be
687    /// evaluated only if the field is not empty
688    #[prost(bool, optional, tag = "14")]
689    pub ignore_empty: ::core::option::Option<bool>,
690    /// WellKnown rules provide advanced constraints against common byte
691    /// patterns
692    #[prost(oneof = "bytes_rules::WellKnown", tags = "10, 11, 12")]
693    pub well_known: ::core::option::Option<bytes_rules::WellKnown>,
694}
695/// Nested message and enum types in `BytesRules`.
696pub mod bytes_rules {
697    /// WellKnown rules provide advanced constraints against common byte
698    /// patterns
699    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
700    pub enum WellKnown {
701        /// Ip specifies that the field must be a valid IP (v4 or v6) address in
702        /// byte format
703        #[prost(bool, tag = "10")]
704        Ip(bool),
705        /// Ipv4 specifies that the field must be a valid IPv4 address in byte
706        /// format
707        #[prost(bool, tag = "11")]
708        Ipv4(bool),
709        /// Ipv6 specifies that the field must be a valid IPv6 address in byte
710        /// format
711        #[prost(bool, tag = "12")]
712        Ipv6(bool),
713    }
714}
715/// EnumRules describe the constraints applied to enum values
716#[derive(Clone, PartialEq, ::prost::Message)]
717pub struct EnumRules {
718    /// Const specifies that this field must be exactly the specified value
719    #[prost(int32, optional, tag = "1")]
720    pub r#const: ::core::option::Option<i32>,
721    /// DefinedOnly specifies that this field must be only one of the defined
722    /// values for this enum, failing on any undefined value.
723    #[prost(bool, optional, tag = "2")]
724    pub defined_only: ::core::option::Option<bool>,
725    /// In specifies that this field must be equal to one of the specified
726    /// values
727    #[prost(int32, repeated, packed = "false", tag = "3")]
728    pub r#in: ::prost::alloc::vec::Vec<i32>,
729    /// NotIn specifies that this field cannot be equal to one of the specified
730    /// values
731    #[prost(int32, repeated, packed = "false", tag = "4")]
732    pub not_in: ::prost::alloc::vec::Vec<i32>,
733}
734/// MessageRules describe the constraints applied to embedded message values.
735/// For message-type fields, validation is performed recursively.
736#[derive(Clone, Copy, PartialEq, ::prost::Message)]
737pub struct MessageRules {
738    /// Skip specifies that the validation rules of this field should not be
739    /// evaluated
740    #[prost(bool, optional, tag = "1")]
741    pub skip: ::core::option::Option<bool>,
742    /// Required specifies that this field must be set
743    #[prost(bool, optional, tag = "2")]
744    pub required: ::core::option::Option<bool>,
745}
746/// RepeatedRules describe the constraints applied to `repeated` values
747#[derive(Clone, PartialEq, ::prost::Message)]
748pub struct RepeatedRules {
749    /// MinItems specifies that this field must have the specified number of
750    /// items at a minimum
751    #[prost(uint64, optional, tag = "1")]
752    pub min_items: ::core::option::Option<u64>,
753    /// MaxItems specifies that this field must have the specified number of
754    /// items at a maximum
755    #[prost(uint64, optional, tag = "2")]
756    pub max_items: ::core::option::Option<u64>,
757    /// Unique specifies that all elements in this field must be unique. This
758    /// constraint is only applicable to scalar and enum types (messages are not
759    /// supported).
760    #[prost(bool, optional, tag = "3")]
761    pub unique: ::core::option::Option<bool>,
762    /// Items specifies the constraints to be applied to each item in the field.
763    /// Repeated message fields will still execute validation against each item
764    /// unless skip is specified here.
765    #[prost(message, optional, boxed, tag = "4")]
766    pub items: ::core::option::Option<::prost::alloc::boxed::Box<FieldRules>>,
767    /// IgnoreEmpty specifies that the validation rules of this field should be
768    /// evaluated only if the field is not empty
769    #[prost(bool, optional, tag = "5")]
770    pub ignore_empty: ::core::option::Option<bool>,
771}
772/// MapRules describe the constraints applied to `map` values
773#[derive(Clone, PartialEq, ::prost::Message)]
774pub struct MapRules {
775    /// MinPairs specifies that this field must have the specified number of
776    /// KVs at a minimum
777    #[prost(uint64, optional, tag = "1")]
778    pub min_pairs: ::core::option::Option<u64>,
779    /// MaxPairs specifies that this field must have the specified number of
780    /// KVs at a maximum
781    #[prost(uint64, optional, tag = "2")]
782    pub max_pairs: ::core::option::Option<u64>,
783    /// NoSparse specifies values in this field cannot be unset. This only
784    /// applies to map's with message value types.
785    #[prost(bool, optional, tag = "3")]
786    pub no_sparse: ::core::option::Option<bool>,
787    /// Keys specifies the constraints to be applied to each key in the field.
788    #[prost(message, optional, boxed, tag = "4")]
789    pub keys: ::core::option::Option<::prost::alloc::boxed::Box<FieldRules>>,
790    /// Values specifies the constraints to be applied to the value of each key
791    /// in the field. Message values will still have their validations evaluated
792    /// unless skip is specified here.
793    #[prost(message, optional, boxed, tag = "5")]
794    pub values: ::core::option::Option<::prost::alloc::boxed::Box<FieldRules>>,
795    /// IgnoreEmpty specifies that the validation rules of this field should be
796    /// evaluated only if the field is not empty
797    #[prost(bool, optional, tag = "6")]
798    pub ignore_empty: ::core::option::Option<bool>,
799}
800/// AnyRules describe constraints applied exclusively to the
801/// `google.protobuf.Any` well-known type
802#[derive(Clone, PartialEq, ::prost::Message)]
803pub struct AnyRules {
804    /// Required specifies that this field must be set
805    #[prost(bool, optional, tag = "1")]
806    pub required: ::core::option::Option<bool>,
807    /// In specifies that this field's `type_url` must be equal to one of the
808    /// specified values.
809    #[prost(string, repeated, tag = "2")]
810    pub r#in: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
811    /// NotIn specifies that this field's `type_url` must not be equal to any of
812    /// the specified values.
813    #[prost(string, repeated, tag = "3")]
814    pub not_in: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
815}
816/// DurationRules describe the constraints applied exclusively to the
817/// `google.protobuf.Duration` well-known type
818#[derive(Clone, PartialEq, ::prost::Message)]
819pub struct DurationRules {
820    /// Required specifies that this field must be set
821    #[prost(bool, optional, tag = "1")]
822    pub required: ::core::option::Option<bool>,
823    /// Const specifies that this field must be exactly the specified value
824    #[prost(message, optional, tag = "2")]
825    pub r#const: ::core::option::Option<super::google::protobuf::Duration>,
826    /// Lt specifies that this field must be less than the specified value,
827    /// exclusive
828    #[prost(message, optional, tag = "3")]
829    pub lt: ::core::option::Option<super::google::protobuf::Duration>,
830    /// Lt specifies that this field must be less than the specified value,
831    /// inclusive
832    #[prost(message, optional, tag = "4")]
833    pub lte: ::core::option::Option<super::google::protobuf::Duration>,
834    /// Gt specifies that this field must be greater than the specified value,
835    /// exclusive
836    #[prost(message, optional, tag = "5")]
837    pub gt: ::core::option::Option<super::google::protobuf::Duration>,
838    /// Gte specifies that this field must be greater than the specified value,
839    /// inclusive
840    #[prost(message, optional, tag = "6")]
841    pub gte: ::core::option::Option<super::google::protobuf::Duration>,
842    /// In specifies that this field must be equal to one of the specified
843    /// values
844    #[prost(message, repeated, tag = "7")]
845    pub r#in: ::prost::alloc::vec::Vec<super::google::protobuf::Duration>,
846    /// NotIn specifies that this field cannot be equal to one of the specified
847    /// values
848    #[prost(message, repeated, tag = "8")]
849    pub not_in: ::prost::alloc::vec::Vec<super::google::protobuf::Duration>,
850}
851/// TimestampRules describe the constraints applied exclusively to the
852/// `google.protobuf.Timestamp` well-known type
853#[derive(Clone, Copy, PartialEq, ::prost::Message)]
854pub struct TimestampRules {
855    /// Required specifies that this field must be set
856    #[prost(bool, optional, tag = "1")]
857    pub required: ::core::option::Option<bool>,
858    /// Const specifies that this field must be exactly the specified value
859    #[prost(message, optional, tag = "2")]
860    pub r#const: ::core::option::Option<super::google::protobuf::Timestamp>,
861    /// Lt specifies that this field must be less than the specified value,
862    /// exclusive
863    #[prost(message, optional, tag = "3")]
864    pub lt: ::core::option::Option<super::google::protobuf::Timestamp>,
865    /// Lte specifies that this field must be less than the specified value,
866    /// inclusive
867    #[prost(message, optional, tag = "4")]
868    pub lte: ::core::option::Option<super::google::protobuf::Timestamp>,
869    /// Gt specifies that this field must be greater than the specified value,
870    /// exclusive
871    #[prost(message, optional, tag = "5")]
872    pub gt: ::core::option::Option<super::google::protobuf::Timestamp>,
873    /// Gte specifies that this field must be greater than the specified value,
874    /// inclusive
875    #[prost(message, optional, tag = "6")]
876    pub gte: ::core::option::Option<super::google::protobuf::Timestamp>,
877    /// LtNow specifies that this must be less than the current time. LtNow
878    /// can only be used with the Within rule.
879    #[prost(bool, optional, tag = "7")]
880    pub lt_now: ::core::option::Option<bool>,
881    /// GtNow specifies that this must be greater than the current time. GtNow
882    /// can only be used with the Within rule.
883    #[prost(bool, optional, tag = "8")]
884    pub gt_now: ::core::option::Option<bool>,
885    /// Within specifies that this field must be within this duration of the
886    /// current time. This constraint can be used alone or with the LtNow and
887    /// GtNow rules.
888    #[prost(message, optional, tag = "9")]
889    pub within: ::core::option::Option<super::google::protobuf::Duration>,
890}
891/// WellKnownRegex contain some well-known patterns.
892#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
893#[repr(i32)]
894pub enum KnownRegex {
895    Unknown = 0,
896    /// HTTP header name as defined by RFC 7230.
897    HttpHeaderName = 1,
898    /// HTTP header value as defined by RFC 7230.
899    HttpHeaderValue = 2,
900}
901impl KnownRegex {
902    /// String value of the enum field names used in the ProtoBuf definition.
903    ///
904    /// The values are not transformed in any way and thus are considered stable
905    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
906    pub fn as_str_name(&self) -> &'static str {
907        match self {
908            Self::Unknown => "UNKNOWN",
909            Self::HttpHeaderName => "HTTP_HEADER_NAME",
910            Self::HttpHeaderValue => "HTTP_HEADER_VALUE",
911        }
912    }
913    /// Creates an enum from field names used in the ProtoBuf definition.
914    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
915        match value {
916            "UNKNOWN" => Some(Self::Unknown),
917            "HTTP_HEADER_NAME" => Some(Self::HttpHeaderName),
918            "HTTP_HEADER_VALUE" => Some(Self::HttpHeaderValue),
919            _ => None,
920        }
921    }
922}