File size: 9,356 Bytes
4c921aa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
// Original file: proto/protoc-gen-validate/validate/validate.proto

import type { KnownRegex as _validate_KnownRegex, KnownRegex__Output as _validate_KnownRegex__Output } from '../validate/KnownRegex';
import type { Long } from '@grpc/proto-loader';

/**
 * StringRules describe the constraints applied to `string` values
 */
export interface StringRules {
  /**
   * Const specifies that this field must be exactly the specified value
   */
  'const'?: (string);
  /**
   * MinLen specifies that this field must be the specified number of
   * characters (Unicode code points) at a minimum. Note that the number of
   * characters may differ from the number of bytes in the string.
   */
  'min_len'?: (number | string | Long);
  /**
   * MaxLen specifies that this field must be the specified number of
   * characters (Unicode code points) at a maximum. Note that the number of
   * characters may differ from the number of bytes in the string.
   */
  'max_len'?: (number | string | Long);
  /**
   * MinBytes specifies that this field must be the specified number of bytes
   * at a minimum
   */
  'min_bytes'?: (number | string | Long);
  /**
   * MaxBytes specifies that this field must be the specified number of bytes
   * at a maximum
   */
  'max_bytes'?: (number | string | Long);
  /**
   * Pattern specifes that this field must match against the specified
   * regular expression (RE2 syntax). The included expression should elide
   * any delimiters.
   */
  'pattern'?: (string);
  /**
   * Prefix specifies that this field must have the specified substring at
   * the beginning of the string.
   */
  'prefix'?: (string);
  /**
   * Suffix specifies that this field must have the specified substring at
   * the end of the string.
   */
  'suffix'?: (string);
  /**
   * Contains specifies that this field must have the specified substring
   * anywhere in the string.
   */
  'contains'?: (string);
  /**
   * In specifies that this field must be equal to one of the specified
   * values
   */
  'in'?: (string)[];
  /**
   * NotIn specifies that this field cannot be equal to one of the specified
   * values
   */
  'not_in'?: (string)[];
  /**
   * Email specifies that the field must be a valid email address as
   * defined by RFC 5322
   */
  'email'?: (boolean);
  /**
   * Hostname specifies that the field must be a valid hostname as
   * defined by RFC 1034. This constraint does not support
   * internationalized domain names (IDNs).
   */
  'hostname'?: (boolean);
  /**
   * Ip specifies that the field must be a valid IP (v4 or v6) address.
   * Valid IPv6 addresses should not include surrounding square brackets.
   */
  'ip'?: (boolean);
  /**
   * Ipv4 specifies that the field must be a valid IPv4 address.
   */
  'ipv4'?: (boolean);
  /**
   * Ipv6 specifies that the field must be a valid IPv6 address. Valid
   * IPv6 addresses should not include surrounding square brackets.
   */
  'ipv6'?: (boolean);
  /**
   * Uri specifies that the field must be a valid, absolute URI as defined
   * by RFC 3986
   */
  'uri'?: (boolean);
  /**
   * UriRef specifies that the field must be a valid URI as defined by RFC
   * 3986 and may be relative or absolute.
   */
  'uri_ref'?: (boolean);
  /**
   * Len specifies that this field must be the specified number of
   * characters (Unicode code points). Note that the number of
   * characters may differ from the number of bytes in the string.
   */
  'len'?: (number | string | Long);
  /**
   * LenBytes specifies that this field must be the specified number of bytes
   * at a minimum
   */
  'len_bytes'?: (number | string | Long);
  /**
   * Address specifies that the field must be either a valid hostname as
   * defined by RFC 1034 (which does not support internationalized domain
   * names or IDNs), or it can be a valid IP (v4 or v6).
   */
  'address'?: (boolean);
  /**
   * Uuid specifies that the field must be a valid UUID as defined by
   * RFC 4122
   */
  'uuid'?: (boolean);
  /**
   * NotContains specifies that this field cannot have the specified substring
   * anywhere in the string.
   */
  'not_contains'?: (string);
  /**
   * WellKnownRegex specifies a common well known pattern defined as a regex.
   */
  'well_known_regex'?: (_validate_KnownRegex);
  /**
   * This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable
   * strict header validation.
   * By default, this is true, and HTTP header validations are RFC-compliant.
   * Setting to false will enable a looser validations that only disallows
   * \r\n\0 characters, which can be used to bypass header matching rules.
   */
  'strict'?: (boolean);
  /**
   * WellKnown rules provide advanced constraints against common string
   * patterns
   */
  'well_known'?: "email"|"hostname"|"ip"|"ipv4"|"ipv6"|"uri"|"uri_ref"|"address"|"uuid"|"well_known_regex";
}

