forked from bufbuild/protoc-gen-validate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
numbers.proto
175 lines (161 loc) · 12.9 KB
/
numbers.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
syntax = "proto3";
package tests.harness.cases;
option go_package = "github.com/envoyproxy/protoc-gen-validate/tests/harness/cases/go;cases";
import "validate/validate.proto";
message FloatNone { float val = 1; }
message FloatConst { float val = 1 [(validate.rules).float.const = 1.23]; }
message FloatIn { float val = 1 [(validate.rules).float = {in: [4.56, 7.89]}]; }
message FloatNotIn { float val = 1 [(validate.rules).float = {not_in: [0]}]; }
message FloatLT { float val = 1 [(validate.rules).float.lt = 0]; }
message FloatLTE { float val = 1 [(validate.rules).float.lte = 64]; }
message FloatGT { float val = 1 [(validate.rules).float.gt = 16]; }
message FloatGTE { float val = 1 [(validate.rules).float.gte = 8]; }
message FloatGTLT { float val = 1 [(validate.rules).float = {gt: 0, lt: 10}]; }
message FloatExLTGT { float val = 1 [(validate.rules).float = {lt: 0, gt: 10}]; }
message FloatGTELTE { float val = 1 [(validate.rules).float = {gte: 128, lte: 256}]; }
message FloatExGTELTE { float val = 1 [(validate.rules).float = {lte: 128, gte: 256}]; }
message FloatIgnore { float val = 1 [(validate.rules).float = {gte: 128, lte: 256, ignore_empty: true}]; }
message DoubleNone { double val = 1; }
message DoubleConst { double val = 1 [(validate.rules).double.const = 1.23]; }
message DoubleIn { double val = 1 [(validate.rules).double = {in: [4.56, 7.89]}]; }
message DoubleNotIn { double val = 1 [(validate.rules).double = {not_in: [0]}]; }
message DoubleLT { double val = 1 [(validate.rules).double.lt = 0]; }
message DoubleLTE { double val = 1 [(validate.rules).double.lte = 64]; }
message DoubleGT { double val = 1 [(validate.rules).double.gt = 16]; }
message DoubleGTE { double val = 1 [(validate.rules).double.gte = 8]; }
message DoubleGTLT { double val = 1 [(validate.rules).double = {gt: 0, lt: 10}]; }
message DoubleExLTGT { double val = 1 [(validate.rules).double = {lt: 0, gt: 10}]; }
message DoubleGTELTE { double val = 1 [(validate.rules).double = {gte: 128, lte: 256}]; }
message DoubleExGTELTE { double val = 1 [(validate.rules).double = {lte: 128, gte: 256}]; }
message DoubleIgnore { double val = 1 [(validate.rules).double = {lte: 128, gte: 256, ignore_empty: true}]; }
message Int32None { int32 val = 1; }
message Int32Const { int32 val = 1 [(validate.rules).int32.const = 1]; }
message Int32In { int32 val = 1 [(validate.rules).int32 = {in: [2, 3]}]; }
message Int32NotIn { int32 val = 1 [(validate.rules).int32 = {not_in: [0]}]; }
message Int32LT { int32 val = 1 [(validate.rules).int32.lt = 0]; }
message Int32LTE { int32 val = 1 [(validate.rules).int32.lte = 64]; }
message Int32GT { int32 val = 1 [(validate.rules).int32.gt = 16]; }
message Int32GTE { int32 val = 1 [(validate.rules).int32.gte = 8]; }
message Int32GTLT { int32 val = 1 [(validate.rules).int32 = {gt: 0, lt: 10}]; }
message Int32ExLTGT { int32 val = 1 [(validate.rules).int32 = {lt: 0, gt: 10}]; }
message Int32GTELTE { int32 val = 1 [(validate.rules).int32 = {gte: 128, lte: 256}]; }
message Int32ExGTELTE { int32 val = 1 [(validate.rules).int32 = {lte: 128, gte: 256}]; }
message Int32Ignore { int32 val = 1 [(validate.rules).int32 = {lte: 128, gte: 256, ignore_empty: true}]; }
message Int64None { int64 val = 1; }
message Int64Const { int64 val = 1 [(validate.rules).int64.const = 1]; }
message Int64In { int64 val = 1 [(validate.rules).int64 = {in: [2, 3]}]; }
message Int64NotIn { int64 val = 1 [(validate.rules).int64 = {not_in: [0]}]; }
message Int64LT { int64 val = 1 [(validate.rules).int64.lt = 0]; }
message Int64LTE { int64 val = 1 [(validate.rules).int64.lte = 64]; }
message Int64GT { int64 val = 1 [(validate.rules).int64.gt = 16]; }
message Int64GTE { int64 val = 1 [(validate.rules).int64.gte = 8]; }
message Int64GTLT { int64 val = 1 [(validate.rules).int64 = {gt: 0, lt: 10}]; }
message Int64ExLTGT { int64 val = 1 [(validate.rules).int64 = {lt: 0, gt: 10}]; }
message Int64GTELTE { int64 val = 1 [(validate.rules).int64 = {gte: 128, lte: 256}]; }
message Int64ExGTELTE { int64 val = 1 [(validate.rules).int64 = {lte: 128, gte: 256}]; }
message Int64Ignore { int64 val = 1 [(validate.rules).int64 = {lte: 128, gte: 256, ignore_empty: true}]; }
message UInt32None { uint32 val = 1; }
message UInt32Const { uint32 val = 1 [(validate.rules).uint32.const = 1]; }
message UInt32In { uint32 val = 1 [(validate.rules).uint32 = {in: [2, 3]}]; }
message UInt32NotIn { uint32 val = 1 [(validate.rules).uint32 = {not_in: [0]}]; }
message UInt32LT { uint32 val = 1 [(validate.rules).uint32.lt = 5]; }
message UInt32LTE { uint32 val = 1 [(validate.rules).uint32.lte = 64]; }
message UInt32GT { uint32 val = 1 [(validate.rules).uint32.gt = 16]; }
message UInt32GTE { uint32 val = 1 [(validate.rules).uint32.gte = 8]; }
message UInt32GTLT { uint32 val = 1 [(validate.rules).uint32 = {gt: 5, lt: 10}]; }
message UInt32ExLTGT { uint32 val = 1 [(validate.rules).uint32 = {lt: 5, gt: 10}]; }
message UInt32GTELTE { uint32 val = 1 [(validate.rules).uint32 = {gte: 128, lte: 256}]; }
message UInt32ExGTELTE { uint32 val = 1 [(validate.rules).uint32 = {lte: 128, gte: 256}]; }
message UInt32Ignore { uint32 val = 1 [(validate.rules).uint32 = {lte: 128, gte: 256, ignore_empty: true}]; }
message UInt64None { uint64 val = 1; }
message UInt64Const { uint64 val = 1 [(validate.rules).uint64.const = 1]; }
message UInt64In { uint64 val = 1 [(validate.rules).uint64 = {in: [2, 3]}]; }
message UInt64NotIn { uint64 val = 1 [(validate.rules).uint64 = {not_in: [0]}]; }
message UInt64LT { uint64 val = 1 [(validate.rules).uint64.lt = 5]; }
message UInt64LTE { uint64 val = 1 [(validate.rules).uint64.lte = 64]; }
message UInt64GT { uint64 val = 1 [(validate.rules).uint64.gt = 16]; }
message UInt64GTE { uint64 val = 1 [(validate.rules).uint64.gte = 8]; }
message UInt64GTLT { uint64 val = 1 [(validate.rules).uint64 = {gt: 5, lt: 10}]; }
message UInt64ExLTGT { uint64 val = 1 [(validate.rules).uint64 = {lt: 5, gt: 10}]; }
message UInt64GTELTE { uint64 val = 1 [(validate.rules).uint64 = {gte: 128, lte: 256}]; }
message UInt64ExGTELTE { uint64 val = 1 [(validate.rules).uint64 = {lte: 128, gte: 256}]; }
message UInt64Ignore { uint64 val = 1 [(validate.rules).uint64 = {lte: 128, gte: 256, ignore_empty: true}]; }
message SInt32None { sint32 val = 1; }
message SInt32Const { sint32 val = 1 [(validate.rules).sint32.const = 1]; }
message SInt32In { sint32 val = 1 [(validate.rules).sint32 = {in: [2, 3]}]; }
message SInt32NotIn { sint32 val = 1 [(validate.rules).sint32 = {not_in: [0]}]; }
message SInt32LT { sint32 val = 1 [(validate.rules).sint32.lt = 0]; }
message SInt32LTE { sint32 val = 1 [(validate.rules).sint32.lte = 64]; }
message SInt32GT { sint32 val = 1 [(validate.rules).sint32.gt = 16]; }
message SInt32GTE { sint32 val = 1 [(validate.rules).sint32.gte = 8]; }
message SInt32GTLT { sint32 val = 1 [(validate.rules).sint32 = {gt: 0, lt: 10}]; }
message SInt32ExLTGT { sint32 val = 1 [(validate.rules).sint32 = {lt: 0, gt: 10}]; }
message SInt32GTELTE { sint32 val = 1 [(validate.rules).sint32 = {gte: 128, lte: 256}]; }
message SInt32ExGTELTE { sint32 val = 1 [(validate.rules).sint32 = {lte: 128, gte: 256}]; }
message SInt32Ignore { sint32 val = 1 [(validate.rules).sint32 = {lte: 128, gte: 256, ignore_empty: true}]; }
message SInt64None { sint64 val = 1; }
message SInt64Const { sint64 val = 1 [(validate.rules).sint64.const = 1]; }
message SInt64In { sint64 val = 1 [(validate.rules).sint64 = {in: [2, 3]}]; }
message SInt64NotIn { sint64 val = 1 [(validate.rules).sint64 = {not_in: [0]}]; }
message SInt64LT { sint64 val = 1 [(validate.rules).sint64.lt = 0]; }
message SInt64LTE { sint64 val = 1 [(validate.rules).sint64.lte = 64]; }
message SInt64GT { sint64 val = 1 [(validate.rules).sint64.gt = 16]; }
message SInt64GTE { sint64 val = 1 [(validate.rules).sint64.gte = 8]; }
message SInt64GTLT { sint64 val = 1 [(validate.rules).sint64 = {gt: 0, lt: 10}]; }
message SInt64ExLTGT { sint64 val = 1 [(validate.rules).sint64 = {lt: 0, gt: 10}]; }
message SInt64GTELTE { sint64 val = 1 [(validate.rules).sint64 = {gte: 128, lte: 256}]; }
message SInt64ExGTELTE { sint64 val = 1 [(validate.rules).sint64 = {lte: 128, gte: 256}]; }
message SInt64Ignore { sint64 val = 1 [(validate.rules).sint64 = {lte: 128, gte: 256, ignore_empty: true}]; }
message Fixed32None { fixed32 val = 1; }
message Fixed32Const { fixed32 val = 1 [(validate.rules).fixed32.const = 1]; }
message Fixed32In { fixed32 val = 1 [(validate.rules).fixed32 = {in: [2, 3]}]; }
message Fixed32NotIn { fixed32 val = 1 [(validate.rules).fixed32 = {not_in: [0]}]; }
message Fixed32LT { fixed32 val = 1 [(validate.rules).fixed32.lt = 5]; }
message Fixed32LTE { fixed32 val = 1 [(validate.rules).fixed32.lte = 64]; }
message Fixed32GT { fixed32 val = 1 [(validate.rules).fixed32.gt = 16]; }
message Fixed32GTE { fixed32 val = 1 [(validate.rules).fixed32.gte = 8]; }
message Fixed32GTLT { fixed32 val = 1 [(validate.rules).fixed32 = {gt: 5, lt: 10}]; }
message Fixed32ExLTGT { fixed32 val = 1 [(validate.rules).fixed32 = {lt: 5, gt: 10}]; }
message Fixed32GTELTE { fixed32 val = 1 [(validate.rules).fixed32 = {gte: 128, lte: 256}]; }
message Fixed32ExGTELTE { fixed32 val = 1 [(validate.rules).fixed32 = {lte: 128, gte: 256}]; }
message Fixed32Ignore { fixed32 val = 1 [(validate.rules).fixed32 = {lte: 128, gte: 256, ignore_empty: true}]; }
message Fixed64None { fixed64 val = 1; }
message Fixed64Const { fixed64 val = 1 [(validate.rules).fixed64.const = 1]; }
message Fixed64In { fixed64 val = 1 [(validate.rules).fixed64 = {in: [2, 3]}]; }
message Fixed64NotIn { fixed64 val = 1 [(validate.rules).fixed64 = {not_in: [0]}]; }
message Fixed64LT { fixed64 val = 1 [(validate.rules).fixed64.lt = 5]; }
message Fixed64LTE { fixed64 val = 1 [(validate.rules).fixed64.lte = 64]; }
message Fixed64GT { fixed64 val = 1 [(validate.rules).fixed64.gt = 16]; }
message Fixed64GTE { fixed64 val = 1 [(validate.rules).fixed64.gte = 8]; }
message Fixed64GTLT { fixed64 val = 1 [(validate.rules).fixed64 = {gt: 5, lt: 10}]; }
message Fixed64ExLTGT { fixed64 val = 1 [(validate.rules).fixed64 = {lt: 5, gt: 10}]; }
message Fixed64GTELTE { fixed64 val = 1 [(validate.rules).fixed64 = {gte: 128, lte: 256}]; }
message Fixed64ExGTELTE { fixed64 val = 1 [(validate.rules).fixed64 = {lte: 128, gte: 256}]; }
message Fixed64Ignore { fixed64 val = 1 [(validate.rules).fixed64 = {lte: 128, gte: 256, ignore_empty: true}]; }
message SFixed32None { sfixed32 val = 1; }
message SFixed32Const { sfixed32 val = 1 [(validate.rules).sfixed32.const = 1]; }
message SFixed32In { sfixed32 val = 1 [(validate.rules).sfixed32 = {in: [2, 3]}]; }
message SFixed32NotIn { sfixed32 val = 1 [(validate.rules).sfixed32 = {not_in: [0]}]; }
message SFixed32LT { sfixed32 val = 1 [(validate.rules).sfixed32.lt = 0]; }
message SFixed32LTE { sfixed32 val = 1 [(validate.rules).sfixed32.lte = 64]; }
message SFixed32GT { sfixed32 val = 1 [(validate.rules).sfixed32.gt = 16]; }
message SFixed32GTE { sfixed32 val = 1 [(validate.rules).sfixed32.gte = 8]; }
message SFixed32GTLT { sfixed32 val = 1 [(validate.rules).sfixed32 = {gt: 0, lt: 10}]; }
message SFixed32ExLTGT { sfixed32 val = 1 [(validate.rules).sfixed32 = {lt: 0, gt: 10}]; }
message SFixed32GTELTE { sfixed32 val = 1 [(validate.rules).sfixed32 = {gte: 128, lte: 256}]; }
message SFixed32ExGTELTE { sfixed32 val = 1 [(validate.rules).sfixed32 = {lte: 128, gte: 256}]; }
message SFixed32Ignore { sfixed32 val = 1 [(validate.rules).sfixed32 = {lte: 128, gte: 256, ignore_empty: true}]; }
message SFixed64None { sfixed64 val = 1; }
message SFixed64Const { sfixed64 val = 1 [(validate.rules).sfixed64.const = 1]; }
message SFixed64In { sfixed64 val = 1 [(validate.rules).sfixed64 = {in: [2, 3]}]; }
message SFixed64NotIn { sfixed64 val = 1 [(validate.rules).sfixed64 = {not_in: [0]}]; }
message SFixed64LT { sfixed64 val = 1 [(validate.rules).sfixed64.lt = 0]; }
message SFixed64LTE { sfixed64 val = 1 [(validate.rules).sfixed64.lte = 64]; }
message SFixed64GT { sfixed64 val = 1 [(validate.rules).sfixed64.gt = 16]; }
message SFixed64GTE { sfixed64 val = 1 [(validate.rules).sfixed64.gte = 8]; }
message SFixed64GTLT { sfixed64 val = 1 [(validate.rules).sfixed64 = {gt: 0, lt: 10}]; }
message SFixed64ExLTGT { sfixed64 val = 1 [(validate.rules).sfixed64 = {lt: 0, gt: 10}]; }
message SFixed64GTELTE { sfixed64 val = 1 [(validate.rules).sfixed64 = {gte: 128, lte: 256}]; }
message SFixed64ExGTELTE { sfixed64 val = 1 [(validate.rules).sfixed64 = {lte: 128, gte: 256}]; }
message SFixed64Ignore { sfixed64 val = 1 [(validate.rules).sfixed64 = {lte: 128, gte: 256, ignore_empty: true}]; }
message Int64LTEOptional { optional int64 val = 1 [(validate.rules).int64.lte = 64]; }