@bufbuild/protobuf 0.0.1-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/README.md +6 -0
  2. package/dist/cjs/binary-encoding.js +434 -0
  3. package/dist/cjs/binary-format.js +2 -0
  4. package/dist/cjs/descriptor-registry.js +518 -0
  5. package/dist/cjs/descriptor-set.js +557 -0
  6. package/dist/cjs/enum.js +2 -0
  7. package/dist/cjs/field-list.js +2 -0
  8. package/dist/cjs/field.js +40 -0
  9. package/dist/cjs/google/protobuf/any_pb.js +280 -0
  10. package/dist/cjs/google/protobuf/api_pb.js +383 -0
  11. package/dist/cjs/google/protobuf/compiler/plugin_pb.js +334 -0
  12. package/dist/cjs/google/protobuf/descriptor_pb.js +2311 -0
  13. package/dist/cjs/google/protobuf/duration_pb.js +201 -0
  14. package/dist/cjs/google/protobuf/empty_pb.js +72 -0
  15. package/dist/cjs/google/protobuf/field_mask_pb.js +347 -0
  16. package/dist/cjs/google/protobuf/source_context_pb.js +74 -0
  17. package/dist/cjs/google/protobuf/struct_pb.js +288 -0
  18. package/dist/cjs/google/protobuf/timestamp_pb.js +271 -0
  19. package/dist/cjs/google/protobuf/type_pb.js +613 -0
  20. package/dist/cjs/google/protobuf/wrappers_pb.js +658 -0
  21. package/dist/cjs/google/varint.js +280 -0
  22. package/dist/cjs/index.js +148 -0
  23. package/dist/cjs/json-format.js +2 -0
  24. package/dist/cjs/message-type.js +2 -0
  25. package/dist/cjs/message.js +98 -0
  26. package/dist/cjs/private/assert.js +52 -0
  27. package/dist/cjs/private/base64.js +118 -0
  28. package/dist/cjs/private/binary-format-common.js +253 -0
  29. package/dist/cjs/private/binary-format-proto2.js +120 -0
  30. package/dist/cjs/private/binary-format-proto3.js +102 -0
  31. package/dist/cjs/private/enum.js +70 -0
  32. package/dist/cjs/private/field-list.js +62 -0
  33. package/dist/cjs/private/field-wrapper.js +25 -0
  34. package/dist/cjs/private/field.js +34 -0
  35. package/dist/cjs/private/json-format-common.js +482 -0
  36. package/dist/cjs/private/json-format-proto2.js +100 -0
  37. package/dist/cjs/private/json-format-proto3.js +103 -0
  38. package/dist/cjs/private/message-type.js +37 -0
  39. package/dist/cjs/private/names.js +101 -0
  40. package/dist/cjs/private/options-map.js +2 -0
  41. package/dist/cjs/private/proto-runtime.js +24 -0
  42. package/dist/cjs/private/scalars.js +138 -0
  43. package/dist/cjs/private/util-common.js +229 -0
  44. package/dist/cjs/private/util.js +2 -0
  45. package/dist/cjs/proto-int64.js +121 -0
  46. package/dist/cjs/proto2.js +86 -0
  47. package/dist/cjs/proto3.js +99 -0
  48. package/dist/cjs/service-type.js +43 -0
  49. package/dist/cjs/type-registry.js +42 -0
  50. package/dist/esm/binary-encoding.js +434 -0
  51. package/dist/esm/binary-format.js +1 -0
  52. package/dist/esm/descriptor-registry.js +521 -0
  53. package/dist/esm/descriptor-set.js +517 -0
  54. package/dist/esm/enum.js +1 -0
  55. package/dist/esm/field-list.js +1 -0
  56. package/dist/esm/field.js +37 -0
  57. package/dist/esm/google/protobuf/any_pb.js +276 -0
  58. package/dist/esm/google/protobuf/api_pb.js +350 -0
  59. package/dist/esm/google/protobuf/compiler/plugin_pb.js +318 -0
  60. package/dist/esm/google/protobuf/descriptor_pb.js +2213 -0
  61. package/dist/esm/google/protobuf/duration_pb.js +197 -0
  62. package/dist/esm/google/protobuf/empty_pb.js +68 -0
  63. package/dist/esm/google/protobuf/field_mask_pb.js +343 -0
  64. package/dist/esm/google/protobuf/source_context_pb.js +70 -0
  65. package/dist/esm/google/protobuf/struct_pb.js +282 -0
  66. package/dist/esm/google/protobuf/timestamp_pb.js +267 -0
  67. package/dist/esm/google/protobuf/type_pb.js +569 -0
  68. package/dist/esm/google/protobuf/wrappers_pb.js +574 -0
  69. package/dist/esm/google/varint.js +265 -0
  70. package/dist/esm/index.js +24 -0
  71. package/dist/esm/json-format.js +1 -0
  72. package/dist/esm/message-type.js +1 -0
  73. package/dist/esm/message.js +94 -0
  74. package/dist/esm/private/assert.js +41 -0
  75. package/dist/esm/private/base64.js +113 -0
  76. package/dist/esm/private/binary-format-common.js +243 -0
  77. package/dist/esm/private/binary-format-proto2.js +87 -0
  78. package/dist/esm/private/binary-format-proto3.js +74 -0
  79. package/dist/esm/private/enum.js +64 -0
  80. package/dist/esm/private/field-list.js +58 -0
  81. package/dist/esm/private/field-wrapper.js +20 -0
  82. package/dist/esm/private/field.js +27 -0
  83. package/dist/esm/private/json-format-common.js +473 -0
  84. package/dist/esm/private/json-format-proto2.js +90 -0
  85. package/dist/esm/private/json-format-proto3.js +89 -0
  86. package/dist/esm/private/message-type.js +33 -0
  87. package/dist/esm/private/names.js +90 -0
  88. package/dist/esm/private/options-map.js +1 -0
  89. package/dist/esm/private/proto-runtime.js +15 -0
  90. package/dist/esm/private/scalars.js +129 -0
  91. package/dist/esm/private/util-common.js +207 -0
  92. package/dist/esm/private/util.js +1 -0
  93. package/dist/esm/proto-int64.js +118 -0
  94. package/dist/esm/proto2.js +77 -0
  95. package/dist/esm/proto3.js +90 -0
  96. package/dist/esm/service-type.js +37 -0
  97. package/dist/esm/type-registry.js +38 -0
  98. package/dist/types/binary-encoding.d.ts +421 -0
  99. package/dist/types/binary-format.d.ts +109 -0
  100. package/dist/types/descriptor-registry.d.ts +42 -0
  101. package/dist/types/descriptor-set.d.ts +171 -0
  102. package/dist/types/enum.d.ts +31 -0
  103. package/dist/types/field-list.d.ts +27 -0
  104. package/dist/types/field.d.ts +295 -0
  105. package/dist/types/google/protobuf/any_pb.d.ts +167 -0
  106. package/dist/types/google/protobuf/api_pb.d.ts +296 -0
  107. package/dist/types/google/protobuf/compiler/plugin_pb.d.ts +294 -0
  108. package/dist/types/google/protobuf/descriptor_pb.d.ts +1959 -0
  109. package/dist/types/google/protobuf/duration_pb.d.ts +117 -0
  110. package/dist/types/google/protobuf/empty_pb.d.ts +44 -0
  111. package/dist/types/google/protobuf/field_mask_pb.d.ts +243 -0
  112. package/dist/types/google/protobuf/source_context_pb.d.ts +44 -0
  113. package/dist/types/google/protobuf/struct_pb.d.ts +205 -0
  114. package/dist/types/google/protobuf/timestamp_pb.d.ts +151 -0
  115. package/dist/types/google/protobuf/type_pb.d.ts +482 -0
  116. package/dist/types/google/protobuf/wrappers_pb.d.ts +379 -0
  117. package/dist/types/google/varint.d.ts +65 -0
  118. package/dist/types/index.d.ts +53 -0
  119. package/dist/types/json-format.d.ts +129 -0
  120. package/dist/types/message-type.d.ts +58 -0
  121. package/dist/types/message.d.ts +124 -0
  122. package/dist/types/private/assert.d.ts +19 -0
  123. package/dist/types/private/base64.d.ts +18 -0
  124. package/dist/types/private/binary-format-common.d.ts +38 -0
  125. package/dist/types/private/binary-format-proto2.d.ts +2 -0
  126. package/dist/types/private/binary-format-proto3.d.ts +2 -0
  127. package/dist/types/private/enum.d.ts +29 -0
  128. package/dist/types/private/field-list.d.ts +25 -0
  129. package/dist/types/private/field-wrapper.d.ts +27 -0
  130. package/dist/types/private/field.d.ts +15 -0
  131. package/dist/types/private/json-format-common.d.ts +30 -0
  132. package/dist/types/private/json-format-proto2.d.ts +2 -0
  133. package/dist/types/private/json-format-proto3.d.ts +2 -0
  134. package/dist/types/private/message-type.d.ts +15 -0
  135. package/dist/types/private/names.d.ts +19 -0
  136. package/dist/types/private/options-map.d.ts +7 -0
  137. package/dist/types/private/proto-runtime.d.ts +55 -0
  138. package/dist/types/private/scalars.d.ts +33 -0
  139. package/dist/types/private/util-common.d.ts +5 -0
  140. package/dist/types/private/util.d.ts +55 -0
  141. package/dist/types/proto-int64.d.ts +94 -0
  142. package/dist/types/proto2.d.ts +4 -0
  143. package/dist/types/proto3.d.ts +4 -0
  144. package/dist/types/service-type.d.ts +118 -0
  145. package/dist/types/type-registry.d.ts +37 -0
  146. package/package.json +31 -0