/**
 * StringRules describe the constraints applied to `string` values
 */
export interface StringRules__Output {
  /**
   * Const specifies that this field must be exactly the specified value
   */
  'const': (string);
  /**
   * MinLen specifies that this field must be the specified number of
   * characters (Unicode code points) at a minimum. Note that the number of
   * characters may differ from the number of bytes in the string.
   */
  'min_len': (string);
  /**
   * MaxLen specifies that this field must be the specified number of
   * characters (Unicode code points) at a maximum. Note that the number of
   * characters may differ from the number of bytes in the string.
   */
  'max_len': (string);
  /**
   * MinBytes specifies that this field must be the specified number of bytes
   * at a minimum
   */
  'min_bytes': (string);
  /**
   * MaxBytes specifies that this field must be the specified number of bytes
   * at a maximum
   */
  'max_bytes': (string);
  /**
   * Pattern specifes that this field must match against the specified
   * regular expression (RE2 syntax). The included expression should elide
   * any delimiters.
   */
  'pattern': (string);
  /**
   * Prefix specifies that this field must have the specified substring at
   * the beginning of the string.
   */
  'prefix': (string);
  /**
   * Suffix specifies that this field must have the specified substring at
   * the end of the string.
   */
  'suffix': (string);
  /**
   * Contains specifies that this field must have the specified substring
   * anywhere in the string.
   */
  'contains': (string);
  /**
   * In specifies that this field must be equal to one of the specified
   * values
   */
  'in': (string)[];
  /**
   * NotIn specifies that this field cannot be equal to one of the specified
   * values
   */
  'not_in': (string)[];
  /**
   * Email specifies that the field must be a valid email address as
   * defined by RFC 5322
   */
  'email'?: (boolean);
  /**
   * Hostname specifies that the field must be a valid hostname as
   * defined by RFC 1034. This constraint does not support
   * internationalized domain names (IDNs).
   */
  'hostname'?: (boolean);
  /**
   * Ip specifies that the field must be a valid IP (v4 or v6) address.
   * Valid IPv6 addresses should not include surrounding square brackets.
   */
  'ip'?: (boolean);
  /**
   * Ipv4 specifies that the field must be a valid IPv4 address.
   */
  'ipv4'?: (boolean);
  /**
   * Ipv6 specifies that the field must be a valid IPv6 address. Valid
   * IPv6 addresses should not include surrounding square brackets.
   */
  'ipv6'?: (boolean);
  /**
   * Uri specifies that the field must be a valid, absolute URI as defined
   * by RFC 3986
   */
  'uri'?: (boolean);
  /**
   * UriRef specifies that the field must be a valid URI as defined by RFC
   * 3986 and may be relative or absolute.
   */
  'uri_ref'?: (boolean);
  /**
   * Len specifies that this field must be the specified number of
   * characters (Unicode code points). Note that the number of
   * characters may differ from the number of bytes in the string.
   */
  'len': (string);
  /**
   * LenBytes specifies that this field must be the specified number of bytes
   * at a minimum
   */
  'len_bytes': (string);
  /**
   * Address specifies that the field must be either a valid hostname as
   * defined by RFC 1034 (which does not support internationalized domain
   * names or IDNs), or it can be a valid IP (v4 or v6).
   */
  'address'?: (boolean);
  /**
   * Uuid specifies that the field must be a valid UUID as defined by
   * RFC 4122
   */
  'uuid'?: (boolean);
  /**
   * NotContains specifies that this field cannot have the specified substring
   * anywhere in the string.
   */
  'not_contains': (string);
  /**
   * WellKnownRegex specifies a common well known pattern defined as a regex.
   */
  'well_known_regex'?: (_validate_KnownRegex__Output);
  /**
   * This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable
   * strict header validation.
   * By default, this is true, and HTTP header validations are RFC-compliant.
   * Setting to false will enable a looser validations that only disallows
   * \r\n\0 characters, which can be used to bypass header matching rules.
   */
  'strict': (boolean);
  /**
   * WellKnown rules provide advanced constraints against common string
   * patterns
   */
  'well_known'?: "email"|"hostname"|"ip"|"ipv4"|"ipv6"|"uri"|"uri_ref"|"address"|"uuid"|"well_known_regex";
}