File size: 4,147 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
// Original file: proto/protoc-gen-validate/validate/validate.proto

import type { Long } from '@grpc/proto-loader';

/**
 * BytesRules describe the constraints applied to `bytes` values
 */
export interface BytesRules {
  /**
   * Const specifies that this field must be exactly the specified value
   */
  'const'?: (Buffer | Uint8Array | string);
  /**
   * MinLen specifies that this field must be the specified number of bytes
   * at a minimum
   */
  'min_len'?: (number | string | Long);
  /**
   * MaxLen specifies that this field must be the specified number of bytes
   * at a maximum
   */
  'max_len'?: (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 bytes at the
   * beginning of the string.
   */
  'prefix'?: (Buffer | Uint8Array | string);
  /**
   * Suffix specifies that this field must have the specified bytes at the
   * end of the string.
   */
  'suffix'?: (Buffer | Uint8Array | string);
  /**
   * Contains specifies that this field must have the specified bytes
   * anywhere in the string.
   */
  'contains'?: (Buffer | Uint8Array | string);
  /**
   * In specifies that this field must be equal to one of the specified
   * values
   */
  'in'?: (Buffer | Uint8Array | string)[];
  /**
   * NotIn specifies that this field cannot be equal to one of the specified
   * values
   */
  'not_in'?: (Buffer | Uint8Array | string)[];
  /**
   * Ip specifies that the field must be a valid IP (v4 or v6) address in
   * byte format
   */
  'ip'?: (boolean);
  /**
   * Ipv4 specifies that the field must be a valid IPv4 address in byte
   * format
   */
  'ipv4'?: (boolean);
  /**
   * Ipv6 specifies that the field must be a valid IPv6 address in byte
   * format
   */
  'ipv6'?: (boolean);
  /**
   * Len specifies that this field must be the specified number of bytes
   */
  'len'?: (number | string | Long);
  /**
   * WellKnown rules provide advanced constraints against common byte
   * patterns
   */
  'well_known'?: "ip"|"ipv4"|"ipv6";
}

/**
 * BytesRules describe the constraints applied to `bytes` values
 */
export interface BytesRules__Output {
  /**
   * Const specifies that this field must be exactly the specified value
   */
  'const': (Buffer);
  /**
   * MinLen specifies that this field must be the specified number of bytes
   * at a minimum
   */
  'min_len': (string);
  /**
   * MaxLen specifies that this field must be the specified number of bytes
   * at a maximum
   */
  'max_len': (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 bytes at the
   * beginning of the string.
   */
  'prefix': (Buffer);
  /**
   * Suffix specifies that this field must have the specified bytes at the
   * end of the string.
   */
  'suffix': (Buffer);
  /**
   * Contains specifies that this field must have the specified bytes
   * anywhere in the string.
   */
  'contains': (Buffer);
  /**
   * In specifies that this field must be equal to one of the specified
   * values
   */
  'in': (Buffer)[];
  /**
   * NotIn specifies that this field cannot be equal to one of the specified
   * values
   */
  'not_in': (Buffer)[];
  /**
   * Ip specifies that the field must be a valid IP (v4 or v6) address in
   * byte format
   */
  'ip'?: (boolean);
  /**
   * Ipv4 specifies that the field must be a valid IPv4 address in byte
   * format
   */
  'ipv4'?: (boolean);
  /**
   * Ipv6 specifies that the field must be a valid IPv6 address in byte
   * format
   */
  'ipv6'?: (boolean);
  /**
   * Len specifies that this field must be the specified number of bytes
   */
  'len': (string);
  /**
   * WellKnown rules provide advanced constraints against common byte
   * patterns
   */
  'well_known'?: "ip"|"ipv4"|"ipv6";
}