@@ -0,0 +1,2213 @@
1
+ /* eslint-disable */
2
+ // @generated by protoc-gen-es v0.0.1-alpha.1 with parameter "bootstrap_wkt=true,ts_nocheck=false"
3
+ // @generated from file google/protobuf/descriptor.proto (package google.protobuf, syntax proto2)
4
+ //
5
+ // Protocol Buffers - Google's data interchange format
6
+ // Copyright 2008 Google Inc. All rights reserved.
7
+ // https://developers.google.com/protocol-buffers/
8
+ //
9
+ // Redistribution and use in source and binary forms, with or without
10
+ // modification, are permitted provided that the following conditions are
11
+ // met:
12
+ //
13
+ // * Redistributions of source code must retain the above copyright
14
+ // notice, this list of conditions and the following disclaimer.
15
+ // * Redistributions in binary form must reproduce the above
16
+ // copyright notice, this list of conditions and the following disclaimer
17
+ // in the documentation and/or other materials provided with the
18
+ // distribution.
19
+ // * Neither the name of Google Inc. nor the names of its
20
+ // contributors may be used to endorse or promote products derived from
21
+ // this software without specific prior written permission.
22
+ //
23
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+ // Author: kenton@google.com (Kenton Varda)
35
+ // Based on original Protocol Buffers design by
36
+ // Sanjay Ghemawat, Jeff Dean, and others.
37
+ //
38
+ // The messages in this file describe the definitions found in .proto files.
39
+ // A valid .proto file can be translated directly to a FileDescriptorProto
40
+ // without any other information (e.g. without reading its imports).
41
+ import { Message, proto2 } from "../../index.js";
42
+ /**
43
+ * The protocol compiler can output a FileDescriptorSet containing the .proto
44
+ * files it parses.
45
+ *
46
+ * @generated from message google.protobuf.FileDescriptorSet
47
+ */
48
+ export class FileDescriptorSet extends Message {
49
+ constructor(data) {
50
+ super();
51
+ /**
52
+ * @generated from field: repeated google.protobuf.FileDescriptorProto file = 1;
53
+ */
54
+ this.file = [];
55
+ proto2.util.initPartial(data, this);
56
+ }
57
+ static fromBinary(bytes, options) {
58
+ return new FileDescriptorSet().fromBinary(bytes, options);
59
+ }
60
+ static fromJson(jsonValue, options) {
61
+ return new FileDescriptorSet().fromJson(jsonValue, options);
62
+ }
63
+ static fromJsonString(jsonString, options) {
64
+ return new FileDescriptorSet().fromJsonString(jsonString, options);
65
+ }
66
+ static equals(a, b) {
67
+ return proto2.util.equals(FileDescriptorSet, a, b);
68
+ }
69
+ }
70
+ FileDescriptorSet.runtime = proto2;
71
+ FileDescriptorSet.typeName = "google.protobuf.FileDescriptorSet";
72
+ FileDescriptorSet.fields = proto2.util.newFieldList(() => [
73
+ {
74
+ no: 1,
75
+ name: "file",
76
+ kind: "message",
77
+ T: FileDescriptorProto,
78
+ repeated: true,
79
+ },
80
+ ]);
81
+ /**
82
+ * Describes a complete .proto file.
83
+ *
84
+ * @generated from message google.protobuf.FileDescriptorProto
85
+ */
86
+ export class FileDescriptorProto extends Message {
87
+ constructor(data) {
88
+ super();
89
+ /**
90
+ * Names of files imported by this file.
91
+ *
92
+ * @generated from field: repeated string dependency = 3;
93
+ */
94
+ this.dependency = [];
95
+ /**
96
+ * Indexes of the public imported files in the dependency list above.
97
+ *
98
+ * @generated from field: repeated int32 public_dependency = 10;
99
+ */
100
+ this.publicDependency = [];
101
+ /**
102
+ * Indexes of the weak imported files in the dependency list.
103
+ * For Google-internal migration only. Do not use.
104
+ *
105
+ * @generated from field: repeated int32 weak_dependency = 11;
106
+ */
107
+ this.weakDependency = [];
108
+ /**
109
+ * All top-level definitions in this file.
110
+ *
111
+ * @generated from field: repeated google.protobuf.DescriptorProto message_type = 4;
112
+ */
113
+ this.messageType = [];
114
+ /**
115
+ * @generated from field: repeated google.protobuf.EnumDescriptorProto enum_type = 5;
116
+ */
117
+ this.enumType = [];
118
+ /**
119
+ * @generated from field: repeated google.protobuf.ServiceDescriptorProto service = 6;
120
+ */
121
+ this.service = [];
122
+ /**
123
+ * @generated from field: repeated google.protobuf.FieldDescriptorProto extension = 7;
124
+ */
125
+ this.extension = [];
126
+ proto2.util.initPartial(data, this);
127
+ }
128
+ static fromBinary(bytes, options) {
129
+ return new FileDescriptorProto().fromBinary(bytes, options);
130
+ }
131
+ static fromJson(jsonValue, options) {
132
+ return new FileDescriptorProto().fromJson(jsonValue, options);
133
+ }
134
+ static fromJsonString(jsonString, options) {
135
+ return new FileDescriptorProto().fromJsonString(jsonString, options);
136
+ }
137
+ static equals(a, b) {
138
+ return proto2.util.equals(FileDescriptorProto, a, b);
139
+ }
140
+ }
141
+ FileDescriptorProto.runtime = proto2;
142
+ FileDescriptorProto.typeName = "google.protobuf.FileDescriptorProto";
143
+ FileDescriptorProto.fields = proto2.util.newFieldList(() => [
144
+ {
145
+ no: 1,
146
+ name: "name",
147
+ kind: "scalar",
148
+ T: 9 /* ScalarType.STRING */,
149
+ opt: true,
150
+ },
151
+ {
152
+ no: 2,
153
+ name: "package",
154
+ kind: "scalar",
155
+ T: 9 /* ScalarType.STRING */,
156
+ opt: true,
157
+ },
158
+ {
159
+ no: 3,
160
+ name: "dependency",
161
+ kind: "scalar",
162
+ T: 9 /* ScalarType.STRING */,
163
+ repeated: true,
164
+ },
165
+ {
166
+ no: 10,
167
+ name: "public_dependency",
168
+ kind: "scalar",
169
+ T: 5 /* ScalarType.INT32 */,
170
+ repeated: true,
171
+ },
172
+ {
173
+ no: 11,
174
+ name: "weak_dependency",
175
+ kind: "scalar",
176
+ T: 5 /* ScalarType.INT32 */,
177
+ repeated: true,
178
+ },
179
+ {
180
+ no: 4,
181
+ name: "message_type",
182
+ kind: "message",
183
+ T: DescriptorProto,
184
+ repeated: true,
185
+ },
186
+ {
187
+ no: 5,
188
+ name: "enum_type",
189
+ kind: "message",
190
+ T: EnumDescriptorProto,
191
+ repeated: true,
192
+ },
193
+ {
194
+ no: 6,
195
+ name: "service",
196
+ kind: "message",
197
+ T: ServiceDescriptorProto,
198
+ repeated: true,
199
+ },
200
+ {
201
+ no: 7,
202
+ name: "extension",
203
+ kind: "message",
204
+ T: FieldDescriptorProto,
205
+ repeated: true,
206
+ },
207
+ { no: 8, name: "options", kind: "message", T: FileOptions, opt: true },
208
+ {
209
+ no: 9,
210
+ name: "source_code_info",
211
+ kind: "message",
212
+ T: SourceCodeInfo,
213
+ opt: true,
214
+ },
215
+ {
216
+ no: 12,
217
+ name: "syntax",
218
+ kind: "scalar",
219
+ T: 9 /* ScalarType.STRING */,
220
+ opt: true,
221
+ },
222
+ ]);
223
+ /**
224
+ * Describes a message type.
225
+ *
226
+ * @generated from message google.protobuf.DescriptorProto
227
+ */
228
+ export class DescriptorProto extends Message {
229
+ constructor(data) {
230
+ super();
231
+ /**
232
+ * @generated from field: repeated google.protobuf.FieldDescriptorProto field = 2;
233
+ */
234
+ this.field = [];
235
+ /**
236
+ * @generated from field: repeated google.protobuf.FieldDescriptorProto extension = 6;
237
+ */
238
+ this.extension = [];
239
+ /**
240
+ * @generated from field: repeated google.protobuf.DescriptorProto nested_type = 3;
241
+ */
242
+ this.nestedType = [];
243
+ /**
244
+ * @generated from field: repeated google.protobuf.EnumDescriptorProto enum_type = 4;
245
+ */
246
+ this.enumType = [];
247
+ /**
248
+ * @generated from field: repeated google.protobuf.DescriptorProto.ExtensionRange extension_range = 5;
249
+ */
250
+ this.extensionRange = [];
251
+ /**
252
+ * @generated from field: repeated google.protobuf.OneofDescriptorProto oneof_decl = 8;
253
+ */
254
+ this.oneofDecl = [];
255
+ /**
256
+ * @generated from field: repeated google.protobuf.DescriptorProto.ReservedRange reserved_range = 9;
257
+ */
258
+ this.reservedRange = [];
259
+ /**
260
+ * Reserved field names, which may not be used by fields in the same message.
261
+ * A given name may only be reserved once.
262
+ *
263
+ * @generated from field: repeated string reserved_name = 10;
264
+ */
265
+ this.reservedName = [];
266
+ proto2.util.initPartial(data, this);
267
+ }
268
+ static fromBinary(bytes, options) {
269
+ return new DescriptorProto().fromBinary(bytes, options);
270
+ }
271
+ static fromJson(jsonValue, options) {
272
+ return new DescriptorProto().fromJson(jsonValue, options);
273
+ }
274
+ static fromJsonString(jsonString, options) {
275
+ return new DescriptorProto().fromJsonString(jsonString, options);
276
+ }
277
+ static equals(a, b) {
278
+ return proto2.util.equals(DescriptorProto, a, b);
279
+ }
280
+ }
281
+ DescriptorProto.runtime = proto2;
282
+ DescriptorProto.typeName = "google.protobuf.DescriptorProto";
283
+ DescriptorProto.fields = proto2.util.newFieldList(() => [
284
+ {
285
+ no: 1,
286
+ name: "name",
287
+ kind: "scalar",
288
+ T: 9 /* ScalarType.STRING */,
289
+ opt: true,
290
+ },
291
+ {
292
+ no: 2,
293
+ name: "field",
294
+ kind: "message",
295
+ T: FieldDescriptorProto,
296
+ repeated: true,
297
+ },
298
+ {
299
+ no: 6,
300
+ name: "extension",
301
+ kind: "message",
302
+ T: FieldDescriptorProto,
303
+ repeated: true,
304
+ },
305
+ {
306
+ no: 3,
307
+ name: "nested_type",
308
+ kind: "message",
309
+ T: DescriptorProto,
310
+ repeated: true,
311
+ },
312
+ {
313
+ no: 4,
314
+ name: "enum_type",
315
+ kind: "message",
316
+ T: EnumDescriptorProto,
317
+ repeated: true,
318
+ },
319
+ {
320
+ no: 5,
321
+ name: "extension_range",
322
+ kind: "message",
323
+ T: DescriptorProto_ExtensionRange,
324
+ repeated: true,
325
+ },
326
+ {
327
+ no: 8,
328
+ name: "oneof_decl",
329
+ kind: "message",
330
+ T: OneofDescriptorProto,
331
+ repeated: true,
332
+ },
333
+ { no: 7, name: "options", kind: "message", T: MessageOptions, opt: true },
334
+ {
335
+ no: 9,
336
+ name: "reserved_range",
337
+ kind: "message",
338
+ T: DescriptorProto_ReservedRange,
339
+ repeated: true,
340
+ },
341
+ {
342
+ no: 10,
343
+ name: "reserved_name",
344
+ kind: "scalar",
345
+ T: 9 /* ScalarType.STRING */,
346
+ repeated: true,
347
+ },
348
+ ]);
349
+ /**
350
+ * @generated from message google.protobuf.DescriptorProto.ExtensionRange
351
+ */
352
+ export class DescriptorProto_ExtensionRange extends Message {
353
+ constructor(data) {
354
+ super();
355
+ proto2.util.initPartial(data, this);
356
+ }
357
+ static fromBinary(bytes, options) {
358
+ return new DescriptorProto_ExtensionRange().fromBinary(bytes, options);
359
+ }
360
+ static fromJson(jsonValue, options) {
361
+ return new DescriptorProto_ExtensionRange().fromJson(jsonValue, options);
362
+ }
363
+ static fromJsonString(jsonString, options) {
364
+ return new DescriptorProto_ExtensionRange().fromJsonString(
365
+ jsonString,
366
+ options
367
+ );
368
+ }
369
+ static equals(a, b) {
370
+ return proto2.util.equals(DescriptorProto_ExtensionRange, a, b);
371
+ }
372
+ }
373
+ DescriptorProto_ExtensionRange.runtime = proto2;
374
+ DescriptorProto_ExtensionRange.typeName =
375
+ "google.protobuf.DescriptorProto.ExtensionRange";
376
+ DescriptorProto_ExtensionRange.fields = proto2.util.newFieldList(() => [
377
+ {
378
+ no: 1,
379
+ name: "start",
380
+ kind: "scalar",
381
+ T: 5 /* ScalarType.INT32 */,
382
+ opt: true,
383
+ },
384
+ {
385
+ no: 2,
386
+ name: "end",
387
+ kind: "scalar",
388
+ T: 5 /* ScalarType.INT32 */,
389
+ opt: true,
390
+ },
391
+ {
392
+ no: 3,
393
+ name: "options",
394
+ kind: "message",
395
+ T: ExtensionRangeOptions,
396
+ opt: true,
397
+ },
398
+ ]);
399
+ /**
400
+ * Range of reserved tag numbers. Reserved tag numbers may not be used by
401
+ * fields or extension ranges in the same message. Reserved ranges may
402
+ * not overlap.
403
+ *
404
+ * @generated from message google.protobuf.DescriptorProto.ReservedRange
405
+ */
406
+ export class DescriptorProto_ReservedRange extends Message {
407
+ constructor(data) {
408
+ super();
409
+ proto2.util.initPartial(data, this);
410
+ }
411
+ static fromBinary(bytes, options) {
412
+ return new DescriptorProto_ReservedRange().fromBinary(bytes, options);
413
+ }
414
+ static fromJson(jsonValue, options) {
415
+ return new DescriptorProto_ReservedRange().fromJson(jsonValue, options);
416
+ }
417
+ static fromJsonString(jsonString, options) {
418
+ return new DescriptorProto_ReservedRange().fromJsonString(
419
+ jsonString,
420
+ options
421
+ );
422
+ }
423
+ static equals(a, b) {
424
+ return proto2.util.equals(DescriptorProto_ReservedRange, a, b);
425
+ }
426
+ }
427
+ DescriptorProto_ReservedRange.runtime = proto2;
428
+ DescriptorProto_ReservedRange.typeName =
429
+ "google.protobuf.DescriptorProto.ReservedRange";
430
+ DescriptorProto_ReservedRange.fields = proto2.util.newFieldList(() => [
431
+ {
432
+ no: 1,
433
+ name: "start",
434
+ kind: "scalar",
435
+ T: 5 /* ScalarType.INT32 */,
436
+ opt: true,
437
+ },
438
+ {
439
+ no: 2,
440
+ name: "end",
441
+ kind: "scalar",
442
+ T: 5 /* ScalarType.INT32 */,
443
+ opt: true,
444
+ },
445
+ ]);
446
+ /**
447
+ * @generated from message google.protobuf.ExtensionRangeOptions
448
+ */
449
+ export class ExtensionRangeOptions extends Message {
450
+ constructor(data) {
451
+ super();
452
+ /**
453
+ * The parser stores options it doesn't recognize here. See above.
454
+ *
455
+ * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
456
+ */
457
+ this.uninterpretedOption = [];
458
+ proto2.util.initPartial(data, this);
459
+ }
460
+ static fromBinary(bytes, options) {
461
+ return new ExtensionRangeOptions().fromBinary(bytes, options);
462
+ }
463
+ static fromJson(jsonValue, options) {
464
+ return new ExtensionRangeOptions().fromJson(jsonValue, options);
465
+ }
466
+ static fromJsonString(jsonString, options) {
467
+ return new ExtensionRangeOptions().fromJsonString(jsonString, options);
468
+ }
469
+ static equals(a, b) {
470
+ return proto2.util.equals(ExtensionRangeOptions, a, b);
471
+ }
472
+ }
473
+ ExtensionRangeOptions.runtime = proto2;
474
+ ExtensionRangeOptions.typeName = "google.protobuf.ExtensionRangeOptions";
475
+ ExtensionRangeOptions.fields = proto2.util.newFieldList(() => [
476
+ {
477
+ no: 999,
478
+ name: "uninterpreted_option",
479
+ kind: "message",
480
+ T: UninterpretedOption,
481
+ repeated: true,
482
+ },
483
+ ]);
484
+ /**
485
+ * Describes a field within a message.
486
+ *
487
+ * @generated from message google.protobuf.FieldDescriptorProto
488
+ */
489
+ export class FieldDescriptorProto extends Message {
490
+ constructor(data) {
491
+ super();
492
+ proto2.util.initPartial(data, this);
493
+ }
494
+ static fromBinary(bytes, options) {
495
+ return new FieldDescriptorProto().fromBinary(bytes, options);
496
+ }
497
+ static fromJson(jsonValue, options) {
498
+ return new FieldDescriptorProto().fromJson(jsonValue, options);
499
+ }
500
+ static fromJsonString(jsonString, options) {
501
+ return new FieldDescriptorProto().fromJsonString(jsonString, options);
502
+ }
503
+ static equals(a, b) {
504
+ return proto2.util.equals(FieldDescriptorProto, a, b);
505
+ }
506
+ }
507
+ FieldDescriptorProto.runtime = proto2;
508
+ FieldDescriptorProto.typeName = "google.protobuf.FieldDescriptorProto";
509
+ FieldDescriptorProto.fields = proto2.util.newFieldList(() => [
510
+ {
511
+ no: 1,
512
+ name: "name",
513
+ kind: "scalar",
514
+ T: 9 /* ScalarType.STRING */,
515
+ opt: true,
516
+ },
517
+ {
518
+ no: 3,
519
+ name: "number",
520
+ kind: "scalar",
521
+ T: 5 /* ScalarType.INT32 */,
522
+ opt: true,
523
+ },
524
+ {
525
+ no: 4,
526
+ name: "label",
527
+ kind: "enum",
528
+ T: proto2.getEnumType(FieldDescriptorProto_Label),
529
+ opt: true,
530
+ },
531
+ {
532
+ no: 5,
533
+ name: "type",
534
+ kind: "enum",
535
+ T: proto2.getEnumType(FieldDescriptorProto_Type),
536
+ opt: true,
537
+ },
538
+ {
539
+ no: 6,
540
+ name: "type_name",
541
+ kind: "scalar",
542
+ T: 9 /* ScalarType.STRING */,
543
+ opt: true,
544
+ },
545
+ {
546
+ no: 2,
547
+ name: "extendee",
548
+ kind: "scalar",
549
+ T: 9 /* ScalarType.STRING */,
550
+ opt: true,
551
+ },
552
+ {
553
+ no: 7,
554
+ name: "default_value",
555
+ kind: "scalar",
556
+ T: 9 /* ScalarType.STRING */,
557
+ opt: true,
558
+ },
559
+ {
560
+ no: 9,
561
+ name: "oneof_index",
562
+ kind: "scalar",
563
+ T: 5 /* ScalarType.INT32 */,
564
+ opt: true,
565
+ },
566
+ {
567
+ no: 10,
568
+ name: "json_name",
569
+ kind: "scalar",
570
+ T: 9 /* ScalarType.STRING */,
571
+ opt: true,
572
+ },
573
+ { no: 8, name: "options", kind: "message", T: FieldOptions, opt: true },
574
+ {
575
+ no: 17,
576
+ name: "proto3_optional",
577
+ kind: "scalar",
578
+ T: 8 /* ScalarType.BOOL */,
579
+ opt: true,
580
+ },
581
+ ]);
582
+ /**
583
+ * @generated from enum google.protobuf.FieldDescriptorProto.Type
584
+ */
585
+ export var FieldDescriptorProto_Type;
586
+ (function (FieldDescriptorProto_Type) {
587
+ /**
588
+ * 0 is reserved for errors.
589
+ * Order is weird for historical reasons.
590
+ *
591
+ * @generated from enum value: TYPE_DOUBLE = 1;
592
+ */
593
+ FieldDescriptorProto_Type[(FieldDescriptorProto_Type["DOUBLE"] = 1)] =
594
+ "DOUBLE";
595
+ /**
596
+ * @generated from enum value: TYPE_FLOAT = 2;
597
+ */
598
+ FieldDescriptorProto_Type[(FieldDescriptorProto_Type["FLOAT"] = 2)] = "FLOAT";
599
+ /**
600
+ * Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
601
+ * negative values are likely.
602
+ *
603
+ * @generated from enum value: TYPE_INT64 = 3;
604
+ */
605
+ FieldDescriptorProto_Type[(FieldDescriptorProto_Type["INT64"] = 3)] = "INT64";
606
+ /**
607
+ * @generated from enum value: TYPE_UINT64 = 4;
608
+ */
609
+ FieldDescriptorProto_Type[(FieldDescriptorProto_Type["UINT64"] = 4)] =
610
+ "UINT64";
611
+ /**
612
+ * Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
613
+ * negative values are likely.
614
+ *
615
+ * @generated from enum value: TYPE_INT32 = 5;
616
+ */
617
+ FieldDescriptorProto_Type[(FieldDescriptorProto_Type["INT32"] = 5)] = "INT32";
618
+ /**
619
+ * @generated from enum value: TYPE_FIXED64 = 6;
620
+ */
621
+ FieldDescriptorProto_Type[(FieldDescriptorProto_Type["FIXED64"] = 6)] =
622
+ "FIXED64";
623
+ /**
624
+ * @generated from enum value: TYPE_FIXED32 = 7;
625
+ */
626
+ FieldDescriptorProto_Type[(FieldDescriptorProto_Type["FIXED32"] = 7)] =
627
+ "FIXED32";
628
+ /**
629
+ * @generated from enum value: TYPE_BOOL = 8;
630
+ */
631
+ FieldDescriptorProto_Type[(FieldDescriptorProto_Type["BOOL"] = 8)] = "BOOL";
632
+ /**
633
+ * @generated from enum value: TYPE_STRING = 9;
634
+ */
635
+ FieldDescriptorProto_Type[(FieldDescriptorProto_Type["STRING"] = 9)] =
636
+ "STRING";
637
+ /**
638
+ * Tag-delimited aggregate.
639
+ * Group type is deprecated and not supported in proto3. However, Proto3
640
+ * implementations should still be able to parse the group wire format and
641
+ * treat group fields as unknown fields.
642
+ *
643
+ * @generated from enum value: TYPE_GROUP = 10;
644
+ */
645
+ FieldDescriptorProto_Type[(FieldDescriptorProto_Type["GROUP"] = 10)] =
646
+ "GROUP";
647
+ /**
648
+ * Length-delimited aggregate.
649
+ *
650
+ * @generated from enum value: TYPE_MESSAGE = 11;
651
+ */
652
+ FieldDescriptorProto_Type[(FieldDescriptorProto_Type["MESSAGE"] = 11)] =
653
+ "MESSAGE";
654
+ /**
655
+ * New in version 2.
656
+ *
657
+ * @generated from enum value: TYPE_BYTES = 12;
658
+ */
659
+ FieldDescriptorProto_Type[(FieldDescriptorProto_Type["BYTES"] = 12)] =
660
+ "BYTES";
661
+ /**
662
+ * @generated from enum value: TYPE_UINT32 = 13;
663
+ */
664
+ FieldDescriptorProto_Type[(FieldDescriptorProto_Type["UINT32"] = 13)] =
665
+ "UINT32";
666
+ /**
667
+ * @generated from enum value: TYPE_ENUM = 14;
668
+ */
669
+ FieldDescriptorProto_Type[(FieldDescriptorProto_Type["ENUM"] = 14)] = "ENUM";
670
+ /**
671
+ * @generated from enum value: TYPE_SFIXED32 = 15;
672
+ */
673
+ FieldDescriptorProto_Type[(FieldDescriptorProto_Type["SFIXED32"] = 15)] =
674
+ "SFIXED32";
675
+ /**
676
+ * @generated from enum value: TYPE_SFIXED64 = 16;
677
+ */
678
+ FieldDescriptorProto_Type[(FieldDescriptorProto_Type["SFIXED64"] = 16)] =
679
+ "SFIXED64";
680
+ /**
681
+ * Uses ZigZag encoding.
682
+ *
683
+ * @generated from enum value: TYPE_SINT32 = 17;
684
+ */
685
+ FieldDescriptorProto_Type[(FieldDescriptorProto_Type["SINT32"] = 17)] =
686
+ "SINT32";
687
+ /**
688
+ * Uses ZigZag encoding.
689
+ *
690
+ * @generated from enum value: TYPE_SINT64 = 18;
691
+ */
692
+ FieldDescriptorProto_Type[(FieldDescriptorProto_Type["SINT64"] = 18)] =
693
+ "SINT64";
694
+ })(FieldDescriptorProto_Type || (FieldDescriptorProto_Type = {}));
695
+ // Retrieve enum metadata with: proto2.getEnumType(FieldDescriptorProto_Type)
696
+ proto2.util.setEnumType(
697
+ FieldDescriptorProto_Type,
698
+ "google.protobuf.FieldDescriptorProto.Type",
699
+ [
700
+ { no: 1, name: "TYPE_DOUBLE" },
701
+ { no: 2, name: "TYPE_FLOAT" },
702
+ { no: 3, name: "TYPE_INT64" },
703
+ { no: 4, name: "TYPE_UINT64" },
704
+ { no: 5, name: "TYPE_INT32" },
705
+ { no: 6, name: "TYPE_FIXED64" },
706
+ { no: 7, name: "TYPE_FIXED32" },
707
+ { no: 8, name: "TYPE_BOOL" },
708
+ { no: 9, name: "TYPE_STRING" },
709
+ { no: 10, name: "TYPE_GROUP" },
710
+ { no: 11, name: "TYPE_MESSAGE" },
711
+ { no: 12, name: "TYPE_BYTES" },
712
+ { no: 13, name: "TYPE_UINT32" },
713
+ { no: 14, name: "TYPE_ENUM" },
714
+ { no: 15, name: "TYPE_SFIXED32" },
715
+ { no: 16, name: "TYPE_SFIXED64" },
716
+ { no: 17, name: "TYPE_SINT32" },
717
+ { no: 18, name: "TYPE_SINT64" },
718
+ ]
719
+ );
720
+ /**
721
+ * @generated from enum google.protobuf.FieldDescriptorProto.Label
722
+ */
723
+ export var FieldDescriptorProto_Label;
724
+ (function (FieldDescriptorProto_Label) {
725
+ /**
726
+ * 0 is reserved for errors
727
+ *
728
+ * @generated from enum value: LABEL_OPTIONAL = 1;
729
+ */
730
+ FieldDescriptorProto_Label[(FieldDescriptorProto_Label["OPTIONAL"] = 1)] =
731
+ "OPTIONAL";
732
+ /**
733
+ * @generated from enum value: LABEL_REQUIRED = 2;
734
+ */
735
+ FieldDescriptorProto_Label[(FieldDescriptorProto_Label["REQUIRED"] = 2)] =
736
+ "REQUIRED";
737
+ /**
738
+ * @generated from enum value: LABEL_REPEATED = 3;
739
+ */
740
+ FieldDescriptorProto_Label[(FieldDescriptorProto_Label["REPEATED"] = 3)] =
741
+ "REPEATED";
742
+ })(FieldDescriptorProto_Label || (FieldDescriptorProto_Label = {}));
743
+ // Retrieve enum metadata with: proto2.getEnumType(FieldDescriptorProto_Label)
744
+ proto2.util.setEnumType(
745
+ FieldDescriptorProto_Label,
746
+ "google.protobuf.FieldDescriptorProto.Label",
747
+ [
748
+ { no: 1, name: "LABEL_OPTIONAL" },
749
+ { no: 2, name: "LABEL_REQUIRED" },
750
+ { no: 3, name: "LABEL_REPEATED" },
751
+ ]
752
+ );
753
+ /**
754
+ * Describes a oneof.
755
+ *
756
+ * @generated from message google.protobuf.OneofDescriptorProto
757
+ */
758
+ export class OneofDescriptorProto extends Message {
759
+ constructor(data) {
760
+ super();
761
+ proto2.util.initPartial(data, this);
762
+ }
763
+ static fromBinary(bytes, options) {
764
+ return new OneofDescriptorProto().fromBinary(bytes, options);
765
+ }
766
+ static fromJson(jsonValue, options) {
767
+ return new OneofDescriptorProto().fromJson(jsonValue, options);
768
+ }
769
+ static fromJsonString(jsonString, options) {
770
+ return new OneofDescriptorProto().fromJsonString(jsonString, options);
771
+ }
772
+ static equals(a, b) {
773
+ return proto2.util.equals(OneofDescriptorProto, a, b);
774
+ }
775
+ }
776
+ OneofDescriptorProto.runtime = proto2;
777
+ OneofDescriptorProto.typeName = "google.protobuf.OneofDescriptorProto";
778
+ OneofDescriptorProto.fields = proto2.util.newFieldList(() => [
779
+ {
780
+ no: 1,
781
+ name: "name",
782
+ kind: "scalar",
783
+ T: 9 /* ScalarType.STRING */,
784
+ opt: true,
785
+ },
786
+ { no: 2, name: "options", kind: "message", T: OneofOptions, opt: true },
787
+ ]);
788
+ /**
789
+ * Describes an enum type.
790
+ *
791
+ * @generated from message google.protobuf.EnumDescriptorProto
792
+ */
793
+ export class EnumDescriptorProto extends Message {
794
+ constructor(data) {
795
+ super();
796
+ /**
797
+ * @generated from field: repeated google.protobuf.EnumValueDescriptorProto value = 2;
798
+ */
799
+ this.value = [];
800
+ /**
801
+ * Range of reserved numeric values. Reserved numeric values may not be used
802
+ * by enum values in the same enum declaration. Reserved ranges may not
803
+ * overlap.
804
+ *
805
+ * @generated from field: repeated google.protobuf.EnumDescriptorProto.EnumReservedRange reserved_range = 4;
806
+ */
807
+ this.reservedRange = [];
808
+ /**
809
+ * Reserved enum value names, which may not be reused. A given name may only
810
+ * be reserved once.
811
+ *
812
+ * @generated from field: repeated string reserved_name = 5;
813
+ */
814
+ this.reservedName = [];
815
+ proto2.util.initPartial(data, this);
816
+ }
817
+ static fromBinary(bytes, options) {
818
+ return new EnumDescriptorProto().fromBinary(bytes, options);
819
+ }
820
+ static fromJson(jsonValue, options) {
821
+ return new EnumDescriptorProto().fromJson(jsonValue, options);
822
+ }
823
+ static fromJsonString(jsonString, options) {
824
+ return new EnumDescriptorProto().fromJsonString(jsonString, options);
825
+ }
826
+ static equals(a, b) {
827
+ return proto2.util.equals(EnumDescriptorProto, a, b);
828
+ }
829
+ }
830
+ EnumDescriptorProto.runtime = proto2;
831
+ EnumDescriptorProto.typeName = "google.protobuf.EnumDescriptorProto";
832
+ EnumDescriptorProto.fields = proto2.util.newFieldList(() => [
833
+ {
834
+ no: 1,
835
+ name: "name",
836
+ kind: "scalar",
837
+ T: 9 /* ScalarType.STRING */,
838
+ opt: true,
839
+ },
840
+ {
841
+ no: 2,
842
+ name: "value",
843
+ kind: "message",
844
+ T: EnumValueDescriptorProto,
845
+ repeated: true,
846
+ },
847
+ { no: 3, name: "options", kind: "message", T: EnumOptions, opt: true },
848
+ {
849
+ no: 4,
850
+ name: "reserved_range",
851
+ kind: "message",
852
+ T: EnumDescriptorProto_EnumReservedRange,
853
+ repeated: true,
854
+ },
855
+ {
856
+ no: 5,
857
+ name: "reserved_name",
858
+ kind: "scalar",
859
+ T: 9 /* ScalarType.STRING */,
860
+ repeated: true,
861
+ },
862
+ ]);
863
+ /**
864
+ * Range of reserved numeric values. Reserved values may not be used by
865
+ * entries in the same enum. Reserved ranges may not overlap.
866
+ *
867
+ * Note that this is distinct from DescriptorProto.ReservedRange in that it
868
+ * is inclusive such that it can appropriately represent the entire int32
869
+ * domain.
870
+ *
871
+ * @generated from message google.protobuf.EnumDescriptorProto.EnumReservedRange
872
+ */
873
+ export class EnumDescriptorProto_EnumReservedRange extends Message {
874
+ constructor(data) {
875
+ super();
876
+ proto2.util.initPartial(data, this);
877
+ }
878
+ static fromBinary(bytes, options) {
879
+ return new EnumDescriptorProto_EnumReservedRange().fromBinary(
880
+ bytes,
881
+ options
882
+ );
883
+ }
884
+ static fromJson(jsonValue, options) {
885
+ return new EnumDescriptorProto_EnumReservedRange().fromJson(
886
+ jsonValue,
887
+ options
888
+ );
889
+ }
890
+ static fromJsonString(jsonString, options) {
891
+ return new EnumDescriptorProto_EnumReservedRange().fromJsonString(
892
+ jsonString,
893
+ options
894
+ );
895
+ }
896
+ static equals(a, b) {
897
+ return proto2.util.equals(EnumDescriptorProto_EnumReservedRange, a, b);
898
+ }
899
+ }
900
+ EnumDescriptorProto_EnumReservedRange.runtime = proto2;
901
+ EnumDescriptorProto_EnumReservedRange.typeName =
902
+ "google.protobuf.EnumDescriptorProto.EnumReservedRange";
903
+ EnumDescriptorProto_EnumReservedRange.fields = proto2.util.newFieldList(() => [
904
+ {
905
+ no: 1,
906
+ name: "start",
907
+ kind: "scalar",
908
+ T: 5 /* ScalarType.INT32 */,
909
+ opt: true,
910
+ },
911
+ {
912
+ no: 2,
913
+ name: "end",
914
+ kind: "scalar",
915
+ T: 5 /* ScalarType.INT32 */,
916
+ opt: true,
917
+ },
918
+ ]);
919
+ /**
920
+ * Describes a value within an enum.
921
+ *
922
+ * @generated from message google.protobuf.EnumValueDescriptorProto
923
+ */
924
+ export class EnumValueDescriptorProto extends Message {
925
+ constructor(data) {
926
+ super();
927
+ proto2.util.initPartial(data, this);
928
+ }
929
+ static fromBinary(bytes, options) {
930
+ return new EnumValueDescriptorProto().fromBinary(bytes, options);
931
+ }
932
+ static fromJson(jsonValue, options) {
933
+ return new EnumValueDescriptorProto().fromJson(jsonValue, options);
934
+ }
935
+ static fromJsonString(jsonString, options) {
936
+ return new EnumValueDescriptorProto().fromJsonString(jsonString, options);
937
+ }
938
+ static equals(a, b) {
939
+ return proto2.util.equals(EnumValueDescriptorProto, a, b);
940
+ }
941
+ }
942
+ EnumValueDescriptorProto.runtime = proto2;
943
+ EnumValueDescriptorProto.typeName = "google.protobuf.EnumValueDescriptorProto";
944
+ EnumValueDescriptorProto.fields = proto2.util.newFieldList(() => [
945
+ {
946
+ no: 1,
947
+ name: "name",
948
+ kind: "scalar",
949
+ T: 9 /* ScalarType.STRING */,
950
+ opt: true,
951
+ },
952
+ {
953
+ no: 2,
954
+ name: "number",
955
+ kind: "scalar",
956
+ T: 5 /* ScalarType.INT32 */,
957
+ opt: true,
958
+ },
959
+ { no: 3, name: "options", kind: "message", T: EnumValueOptions, opt: true },
960
+ ]);
961
+ /**
962
+ * Describes a service.
963
+ *
964
+ * @generated from message google.protobuf.ServiceDescriptorProto
965
+ */
966
+ export class ServiceDescriptorProto extends Message {
967
+ constructor(data) {
968
+ super();
969
+ /**
970
+ * @generated from field: repeated google.protobuf.MethodDescriptorProto method = 2;
971
+ */
972
+ this.method = [];
973
+ proto2.util.initPartial(data, this);
974
+ }
975
+ static fromBinary(bytes, options) {
976
+ return new ServiceDescriptorProto().fromBinary(bytes, options);
977
+ }
978
+ static fromJson(jsonValue, options) {
979
+ return new ServiceDescriptorProto().fromJson(jsonValue, options);
980
+ }
981
+ static fromJsonString(jsonString, options) {
982
+ return new ServiceDescriptorProto().fromJsonString(jsonString, options);
983
+ }
984
+ static equals(a, b) {
985
+ return proto2.util.equals(ServiceDescriptorProto, a, b);
986
+ }
987
+ }
988
+ ServiceDescriptorProto.runtime = proto2;
989
+ ServiceDescriptorProto.typeName = "google.protobuf.ServiceDescriptorProto";
990
+ ServiceDescriptorProto.fields = proto2.util.newFieldList(() => [
991
+ {
992
+ no: 1,
993
+ name: "name",
994
+ kind: "scalar",
995
+ T: 9 /* ScalarType.STRING */,
996
+ opt: true,
997
+ },
998
+ {
999
+ no: 2,
1000
+ name: "method",
1001
+ kind: "message",
1002
+ T: MethodDescriptorProto,
1003
+ repeated: true,
1004
+ },
1005
+ { no: 3, name: "options", kind: "message", T: ServiceOptions, opt: true },
1006
+ ]);
1007
+ /**
1008
+ * Describes a method of a service.
1009
+ *
1010
+ * @generated from message google.protobuf.MethodDescriptorProto
1011
+ */
1012
+ export class MethodDescriptorProto extends Message {
1013
+ constructor(data) {
1014
+ super();
1015
+ proto2.util.initPartial(data, this);
1016
+ }
1017
+ static fromBinary(bytes, options) {
1018
+ return new MethodDescriptorProto().fromBinary(bytes, options);
1019
+ }
1020
+ static fromJson(jsonValue, options) {
1021
+ return new MethodDescriptorProto().fromJson(jsonValue, options);
1022
+ }
1023
+ static fromJsonString(jsonString, options) {
1024
+ return new MethodDescriptorProto().fromJsonString(jsonString, options);
1025
+ }
1026
+ static equals(a, b) {
1027
+ return proto2.util.equals(MethodDescriptorProto, a, b);
1028
+ }
1029
+ }
1030
+ MethodDescriptorProto.runtime = proto2;
1031
+ MethodDescriptorProto.typeName = "google.protobuf.MethodDescriptorProto";
1032
+ MethodDescriptorProto.fields = proto2.util.newFieldList(() => [
1033
+ {
1034
+ no: 1,
1035
+ name: "name",
1036
+ kind: "scalar",
1037
+ T: 9 /* ScalarType.STRING */,
1038
+ opt: true,
1039
+ },
1040
+ {
1041
+ no: 2,
1042
+ name: "input_type",
1043
+ kind: "scalar",
1044
+ T: 9 /* ScalarType.STRING */,
1045
+ opt: true,
1046
+ },
1047
+ {
1048
+ no: 3,
1049
+ name: "output_type",
1050
+ kind: "scalar",
1051
+ T: 9 /* ScalarType.STRING */,
1052
+ opt: true,
1053
+ },
1054
+ { no: 4, name: "options", kind: "message", T: MethodOptions, opt: true },
1055
+ {
1056
+ no: 5,
1057
+ name: "client_streaming",
1058
+ kind: "scalar",
1059
+ T: 8 /* ScalarType.BOOL */,
1060
+ opt: true,
1061
+ default: false,
1062
+ },
1063
+ {
1064
+ no: 6,
1065
+ name: "server_streaming",
1066
+ kind: "scalar",
1067
+ T: 8 /* ScalarType.BOOL */,
1068
+ opt: true,
1069
+ default: false,
1070
+ },
1071
+ ]);
1072
+ /**
1073
+ * @generated from message google.protobuf.FileOptions
1074
+ */
1075
+ export class FileOptions extends Message {
1076
+ constructor(data) {
1077
+ super();
1078
+ /**
1079
+ * The parser stores options it doesn't recognize here.
1080
+ * See the documentation for the "Options" section above.
1081
+ *
1082
+ * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
1083
+ */
1084
+ this.uninterpretedOption = [];
1085
+ proto2.util.initPartial(data, this);
1086
+ }
1087
+ static fromBinary(bytes, options) {
1088
+ return new FileOptions().fromBinary(bytes, options);
1089
+ }
1090
+ static fromJson(jsonValue, options) {
1091
+ return new FileOptions().fromJson(jsonValue, options);
1092
+ }
1093
+ static fromJsonString(jsonString, options) {
1094
+ return new FileOptions().fromJsonString(jsonString, options);
1095
+ }
1096
+ static equals(a, b) {
1097
+ return proto2.util.equals(FileOptions, a, b);
1098
+ }
1099
+ }
1100
+ FileOptions.runtime = proto2;
1101
+ FileOptions.typeName = "google.protobuf.FileOptions";
1102
+ FileOptions.fields = proto2.util.newFieldList(() => [
1103
+ {
1104
+ no: 1,
1105
+ name: "java_package",
1106
+ kind: "scalar",
1107
+ T: 9 /* ScalarType.STRING */,
1108
+ opt: true,
1109
+ },
1110
+ {
1111
+ no: 8,
1112
+ name: "java_outer_classname",
1113
+ kind: "scalar",
1114
+ T: 9 /* ScalarType.STRING */,
1115
+ opt: true,
1116
+ },
1117
+ {
1118
+ no: 10,
1119
+ name: "java_multiple_files",
1120
+ kind: "scalar",
1121
+ T: 8 /* ScalarType.BOOL */,
1122
+ opt: true,
1123
+ default: false,
1124
+ },
1125
+ {
1126
+ no: 20,
1127
+ name: "java_generate_equals_and_hash",
1128
+ kind: "scalar",
1129
+ T: 8 /* ScalarType.BOOL */,
1130
+ opt: true,
1131
+ },
1132
+ {
1133
+ no: 27,
1134
+ name: "java_string_check_utf8",
1135
+ kind: "scalar",
1136
+ T: 8 /* ScalarType.BOOL */,
1137
+ opt: true,
1138
+ default: false,
1139
+ },
1140
+ {
1141
+ no: 9,
1142
+ name: "optimize_for",
1143
+ kind: "enum",
1144
+ T: proto2.getEnumType(FileOptions_OptimizeMode),
1145
+ opt: true,
1146
+ default: FileOptions_OptimizeMode.SPEED,
1147
+ },
1148
+ {
1149
+ no: 11,
1150
+ name: "go_package",
1151
+ kind: "scalar",
1152
+ T: 9 /* ScalarType.STRING */,
1153
+ opt: true,
1154
+ },
1155
+ {
1156
+ no: 16,
1157
+ name: "cc_generic_services",
1158
+ kind: "scalar",
1159
+ T: 8 /* ScalarType.BOOL */,
1160
+ opt: true,
1161
+ default: false,
1162
+ },
1163
+ {
1164
+ no: 17,
1165
+ name: "java_generic_services",
1166
+ kind: "scalar",
1167
+ T: 8 /* ScalarType.BOOL */,
1168
+ opt: true,
1169
+ default: false,
1170
+ },
1171
+ {
1172
+ no: 18,
1173
+ name: "py_generic_services",
1174
+ kind: "scalar",
1175
+ T: 8 /* ScalarType.BOOL */,
1176
+ opt: true,
1177
+ default: false,
1178
+ },
1179
+ {
1180
+ no: 42,
1181
+ name: "php_generic_services",
1182
+ kind: "scalar",
1183
+ T: 8 /* ScalarType.BOOL */,
1184
+ opt: true,
1185
+ default: false,
1186
+ },
1187
+ {
1188
+ no: 23,
1189
+ name: "deprecated",
1190
+ kind: "scalar",
1191
+ T: 8 /* ScalarType.BOOL */,
1192
+ opt: true,
1193
+ default: false,
1194
+ },
1195
+ {
1196
+ no: 31,
1197
+ name: "cc_enable_arenas",
1198
+ kind: "scalar",
1199
+ T: 8 /* ScalarType.BOOL */,
1200
+ opt: true,
1201
+ default: true,
1202
+ },
1203
+ {
1204
+ no: 36,
1205
+ name: "objc_class_prefix",
1206
+ kind: "scalar",
1207
+ T: 9 /* ScalarType.STRING */,
1208
+ opt: true,
1209
+ },
1210
+ {
1211
+ no: 37,
1212
+ name: "csharp_namespace",
1213
+ kind: "scalar",
1214
+ T: 9 /* ScalarType.STRING */,
1215
+ opt: true,
1216
+ },
1217
+ {
1218
+ no: 39,
1219
+ name: "swift_prefix",
1220
+ kind: "scalar",
1221
+ T: 9 /* ScalarType.STRING */,
1222
+ opt: true,
1223
+ },
1224
+ {
1225
+ no: 40,
1226
+ name: "php_class_prefix",
1227
+ kind: "scalar",
1228
+ T: 9 /* ScalarType.STRING */,
1229
+ opt: true,
1230
+ },
1231
+ {
1232
+ no: 41,
1233
+ name: "php_namespace",
1234
+ kind: "scalar",
1235
+ T: 9 /* ScalarType.STRING */,
1236
+ opt: true,
1237
+ },
1238
+ {
1239
+ no: 44,
1240
+ name: "php_metadata_namespace",
1241
+ kind: "scalar",
1242
+ T: 9 /* ScalarType.STRING */,
1243
+ opt: true,
1244
+ },
1245
+ {
1246
+ no: 45,
1247
+ name: "ruby_package",
1248
+ kind: "scalar",
1249
+ T: 9 /* ScalarType.STRING */,
1250
+ opt: true,
1251
+ },
1252
+ {
1253
+ no: 999,
1254
+ name: "uninterpreted_option",
1255
+ kind: "message",
1256
+ T: UninterpretedOption,
1257
+ repeated: true,
1258
+ },
1259
+ ]);
1260
+ /**
1261
+ * Generated classes can be optimized for speed or code size.
1262
+ *
1263
+ * @generated from enum google.protobuf.FileOptions.OptimizeMode
1264
+ */
1265
+ export var FileOptions_OptimizeMode;
1266
+ (function (FileOptions_OptimizeMode) {
1267
+ /**
1268
+ * Generate complete code for parsing, serialization,
1269
+ *
1270
+ * @generated from enum value: SPEED = 1;
1271
+ */
1272
+ FileOptions_OptimizeMode[(FileOptions_OptimizeMode["SPEED"] = 1)] = "SPEED";
1273
+ /**
1274
+ * etc.
1275
+ *
1276
+ * Use ReflectionOps to implement these methods.
1277
+ *
1278
+ * @generated from enum value: CODE_SIZE = 2;
1279
+ */
1280
+ FileOptions_OptimizeMode[(FileOptions_OptimizeMode["CODE_SIZE"] = 2)] =
1281
+ "CODE_SIZE";
1282
+ /**
1283
+ * Generate code using MessageLite and the lite runtime.
1284
+ *
1285
+ * @generated from enum value: LITE_RUNTIME = 3;
1286
+ */
1287
+ FileOptions_OptimizeMode[(FileOptions_OptimizeMode["LITE_RUNTIME"] = 3)] =
1288
+ "LITE_RUNTIME";
1289
+ })(FileOptions_OptimizeMode || (FileOptions_OptimizeMode = {}));
1290
+ // Retrieve enum metadata with: proto2.getEnumType(FileOptions_OptimizeMode)
1291
+ proto2.util.setEnumType(
1292
+ FileOptions_OptimizeMode,
1293
+ "google.protobuf.FileOptions.OptimizeMode",
1294
+ [
1295
+ { no: 1, name: "SPEED" },
1296
+ { no: 2, name: "CODE_SIZE" },
1297
+ { no: 3, name: "LITE_RUNTIME" },
1298
+ ]
1299
+ );
1300
+ /**
1301
+ * @generated from message google.protobuf.MessageOptions
1302
+ */
1303
+ export class MessageOptions extends Message {
1304
+ constructor(data) {
1305
+ super();
1306
+ /**
1307
+ * The parser stores options it doesn't recognize here. See above.
1308
+ *
1309
+ * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
1310
+ */
1311
+ this.uninterpretedOption = [];
1312
+ proto2.util.initPartial(data, this);
1313
+ }
1314
+ static fromBinary(bytes, options) {
1315
+ return new MessageOptions().fromBinary(bytes, options);
1316
+ }
1317
+ static fromJson(jsonValue, options) {
1318
+ return new MessageOptions().fromJson(jsonValue, options);
1319
+ }
1320
+ static fromJsonString(jsonString, options) {
1321
+ return new MessageOptions().fromJsonString(jsonString, options);
1322
+ }
1323
+ static equals(a, b) {
1324
+ return proto2.util.equals(MessageOptions, a, b);
1325
+ }
1326
+ }
1327
+ MessageOptions.runtime = proto2;
1328
+ MessageOptions.typeName = "google.protobuf.MessageOptions";
1329
+ MessageOptions.fields = proto2.util.newFieldList(() => [
1330
+ {
1331
+ no: 1,
1332
+ name: "message_set_wire_format",
1333
+ kind: "scalar",
1334
+ T: 8 /* ScalarType.BOOL */,
1335
+ opt: true,
1336
+ default: false,
1337
+ },
1338
+ {
1339
+ no: 2,
1340
+ name: "no_standard_descriptor_accessor",
1341
+ kind: "scalar",
1342
+ T: 8 /* ScalarType.BOOL */,
1343
+ opt: true,
1344
+ default: false,
1345
+ },
1346
+ {
1347
+ no: 3,
1348
+ name: "deprecated",
1349
+ kind: "scalar",
1350
+ T: 8 /* ScalarType.BOOL */,
1351
+ opt: true,
1352
+ default: false,
1353
+ },
1354
+ {
1355
+ no: 7,
1356
+ name: "map_entry",
1357
+ kind: "scalar",
1358
+ T: 8 /* ScalarType.BOOL */,
1359
+ opt: true,
1360
+ },
1361
+ {
1362
+ no: 999,
1363
+ name: "uninterpreted_option",
1364
+ kind: "message",
1365
+ T: UninterpretedOption,
1366
+ repeated: true,
1367
+ },
1368
+ ]);
1369
+ /**
1370
+ * @generated from message google.protobuf.FieldOptions
1371
+ */
1372
+ export class FieldOptions extends Message {
1373
+ constructor(data) {
1374
+ super();
1375
+ /**
1376
+ * The parser stores options it doesn't recognize here. See above.
1377
+ *
1378
+ * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
1379
+ */
1380
+ this.uninterpretedOption = [];
1381
+ proto2.util.initPartial(data, this);
1382
+ }
1383
+ static fromBinary(bytes, options) {
1384
+ return new FieldOptions().fromBinary(bytes, options);
1385
+ }
1386
+ static fromJson(jsonValue, options) {
1387
+ return new FieldOptions().fromJson(jsonValue, options);
1388
+ }
1389
+ static fromJsonString(jsonString, options) {
1390
+ return new FieldOptions().fromJsonString(jsonString, options);
1391
+ }
1392
+ static equals(a, b) {
1393
+ return proto2.util.equals(FieldOptions, a, b);
1394
+ }
1395
+ }
1396
+ FieldOptions.runtime = proto2;
1397
+ FieldOptions.typeName = "google.protobuf.FieldOptions";
1398
+ FieldOptions.fields = proto2.util.newFieldList(() => [
1399
+ {
1400
+ no: 1,
1401
+ name: "ctype",
1402
+ kind: "enum",
1403
+ T: proto2.getEnumType(FieldOptions_CType),
1404
+ opt: true,
1405
+ default: FieldOptions_CType.STRING,
1406
+ },
1407
+ {
1408
+ no: 2,
1409
+ name: "packed",
1410
+ kind: "scalar",
1411
+ T: 8 /* ScalarType.BOOL */,
1412
+ opt: true,
1413
+ },
1414
+ {
1415
+ no: 6,
1416
+ name: "jstype",
1417
+ kind: "enum",
1418
+ T: proto2.getEnumType(FieldOptions_JSType),
1419
+ opt: true,
1420
+ default: FieldOptions_JSType.JS_NORMAL,
1421
+ },
1422
+ {
1423
+ no: 5,
1424
+ name: "lazy",
1425
+ kind: "scalar",
1426
+ T: 8 /* ScalarType.BOOL */,
1427
+ opt: true,
1428
+ default: false,
1429
+ },
1430
+ {
1431
+ no: 3,
1432
+ name: "deprecated",
1433
+ kind: "scalar",
1434
+ T: 8 /* ScalarType.BOOL */,
1435
+ opt: true,
1436
+ default: false,
1437
+ },
1438
+ {
1439
+ no: 10,
1440
+ name: "weak",
1441
+ kind: "scalar",
1442
+ T: 8 /* ScalarType.BOOL */,
1443
+ opt: true,
1444
+ default: false,
1445
+ },
1446
+ {
1447
+ no: 999,
1448
+ name: "uninterpreted_option",
1449
+ kind: "message",
1450
+ T: UninterpretedOption,
1451
+ repeated: true,
1452
+ },
1453
+ ]);
1454
+ /**
1455
+ * @generated from enum google.protobuf.FieldOptions.CType
1456
+ */
1457
+ export var FieldOptions_CType;
1458
+ (function (FieldOptions_CType) {
1459
+ /**
1460
+ * Default mode.
1461
+ *
1462
+ * @generated from enum value: STRING = 0;
1463
+ */
1464
+ FieldOptions_CType[(FieldOptions_CType["STRING"] = 0)] = "STRING";
1465
+ /**
1466
+ * @generated from enum value: CORD = 1;
1467
+ */
1468
+ FieldOptions_CType[(FieldOptions_CType["CORD"] = 1)] = "CORD";
1469
+ /**
1470
+ * @generated from enum value: STRING_PIECE = 2;
1471
+ */
1472
+ FieldOptions_CType[(FieldOptions_CType["STRING_PIECE"] = 2)] = "STRING_PIECE";
1473
+ })(FieldOptions_CType || (FieldOptions_CType = {}));
1474
+ // Retrieve enum metadata with: proto2.getEnumType(FieldOptions_CType)
1475
+ proto2.util.setEnumType(
1476
+ FieldOptions_CType,
1477
+ "google.protobuf.FieldOptions.CType",
1478
+ [
1479
+ { no: 0, name: "STRING" },
1480
+ { no: 1, name: "CORD" },
1481
+ { no: 2, name: "STRING_PIECE" },
1482
+ ]
1483
+ );
1484
+ /**
1485
+ * @generated from enum google.protobuf.FieldOptions.JSType
1486
+ */
1487
+ export var FieldOptions_JSType;
1488
+ (function (FieldOptions_JSType) {
1489
+ /**
1490
+ * Use the default type.
1491
+ *
1492
+ * @generated from enum value: JS_NORMAL = 0;
1493
+ */
1494
+ FieldOptions_JSType[(FieldOptions_JSType["JS_NORMAL"] = 0)] = "JS_NORMAL";
1495
+ /**
1496
+ * Use JavaScript strings.
1497
+ *
1498
+ * @generated from enum value: JS_STRING = 1;
1499
+ */
1500
+ FieldOptions_JSType[(FieldOptions_JSType["JS_STRING"] = 1)] = "JS_STRING";
1501
+ /**
1502
+ * Use JavaScript numbers.
1503
+ *
1504
+ * @generated from enum value: JS_NUMBER = 2;
1505
+ */
1506
+ FieldOptions_JSType[(FieldOptions_JSType["JS_NUMBER"] = 2)] = "JS_NUMBER";
1507
+ })(FieldOptions_JSType || (FieldOptions_JSType = {}));
1508
+ // Retrieve enum metadata with: proto2.getEnumType(FieldOptions_JSType)
1509
+ proto2.util.setEnumType(
1510
+ FieldOptions_JSType,
1511
+ "google.protobuf.FieldOptions.JSType",
1512
+ [
1513
+ { no: 0, name: "JS_NORMAL" },
1514
+ { no: 1, name: "JS_STRING" },
1515
+ { no: 2, name: "JS_NUMBER" },
1516
+ ]
1517
+ );
1518
+ /**
1519
+ * @generated from message google.protobuf.OneofOptions
1520
+ */
1521
+ export class OneofOptions extends Message {
1522
+ constructor(data) {
1523
+ super();
1524
+ /**
1525
+ * The parser stores options it doesn't recognize here. See above.
1526
+ *
1527
+ * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
1528
+ */
1529
+ this.uninterpretedOption = [];
1530
+ proto2.util.initPartial(data, this);
1531
+ }
1532
+ static fromBinary(bytes, options) {
1533
+ return new OneofOptions().fromBinary(bytes, options);
1534
+ }
1535
+ static fromJson(jsonValue, options) {
1536
+ return new OneofOptions().fromJson(jsonValue, options);
1537
+ }
1538
+ static fromJsonString(jsonString, options) {
1539
+ return new OneofOptions().fromJsonString(jsonString, options);
1540
+ }
1541
+ static equals(a, b) {
1542
+ return proto2.util.equals(OneofOptions, a, b);
1543
+ }
1544
+ }
1545
+ OneofOptions.runtime = proto2;
1546
+ OneofOptions.typeName = "google.protobuf.OneofOptions";
1547
+ OneofOptions.fields = proto2.util.newFieldList(() => [
1548
+ {
1549
+ no: 999,
1550
+ name: "uninterpreted_option",
1551
+ kind: "message",
1552
+ T: UninterpretedOption,
1553
+ repeated: true,
1554
+ },
1555
+ ]);
1556
+ /**
1557
+ * @generated from message google.protobuf.EnumOptions
1558
+ */
1559
+ export class EnumOptions extends Message {
1560
+ constructor(data) {
1561
+ super();
1562
+ /**
1563
+ * The parser stores options it doesn't recognize here. See above.
1564
+ *
1565
+ * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
1566
+ */
1567
+ this.uninterpretedOption = [];
1568
+ proto2.util.initPartial(data, this);
1569
+ }
1570
+ static fromBinary(bytes, options) {
1571
+ return new EnumOptions().fromBinary(bytes, options);
1572
+ }
1573
+ static fromJson(jsonValue, options) {
1574
+ return new EnumOptions().fromJson(jsonValue, options);
1575
+ }
1576
+ static fromJsonString(jsonString, options) {
1577
+ return new EnumOptions().fromJsonString(jsonString, options);
1578
+ }
1579
+ static equals(a, b) {
1580
+ return proto2.util.equals(EnumOptions, a, b);
1581
+ }
1582
+ }
1583
+ EnumOptions.runtime = proto2;
1584
+ EnumOptions.typeName = "google.protobuf.EnumOptions";
1585
+ EnumOptions.fields = proto2.util.newFieldList(() => [
1586
+ {
1587
+ no: 2,
1588
+ name: "allow_alias",
1589
+ kind: "scalar",
1590
+ T: 8 /* ScalarType.BOOL */,
1591
+ opt: true,
1592
+ },
1593
+ {
1594
+ no: 3,
1595
+ name: "deprecated",
1596
+ kind: "scalar",
1597
+ T: 8 /* ScalarType.BOOL */,
1598
+ opt: true,
1599
+ default: false,
1600
+ },
1601
+ {
1602
+ no: 999,
1603
+ name: "uninterpreted_option",
1604
+ kind: "message",
1605
+ T: UninterpretedOption,
1606
+ repeated: true,
1607
+ },
1608
+ ]);
1609
+ /**
1610
+ * @generated from message google.protobuf.EnumValueOptions
1611
+ */
1612
+ export class EnumValueOptions extends Message {
1613
+ constructor(data) {
1614
+ super();
1615
+ /**
1616
+ * The parser stores options it doesn't recognize here. See above.
1617
+ *
1618
+ * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
1619
+ */
1620
+ this.uninterpretedOption = [];
1621
+ proto2.util.initPartial(data, this);
1622
+ }
1623
+ static fromBinary(bytes, options) {
1624
+ return new EnumValueOptions().fromBinary(bytes, options);
1625
+ }
1626
+ static fromJson(jsonValue, options) {
1627
+ return new EnumValueOptions().fromJson(jsonValue, options);
1628
+ }
1629
+ static fromJsonString(jsonString, options) {
1630
+ return new EnumValueOptions().fromJsonString(jsonString, options);
1631
+ }
1632
+ static equals(a, b) {
1633
+ return proto2.util.equals(EnumValueOptions, a, b);
1634
+ }
1635
+ }
1636
+ EnumValueOptions.runtime = proto2;
1637
+ EnumValueOptions.typeName = "google.protobuf.EnumValueOptions";
1638
+ EnumValueOptions.fields = proto2.util.newFieldList(() => [
1639
+ {
1640
+ no: 1,
1641
+ name: "deprecated",
1642
+ kind: "scalar",
1643
+ T: 8 /* ScalarType.BOOL */,
1644
+ opt: true,
1645
+ default: false,
1646
+ },
1647
+ {
1648
+ no: 999,
1649
+ name: "uninterpreted_option",
1650
+ kind: "message",
1651
+ T: UninterpretedOption,
1652
+ repeated: true,
1653
+ },
1654
+ ]);
1655
+ /**
1656
+ * @generated from message google.protobuf.ServiceOptions
1657
+ */
1658
+ export class ServiceOptions extends Message {
1659
+ constructor(data) {
1660
+ super();
1661
+ /**
1662
+ * The parser stores options it doesn't recognize here. See above.
1663
+ *
1664
+ * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
1665
+ */
1666
+ this.uninterpretedOption = [];
1667
+ proto2.util.initPartial(data, this);
1668
+ }
1669
+ static fromBinary(bytes, options) {
1670
+ return new ServiceOptions().fromBinary(bytes, options);
1671
+ }
1672
+ static fromJson(jsonValue, options) {
1673
+ return new ServiceOptions().fromJson(jsonValue, options);
1674
+ }
1675
+ static fromJsonString(jsonString, options) {
1676
+ return new ServiceOptions().fromJsonString(jsonString, options);
1677
+ }
1678
+ static equals(a, b) {
1679
+ return proto2.util.equals(ServiceOptions, a, b);
1680
+ }
1681
+ }
1682
+ ServiceOptions.runtime = proto2;
1683
+ ServiceOptions.typeName = "google.protobuf.ServiceOptions";
1684
+ ServiceOptions.fields = proto2.util.newFieldList(() => [
1685
+ {
1686
+ no: 33,
1687
+ name: "deprecated",
1688
+ kind: "scalar",
1689
+ T: 8 /* ScalarType.BOOL */,
1690
+ opt: true,
1691
+ default: false,
1692
+ },
1693
+ {
1694
+ no: 999,
1695
+ name: "uninterpreted_option",
1696
+ kind: "message",
1697
+ T: UninterpretedOption,
1698
+ repeated: true,
1699
+ },
1700
+ ]);
1701
+ /**
1702
+ * @generated from message google.protobuf.MethodOptions
1703
+ */
1704
+ export class MethodOptions extends Message {
1705
+ constructor(data) {
1706
+ super();
1707
+ /**
1708
+ * The parser stores options it doesn't recognize here. See above.
1709
+ *
1710
+ * @generated from field: repeated google.protobuf.UninterpretedOption uninterpreted_option = 999;
1711
+ */
1712
+ this.uninterpretedOption = [];
1713
+ proto2.util.initPartial(data, this);
1714
+ }
1715
+ static fromBinary(bytes, options) {
1716
+ return new MethodOptions().fromBinary(bytes, options);
1717
+ }
1718
+ static fromJson(jsonValue, options) {
1719
+ return new MethodOptions().fromJson(jsonValue, options);
1720
+ }
1721
+ static fromJsonString(jsonString, options) {
1722
+ return new MethodOptions().fromJsonString(jsonString, options);
1723
+ }
1724
+ static equals(a, b) {
1725
+ return proto2.util.equals(MethodOptions, a, b);
1726
+ }
1727
+ }
1728
+ MethodOptions.runtime = proto2;
1729
+ MethodOptions.typeName = "google.protobuf.MethodOptions";
1730
+ MethodOptions.fields = proto2.util.newFieldList(() => [
1731
+ {
1732
+ no: 33,
1733
+ name: "deprecated",
1734
+ kind: "scalar",
1735
+ T: 8 /* ScalarType.BOOL */,
1736
+ opt: true,
1737
+ default: false,
1738
+ },
1739
+ {
1740
+ no: 34,
1741
+ name: "idempotency_level",
1742
+ kind: "enum",
1743
+ T: proto2.getEnumType(MethodOptions_IdempotencyLevel),
1744
+ opt: true,
1745
+ default: MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN,
1746
+ },
1747
+ {
1748
+ no: 999,
1749
+ name: "uninterpreted_option",
1750
+ kind: "message",
1751
+ T: UninterpretedOption,
1752
+ repeated: true,
1753
+ },
1754
+ ]);
1755
+ /**
1756
+ * Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
1757
+ * or neither? HTTP based RPC implementation may choose GET verb for safe
1758
+ * methods, and PUT verb for idempotent methods instead of the default POST.
1759
+ *
1760
+ * @generated from enum google.protobuf.MethodOptions.IdempotencyLevel
1761
+ */
1762
+ export var MethodOptions_IdempotencyLevel;
1763
+ (function (MethodOptions_IdempotencyLevel) {
1764
+ /**
1765
+ * @generated from enum value: IDEMPOTENCY_UNKNOWN = 0;
1766
+ */
1767
+ MethodOptions_IdempotencyLevel[
1768
+ (MethodOptions_IdempotencyLevel["IDEMPOTENCY_UNKNOWN"] = 0)
1769
+ ] = "IDEMPOTENCY_UNKNOWN";
1770
+ /**
1771
+ * implies idempotent
1772
+ *
1773
+ * @generated from enum value: NO_SIDE_EFFECTS = 1;
1774
+ */
1775
+ MethodOptions_IdempotencyLevel[
1776
+ (MethodOptions_IdempotencyLevel["NO_SIDE_EFFECTS"] = 1)
1777
+ ] = "NO_SIDE_EFFECTS";
1778
+ /**
1779
+ * idempotent, but may have side effects
1780
+ *
1781
+ * @generated from enum value: IDEMPOTENT = 2;
1782
+ */
1783
+ MethodOptions_IdempotencyLevel[
1784
+ (MethodOptions_IdempotencyLevel["IDEMPOTENT"] = 2)
1785
+ ] = "IDEMPOTENT";
1786
+ })(MethodOptions_IdempotencyLevel || (MethodOptions_IdempotencyLevel = {}));
1787
+ // Retrieve enum metadata with: proto2.getEnumType(MethodOptions_IdempotencyLevel)
1788
+ proto2.util.setEnumType(
1789
+ MethodOptions_IdempotencyLevel,
1790
+ "google.protobuf.MethodOptions.IdempotencyLevel",
1791
+ [
1792
+ { no: 0, name: "IDEMPOTENCY_UNKNOWN" },
1793
+ { no: 1, name: "NO_SIDE_EFFECTS" },
1794
+ { no: 2, name: "IDEMPOTENT" },
1795
+ ]
1796
+ );
1797
+ /**
1798
+ * A message representing a option the parser does not recognize. This only
1799
+ * appears in options protos created by the compiler::Parser class.
1800
+ * DescriptorPool resolves these when building Descriptor objects. Therefore,
1801
+ * options protos in descriptor objects (e.g. returned by Descriptor::options(),
1802
+ * or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
1803
+ * in them.
1804
+ *
1805
+ * @generated from message google.protobuf.UninterpretedOption
1806
+ */
1807
+ export class UninterpretedOption extends Message {
1808
+ constructor(data) {
1809
+ super();
1810
+ /**
1811
+ * @generated from field: repeated google.protobuf.UninterpretedOption.NamePart name = 2;
1812
+ */
1813
+ this.name = [];
1814
+ proto2.util.initPartial(data, this);
1815
+ }
1816
+ static fromBinary(bytes, options) {
1817
+ return new UninterpretedOption().fromBinary(bytes, options);
1818
+ }
1819
+ static fromJson(jsonValue, options) {
1820
+ return new UninterpretedOption().fromJson(jsonValue, options);
1821
+ }
1822
+ static fromJsonString(jsonString, options) {
1823
+ return new UninterpretedOption().fromJsonString(jsonString, options);
1824
+ }
1825
+ static equals(a, b) {
1826
+ return proto2.util.equals(UninterpretedOption, a, b);
1827
+ }
1828
+ }
1829
+ UninterpretedOption.runtime = proto2;
1830
+ UninterpretedOption.typeName = "google.protobuf.UninterpretedOption";
1831
+ UninterpretedOption.fields = proto2.util.newFieldList(() => [
1832
+ {
1833
+ no: 2,
1834
+ name: "name",
1835
+ kind: "message",
1836
+ T: UninterpretedOption_NamePart,
1837
+ repeated: true,
1838
+ },
1839
+ {
1840
+ no: 3,
1841
+ name: "identifier_value",
1842
+ kind: "scalar",
1843
+ T: 9 /* ScalarType.STRING */,
1844
+ opt: true,
1845
+ },
1846
+ {
1847
+ no: 4,
1848
+ name: "positive_int_value",
1849
+ kind: "scalar",
1850
+ T: 4 /* ScalarType.UINT64 */,
1851
+ opt: true,
1852
+ },
1853
+ {
1854
+ no: 5,
1855
+ name: "negative_int_value",
1856
+ kind: "scalar",
1857
+ T: 3 /* ScalarType.INT64 */,
1858
+ opt: true,
1859
+ },
1860
+ {
1861
+ no: 6,
1862
+ name: "double_value",
1863
+ kind: "scalar",
1864
+ T: 1 /* ScalarType.DOUBLE */,
1865
+ opt: true,
1866
+ },
1867
+ {
1868
+ no: 7,
1869
+ name: "string_value",
1870
+ kind: "scalar",
1871
+ T: 12 /* ScalarType.BYTES */,
1872
+ opt: true,
1873
+ },
1874
+ {
1875
+ no: 8,
1876
+ name: "aggregate_value",
1877
+ kind: "scalar",
1878
+ T: 9 /* ScalarType.STRING */,
1879
+ opt: true,
1880
+ },
1881
+ ]);
1882
+ /**
1883
+ * The name of the uninterpreted option. Each string represents a segment in
1884
+ * a dot-separated name. is_extension is true iff a segment represents an
1885
+ * extension (denoted with parentheses in options specs in .proto files).
1886
+ * E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
1887
+ * "foo.(bar.baz).qux".
1888
+ *
1889
+ * @generated from message google.protobuf.UninterpretedOption.NamePart
1890
+ */
1891
+ export class UninterpretedOption_NamePart extends Message {
1892
+ constructor(data) {
1893
+ super();
1894
+ proto2.util.initPartial(data, this);
1895
+ }
1896
+ static fromBinary(bytes, options) {
1897
+ return new UninterpretedOption_NamePart().fromBinary(bytes, options);
1898
+ }
1899
+ static fromJson(jsonValue, options) {
1900
+ return new UninterpretedOption_NamePart().fromJson(jsonValue, options);
1901
+ }
1902
+ static fromJsonString(jsonString, options) {
1903
+ return new UninterpretedOption_NamePart().fromJsonString(
1904
+ jsonString,
1905
+ options
1906
+ );
1907
+ }
1908
+ static equals(a, b) {
1909
+ return proto2.util.equals(UninterpretedOption_NamePart, a, b);
1910
+ }
1911
+ }
1912
+ UninterpretedOption_NamePart.runtime = proto2;
1913
+ UninterpretedOption_NamePart.typeName =
1914
+ "google.protobuf.UninterpretedOption.NamePart";
1915
+ UninterpretedOption_NamePart.fields = proto2.util.newFieldList(() => [
1916
+ { no: 1, name: "name_part", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1917
+ { no: 2, name: "is_extension", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
1918
+ ]);
1919
+ /**
1920
+ * Encapsulates information about the original source file from which a
1921
+ * FileDescriptorProto was generated.
1922
+ *
1923
+ * @generated from message google.protobuf.SourceCodeInfo
1924
+ */
1925
+ export class SourceCodeInfo extends Message {
1926
+ constructor(data) {
1927
+ super();
1928
+ /**
1929
+ * A Location identifies a piece of source code in a .proto file which
1930
+ * corresponds to a particular definition. This information is intended
1931
+ * to be useful to IDEs, code indexers, documentation generators, and similar
1932
+ * tools.
1933
+ *
1934
+ * For example, say we have a file like:
1935
+ * message Foo {
1936
+ * optional string foo = 1;
1937
+ * }
1938
+ * Let's look at just the field definition:
1939
+ * optional string foo = 1;
1940
+ * ^ ^^ ^^ ^ ^^^
1941
+ * a bc de f ghi
1942
+ * We have the following locations:
1943
+ * span path represents
1944
+ * [a,i) [ 4, 0, 2, 0 ] The whole field definition.
1945
+ * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
1946
+ * [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
1947
+ * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
1948
+ * [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
1949
+ *
1950
+ * Notes:
1951
+ * - A location may refer to a repeated field itself (i.e. not to any
1952
+ * particular index within it). This is used whenever a set of elements are
1953
+ * logically enclosed in a single code segment. For example, an entire
1954
+ * extend block (possibly containing multiple extension definitions) will
1955
+ * have an outer location whose path refers to the "extensions" repeated
1956
+ * field without an index.
1957
+ * - Multiple locations may have the same path. This happens when a single
1958
+ * logical declaration is spread out across multiple places. The most
1959
+ * obvious example is the "extend" block again -- there may be multiple
1960
+ * extend blocks in the same scope, each of which will have the same path.
1961
+ * - A location's span is not always a subset of its parent's span. For
1962
+ * example, the "extendee" of an extension declaration appears at the
1963
+ * beginning of the "extend" block and is shared by all extensions within
1964
+ * the block.
1965
+ * - Just because a location's span is a subset of some other location's span
1966
+ * does not mean that it is a descendant. For example, a "group" defines
1967
+ * both a type and a field in a single declaration. Thus, the locations
1968
+ * corresponding to the type and field and their components will overlap.
1969
+ * - Code which tries to interpret locations should probably be designed to
1970
+ * ignore those that it doesn't understand, as more types of locations could
1971
+ * be recorded in the future.
1972
+ *
1973
+ * @generated from field: repeated google.protobuf.SourceCodeInfo.Location location = 1;
1974
+ */
1975
+ this.location = [];
1976
+ proto2.util.initPartial(data, this);
1977
+ }
1978
+ static fromBinary(bytes, options) {
1979
+ return new SourceCodeInfo().fromBinary(bytes, options);
1980
+ }
1981
+ static fromJson(jsonValue, options) {
1982
+ return new SourceCodeInfo().fromJson(jsonValue, options);
1983
+ }
1984
+ static fromJsonString(jsonString, options) {
1985
+ return new SourceCodeInfo().fromJsonString(jsonString, options);
1986
+ }
1987
+ static equals(a, b) {
1988
+ return proto2.util.equals(SourceCodeInfo, a, b);
1989
+ }
1990
+ }
1991
+ SourceCodeInfo.runtime = proto2;
1992
+ SourceCodeInfo.typeName = "google.protobuf.SourceCodeInfo";
1993
+ SourceCodeInfo.fields = proto2.util.newFieldList(() => [
1994
+ {
1995
+ no: 1,
1996
+ name: "location",
1997
+ kind: "message",
1998
+ T: SourceCodeInfo_Location,
1999
+ repeated: true,
2000
+ },
2001
+ ]);
2002
+ /**
2003
+ * @generated from message google.protobuf.SourceCodeInfo.Location
2004
+ */
2005
+ export class SourceCodeInfo_Location extends Message {
2006
+ constructor(data) {
2007
+ super();
2008
+ /**
2009
+ * Identifies which part of the FileDescriptorProto was defined at this
2010
+ * location.
2011
+ *
2012
+ * Each element is a field number or an index. They form a path from
2013
+ * the root FileDescriptorProto to the place where the definition. For
2014
+ * example, this path:
2015
+ * [ 4, 3, 2, 7, 1 ]
2016
+ * refers to:
2017
+ * file.message_type(3) // 4, 3
2018
+ * .field(7) // 2, 7
2019
+ * .name() // 1
2020
+ * This is because FileDescriptorProto.message_type has field number 4:
2021
+ * repeated DescriptorProto message_type = 4;
2022
+ * and DescriptorProto.field has field number 2:
2023
+ * repeated FieldDescriptorProto field = 2;
2024
+ * and FieldDescriptorProto.name has field number 1:
2025
+ * optional string name = 1;
2026
+ *
2027
+ * Thus, the above path gives the location of a field name. If we removed
2028
+ * the last element:
2029
+ * [ 4, 3, 2, 7 ]
2030
+ * this path refers to the whole field declaration (from the beginning
2031
+ * of the label to the terminating semicolon).
2032
+ *
2033
+ * @generated from field: repeated int32 path = 1 [packed = true];
2034
+ */
2035
+ this.path = [];
2036
+ /**
2037
+ * Always has exactly three or four elements: start line, start column,
2038
+ * end line (optional, otherwise assumed same as start line), end column.
2039
+ * These are packed into a single field for efficiency. Note that line
2040
+ * and column numbers are zero-based -- typically you will want to add
2041
+ * 1 to each before displaying to a user.
2042
+ *
2043
+ * @generated from field: repeated int32 span = 2 [packed = true];
2044
+ */
2045
+ this.span = [];
2046
+ /**
2047
+ * @generated from field: repeated string leading_detached_comments = 6;
2048
+ */
2049
+ this.leadingDetachedComments = [];
2050
+ proto2.util.initPartial(data, this);
2051
+ }
2052
+ static fromBinary(bytes, options) {
2053
+ return new SourceCodeInfo_Location().fromBinary(bytes, options);
2054
+ }
2055
+ static fromJson(jsonValue, options) {
2056
+ return new SourceCodeInfo_Location().fromJson(jsonValue, options);
2057
+ }
2058
+ static fromJsonString(jsonString, options) {
2059
+ return new SourceCodeInfo_Location().fromJsonString(jsonString, options);
2060
+ }
2061
+ static equals(a, b) {
2062
+ return proto2.util.equals(SourceCodeInfo_Location, a, b);
2063
+ }
2064
+ }
2065
+ SourceCodeInfo_Location.runtime = proto2;
2066
+ SourceCodeInfo_Location.typeName = "google.protobuf.SourceCodeInfo.Location";
2067
+ SourceCodeInfo_Location.fields = proto2.util.newFieldList(() => [
2068
+ {
2069
+ no: 1,
2070
+ name: "path",
2071
+ kind: "scalar",
2072
+ T: 5 /* ScalarType.INT32 */,
2073
+ repeated: true,
2074
+ packed: true,
2075
+ },
2076
+ {
2077
+ no: 2,
2078
+ name: "span",
2079
+ kind: "scalar",
2080
+ T: 5 /* ScalarType.INT32 */,
2081
+ repeated: true,
2082
+ packed: true,
2083
+ },
2084
+ {
2085
+ no: 3,
2086
+ name: "leading_comments",
2087
+ kind: "scalar",
2088
+ T: 9 /* ScalarType.STRING */,
2089
+ opt: true,
2090
+ },
2091
+ {
2092
+ no: 4,
2093
+ name: "trailing_comments",
2094
+ kind: "scalar",
2095
+ T: 9 /* ScalarType.STRING */,
2096
+ opt: true,
2097
+ },
2098
+ {
2099
+ no: 6,
2100
+ name: "leading_detached_comments",
2101
+ kind: "scalar",
2102
+ T: 9 /* ScalarType.STRING */,
2103
+ repeated: true,
2104
+ },
2105
+ ]);
2106
+ /**
2107
+ * Describes the relationship between generated code and its original source
2108
+ * file. A GeneratedCodeInfo message is associated with only one generated
2109
+ * source file, but may contain references to different source .proto files.
2110
+ *
2111
+ * @generated from message google.protobuf.GeneratedCodeInfo
2112
+ */
2113
+ export class GeneratedCodeInfo extends Message {
2114
+ constructor(data) {
2115
+ super();
2116
+ /**
2117
+ * An Annotation connects some span of text in generated code to an element
2118
+ * of its generating .proto file.
2119
+ *
2120
+ * @generated from field: repeated google.protobuf.GeneratedCodeInfo.Annotation annotation = 1;
2121
+ */
2122
+ this.annotation = [];
2123
+ proto2.util.initPartial(data, this);
2124
+ }
2125
+ static fromBinary(bytes, options) {
2126
+ return new GeneratedCodeInfo().fromBinary(bytes, options);
2127
+ }
2128
+ static fromJson(jsonValue, options) {
2129
+ return new GeneratedCodeInfo().fromJson(jsonValue, options);
2130
+ }
2131
+ static fromJsonString(jsonString, options) {
2132
+ return new GeneratedCodeInfo().fromJsonString(jsonString, options);
2133
+ }
2134
+ static equals(a, b) {
2135
+ return proto2.util.equals(GeneratedCodeInfo, a, b);
2136
+ }
2137
+ }
2138
+ GeneratedCodeInfo.runtime = proto2;
2139
+ GeneratedCodeInfo.typeName = "google.protobuf.GeneratedCodeInfo";
2140
+ GeneratedCodeInfo.fields = proto2.util.newFieldList(() => [
2141
+ {
2142
+ no: 1,
2143
+ name: "annotation",
2144
+ kind: "message",
2145
+ T: GeneratedCodeInfo_Annotation,
2146
+ repeated: true,
2147
+ },
2148
+ ]);
2149
+ /**
2150
+ * @generated from message google.protobuf.GeneratedCodeInfo.Annotation
2151
+ */
2152
+ export class GeneratedCodeInfo_Annotation extends Message {
2153
+ constructor(data) {
2154
+ super();
2155
+ /**
2156
+ * Identifies the element in the original source .proto file. This field
2157
+ * is formatted the same as SourceCodeInfo.Location.path.
2158
+ *
2159
+ * @generated from field: repeated int32 path = 1 [packed = true];
2160
+ */
2161
+ this.path = [];
2162
+ proto2.util.initPartial(data, this);
2163
+ }
2164
+ static fromBinary(bytes, options) {
2165
+ return new GeneratedCodeInfo_Annotation().fromBinary(bytes, options);
2166
+ }
2167
+ static fromJson(jsonValue, options) {
2168
+ return new GeneratedCodeInfo_Annotation().fromJson(jsonValue, options);
2169
+ }
2170
+ static fromJsonString(jsonString, options) {
2171
+ return new GeneratedCodeInfo_Annotation().fromJsonString(
2172
+ jsonString,
2173
+ options
2174
+ );
2175
+ }
2176
+ static equals(a, b) {
2177
+ return proto2.util.equals(GeneratedCodeInfo_Annotation, a, b);
2178
+ }
2179
+ }
2180
+ GeneratedCodeInfo_Annotation.runtime = proto2;
2181
+ GeneratedCodeInfo_Annotation.typeName =
2182
+ "google.protobuf.GeneratedCodeInfo.Annotation";
2183
+ GeneratedCodeInfo_Annotation.fields = proto2.util.newFieldList(() => [
2184
+ {
2185
+ no: 1,
2186
+ name: "path",
2187
+ kind: "scalar",
2188
+ T: 5 /* ScalarType.INT32 */,
2189
+ repeated: true,
2190
+ packed: true,
2191
+ },
2192
+ {
2193
+ no: 2,
2194
+ name: "source_file",
2195
+ kind: "scalar",
2196
+ T: 9 /* ScalarType.STRING */,
2197
+ opt: true,
2198
+ },
2199
+ {
2200
+ no: 3,
2201
+ name: "begin",
2202
+ kind: "scalar",
2203
+ T: 5 /* ScalarType.INT32 */,
2204
+ opt: true,
2205
+ },
2206
+ {
2207
+ no: 4,
2208
+ name: "end",
2209
+ kind: "scalar",
2210
+ T: 5 /* ScalarType.INT32 */,
2211
+ opt: true,
2212
+ },
2213
+ ]);