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