@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,613 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ // @generated by protoc-gen-es v0.0.1-alpha.1 with parameter "bootstrap_wkt=true,ts_nocheck=false"
4
+ // @generated from file google/protobuf/type.proto (package google.protobuf, syntax proto3)
5
+ //
6
+ // Protocol Buffers - Google's data interchange format
7
+ // Copyright 2008 Google Inc. All rights reserved.
8
+ // https://developers.google.com/protocol-buffers/
9
+ //
10
+ // Redistribution and use in source and binary forms, with or without
11
+ // modification, are permitted provided that the following conditions are
12
+ // met:
13
+ //
14
+ // * Redistributions of source code must retain the above copyright
15
+ // notice, this list of conditions and the following disclaimer.
16
+ // * Redistributions in binary form must reproduce the above
17
+ // copyright notice, this list of conditions and the following disclaimer
18
+ // in the documentation and/or other materials provided with the
19
+ // distribution.
20
+ // * Neither the name of Google Inc. nor the names of its
21
+ // contributors may be used to endorse or promote products derived from
22
+ // this software without specific prior written permission.
23
+ //
24
+ // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25
+ // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26
+ // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27
+ // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28
+ // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29
+ // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30
+ // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31
+ // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32
+ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33
+ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34
+ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.Option =
37
+ exports.EnumValue =
38
+ exports.Enum =
39
+ exports.Field_Cardinality =
40
+ exports.Field_Kind =
41
+ exports.Field =
42
+ exports.Type =
43
+ exports.Syntax =
44
+ void 0;
45
+ const index_js_1 = require("../../index.js");
46
+ const source_context_pb_js_1 = require("./source_context_pb.js");
47
+ const any_pb_js_1 = require("./any_pb.js");
48
+ /**
49
+ * The syntax in which a protocol buffer element is defined.
50
+ *
51
+ * @generated from enum google.protobuf.Syntax
52
+ */
53
+ var Syntax;
54
+ (function (Syntax) {
55
+ /**
56
+ * Syntax `proto2`.
57
+ *
58
+ * @generated from enum value: SYNTAX_PROTO2 = 0;
59
+ */
60
+ Syntax[(Syntax["PROTO2"] = 0)] = "PROTO2";
61
+ /**
62
+ * Syntax `proto3`.
63
+ *
64
+ * @generated from enum value: SYNTAX_PROTO3 = 1;
65
+ */
66
+ Syntax[(Syntax["PROTO3"] = 1)] = "PROTO3";
67
+ })((Syntax = exports.Syntax || (exports.Syntax = {})));
68
+ // Retrieve enum metadata with: proto3.getEnumType(Syntax)
69
+ index_js_1.proto3.util.setEnumType(Syntax, "google.protobuf.Syntax", [
70
+ { no: 0, name: "SYNTAX_PROTO2" },
71
+ { no: 1, name: "SYNTAX_PROTO3" },
72
+ ]);
73
+ /**
74
+ * A protocol buffer message type.
75
+ *
76
+ * @generated from message google.protobuf.Type
77
+ */
78
+ class Type extends index_js_1.Message {
79
+ constructor(data) {
80
+ super();
81
+ /**
82
+ * The fully qualified message name.
83
+ *
84
+ * @generated from field: string name = 1;
85
+ */
86
+ this.name = "";
87
+ /**
88
+ * The list of fields.
89
+ *
90
+ * @generated from field: repeated google.protobuf.Field fields = 2;
91
+ */
92
+ this.fields = [];
93
+ /**
94
+ * The list of types appearing in `oneof` definitions in this type.
95
+ *
96
+ * @generated from field: repeated string oneofs = 3;
97
+ */
98
+ this.oneofs = [];
99
+ /**
100
+ * The protocol buffer options.
101
+ *
102
+ * @generated from field: repeated google.protobuf.Option options = 4;
103
+ */
104
+ this.options = [];
105
+ /**
106
+ * The source syntax.
107
+ *
108
+ * @generated from field: google.protobuf.Syntax syntax = 6;
109
+ */
110
+ this.syntax = Syntax.PROTO2;
111
+ index_js_1.proto3.util.initPartial(data, this);
112
+ }
113
+ static fromBinary(bytes, options) {
114
+ return new Type().fromBinary(bytes, options);
115
+ }
116
+ static fromJson(jsonValue, options) {
117
+ return new Type().fromJson(jsonValue, options);
118
+ }
119
+ static fromJsonString(jsonString, options) {
120
+ return new Type().fromJsonString(jsonString, options);
121
+ }
122
+ static equals(a, b) {
123
+ return index_js_1.proto3.util.equals(Type, a, b);
124
+ }
125
+ }
126
+ exports.Type = Type;
127
+ Type.runtime = index_js_1.proto3;
128
+ Type.typeName = "google.protobuf.Type";
129
+ Type.fields = index_js_1.proto3.util.newFieldList(() => [
130
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
131
+ { no: 2, name: "fields", kind: "message", T: Field, repeated: true },
132
+ {
133
+ no: 3,
134
+ name: "oneofs",
135
+ kind: "scalar",
136
+ T: 9 /* ScalarType.STRING */,
137
+ repeated: true,
138
+ },
139
+ { no: 4, name: "options", kind: "message", T: Option, repeated: true },
140
+ {
141
+ no: 5,
142
+ name: "source_context",
143
+ kind: "message",
144
+ T: source_context_pb_js_1.SourceContext,
145
+ },
146
+ {
147
+ no: 6,
148
+ name: "syntax",
149
+ kind: "enum",
150
+ T: index_js_1.proto3.getEnumType(Syntax),
151
+ },
152
+ ]);
153
+ /**
154
+ * A single field of a message type.
155
+ *
156
+ * @generated from message google.protobuf.Field
157
+ */
158
+ class Field extends index_js_1.Message {
159
+ constructor(data) {
160
+ super();
161
+ /**
162
+ * The field type.
163
+ *
164
+ * @generated from field: google.protobuf.Field.Kind kind = 1;
165
+ */
166
+ this.kind = Field_Kind.TYPE_UNKNOWN;
167
+ /**
168
+ * The field cardinality.
169
+ *
170
+ * @generated from field: google.protobuf.Field.Cardinality cardinality = 2;
171
+ */
172
+ this.cardinality = Field_Cardinality.UNKNOWN;
173
+ /**
174
+ * The field number.
175
+ *
176
+ * @generated from field: int32 number = 3;
177
+ */
178
+ this.number = 0;
179
+ /**
180
+ * The field name.
181
+ *
182
+ * @generated from field: string name = 4;
183
+ */
184
+ this.name = "";
185
+ /**
186
+ * The field type URL, without the scheme, for message or enumeration
187
+ * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
188
+ *
189
+ * @generated from field: string type_url = 6;
190
+ */
191
+ this.typeUrl = "";
192
+ /**
193
+ * The index of the field type in `Type.oneofs`, for message or enumeration
194
+ * types. The first type has index 1; zero means the type is not in the list.
195
+ *
196
+ * @generated from field: int32 oneof_index = 7;
197
+ */
198
+ this.oneofIndex = 0;
199
+ /**
200
+ * Whether to use alternative packed wire representation.
201
+ *
202
+ * @generated from field: bool packed = 8;
203
+ */
204
+ this.packed = false;
205
+ /**
206
+ * The protocol buffer options.
207
+ *
208
+ * @generated from field: repeated google.protobuf.Option options = 9;
209
+ */
210
+ this.options = [];
211
+ /**
212
+ * The field JSON name.
213
+ *
214
+ * @generated from field: string json_name = 10;
215
+ */
216
+ this.jsonName = "";
217
+ /**
218
+ * The string value of the default value of this field. Proto2 syntax only.
219
+ *
220
+ * @generated from field: string default_value = 11;
221
+ */
222
+ this.defaultValue = "";
223
+ index_js_1.proto3.util.initPartial(data, this);
224
+ }
225
+ static fromBinary(bytes, options) {
226
+ return new Field().fromBinary(bytes, options);
227
+ }
228
+ static fromJson(jsonValue, options) {
229
+ return new Field().fromJson(jsonValue, options);
230
+ }
231
+ static fromJsonString(jsonString, options) {
232
+ return new Field().fromJsonString(jsonString, options);
233
+ }
234
+ static equals(a, b) {
235
+ return index_js_1.proto3.util.equals(Field, a, b);
236
+ }
237
+ }
238
+ exports.Field = Field;
239
+ Field.runtime = index_js_1.proto3;
240
+ Field.typeName = "google.protobuf.Field";
241
+ Field.fields = index_js_1.proto3.util.newFieldList(() => [
242
+ {
243
+ no: 1,
244
+ name: "kind",
245
+ kind: "enum",
246
+ T: index_js_1.proto3.getEnumType(Field_Kind),
247
+ },
248
+ {
249
+ no: 2,
250
+ name: "cardinality",
251
+ kind: "enum",
252
+ T: index_js_1.proto3.getEnumType(Field_Cardinality),
253
+ },
254
+ { no: 3, name: "number", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
255
+ { no: 4, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
256
+ { no: 6, name: "type_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
257
+ { no: 7, name: "oneof_index", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
258
+ { no: 8, name: "packed", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
259
+ { no: 9, name: "options", kind: "message", T: Option, repeated: true },
260
+ { no: 10, name: "json_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
261
+ {
262
+ no: 11,
263
+ name: "default_value",
264
+ kind: "scalar",
265
+ T: 9 /* ScalarType.STRING */,
266
+ },
267
+ ]);
268
+ /**
269
+ * Basic field types.
270
+ *
271
+ * @generated from enum google.protobuf.Field.Kind
272
+ */
273
+ var Field_Kind;
274
+ (function (Field_Kind) {
275
+ /**
276
+ * Field type unknown.
277
+ *
278
+ * @generated from enum value: TYPE_UNKNOWN = 0;
279
+ */
280
+ Field_Kind[(Field_Kind["TYPE_UNKNOWN"] = 0)] = "TYPE_UNKNOWN";
281
+ /**
282
+ * Field type double.
283
+ *
284
+ * @generated from enum value: TYPE_DOUBLE = 1;
285
+ */
286
+ Field_Kind[(Field_Kind["TYPE_DOUBLE"] = 1)] = "TYPE_DOUBLE";
287
+ /**
288
+ * Field type float.
289
+ *
290
+ * @generated from enum value: TYPE_FLOAT = 2;
291
+ */
292
+ Field_Kind[(Field_Kind["TYPE_FLOAT"] = 2)] = "TYPE_FLOAT";
293
+ /**
294
+ * Field type int64.
295
+ *
296
+ * @generated from enum value: TYPE_INT64 = 3;
297
+ */
298
+ Field_Kind[(Field_Kind["TYPE_INT64"] = 3)] = "TYPE_INT64";
299
+ /**
300
+ * Field type uint64.
301
+ *
302
+ * @generated from enum value: TYPE_UINT64 = 4;
303
+ */
304
+ Field_Kind[(Field_Kind["TYPE_UINT64"] = 4)] = "TYPE_UINT64";
305
+ /**
306
+ * Field type int32.
307
+ *
308
+ * @generated from enum value: TYPE_INT32 = 5;
309
+ */
310
+ Field_Kind[(Field_Kind["TYPE_INT32"] = 5)] = "TYPE_INT32";
311
+ /**
312
+ * Field type fixed64.
313
+ *
314
+ * @generated from enum value: TYPE_FIXED64 = 6;
315
+ */
316
+ Field_Kind[(Field_Kind["TYPE_FIXED64"] = 6)] = "TYPE_FIXED64";
317
+ /**
318
+ * Field type fixed32.
319
+ *
320
+ * @generated from enum value: TYPE_FIXED32 = 7;
321
+ */
322
+ Field_Kind[(Field_Kind["TYPE_FIXED32"] = 7)] = "TYPE_FIXED32";
323
+ /**
324
+ * Field type bool.
325
+ *
326
+ * @generated from enum value: TYPE_BOOL = 8;
327
+ */
328
+ Field_Kind[(Field_Kind["TYPE_BOOL"] = 8)] = "TYPE_BOOL";
329
+ /**
330
+ * Field type string.
331
+ *
332
+ * @generated from enum value: TYPE_STRING = 9;
333
+ */
334
+ Field_Kind[(Field_Kind["TYPE_STRING"] = 9)] = "TYPE_STRING";
335
+ /**
336
+ * Field type group. Proto2 syntax only, and deprecated.
337
+ *
338
+ * @generated from enum value: TYPE_GROUP = 10;
339
+ */
340
+ Field_Kind[(Field_Kind["TYPE_GROUP"] = 10)] = "TYPE_GROUP";
341
+ /**
342
+ * Field type message.
343
+ *
344
+ * @generated from enum value: TYPE_MESSAGE = 11;
345
+ */
346
+ Field_Kind[(Field_Kind["TYPE_MESSAGE"] = 11)] = "TYPE_MESSAGE";
347
+ /**
348
+ * Field type bytes.
349
+ *
350
+ * @generated from enum value: TYPE_BYTES = 12;
351
+ */
352
+ Field_Kind[(Field_Kind["TYPE_BYTES"] = 12)] = "TYPE_BYTES";
353
+ /**
354
+ * Field type uint32.
355
+ *
356
+ * @generated from enum value: TYPE_UINT32 = 13;
357
+ */
358
+ Field_Kind[(Field_Kind["TYPE_UINT32"] = 13)] = "TYPE_UINT32";
359
+ /**
360
+ * Field type enum.
361
+ *
362
+ * @generated from enum value: TYPE_ENUM = 14;
363
+ */
364
+ Field_Kind[(Field_Kind["TYPE_ENUM"] = 14)] = "TYPE_ENUM";
365
+ /**
366
+ * Field type sfixed32.
367
+ *
368
+ * @generated from enum value: TYPE_SFIXED32 = 15;
369
+ */
370
+ Field_Kind[(Field_Kind["TYPE_SFIXED32"] = 15)] = "TYPE_SFIXED32";
371
+ /**
372
+ * Field type sfixed64.
373
+ *
374
+ * @generated from enum value: TYPE_SFIXED64 = 16;
375
+ */
376
+ Field_Kind[(Field_Kind["TYPE_SFIXED64"] = 16)] = "TYPE_SFIXED64";
377
+ /**
378
+ * Field type sint32.
379
+ *
380
+ * @generated from enum value: TYPE_SINT32 = 17;
381
+ */
382
+ Field_Kind[(Field_Kind["TYPE_SINT32"] = 17)] = "TYPE_SINT32";
383
+ /**
384
+ * Field type sint64.
385
+ *
386
+ * @generated from enum value: TYPE_SINT64 = 18;
387
+ */
388
+ Field_Kind[(Field_Kind["TYPE_SINT64"] = 18)] = "TYPE_SINT64";
389
+ })((Field_Kind = exports.Field_Kind || (exports.Field_Kind = {})));
390
+ // Retrieve enum metadata with: proto3.getEnumType(Field_Kind)
391
+ index_js_1.proto3.util.setEnumType(Field_Kind, "google.protobuf.Field.Kind", [
392
+ { no: 0, name: "TYPE_UNKNOWN" },
393
+ { no: 1, name: "TYPE_DOUBLE" },
394
+ { no: 2, name: "TYPE_FLOAT" },
395
+ { no: 3, name: "TYPE_INT64" },
396
+ { no: 4, name: "TYPE_UINT64" },
397
+ { no: 5, name: "TYPE_INT32" },
398
+ { no: 6, name: "TYPE_FIXED64" },
399
+ { no: 7, name: "TYPE_FIXED32" },
400
+ { no: 8, name: "TYPE_BOOL" },
401
+ { no: 9, name: "TYPE_STRING" },
402
+ { no: 10, name: "TYPE_GROUP" },
403
+ { no: 11, name: "TYPE_MESSAGE" },
404
+ { no: 12, name: "TYPE_BYTES" },
405
+ { no: 13, name: "TYPE_UINT32" },
406
+ { no: 14, name: "TYPE_ENUM" },
407
+ { no: 15, name: "TYPE_SFIXED32" },
408
+ { no: 16, name: "TYPE_SFIXED64" },
409
+ { no: 17, name: "TYPE_SINT32" },
410
+ { no: 18, name: "TYPE_SINT64" },
411
+ ]);
412
+ /**
413
+ * Whether a field is optional, required, or repeated.
414
+ *
415
+ * @generated from enum google.protobuf.Field.Cardinality
416
+ */
417
+ var Field_Cardinality;
418
+ (function (Field_Cardinality) {
419
+ /**
420
+ * For fields with unknown cardinality.
421
+ *
422
+ * @generated from enum value: CARDINALITY_UNKNOWN = 0;
423
+ */
424
+ Field_Cardinality[(Field_Cardinality["UNKNOWN"] = 0)] = "UNKNOWN";
425
+ /**
426
+ * For optional fields.
427
+ *
428
+ * @generated from enum value: CARDINALITY_OPTIONAL = 1;
429
+ */
430
+ Field_Cardinality[(Field_Cardinality["OPTIONAL"] = 1)] = "OPTIONAL";
431
+ /**
432
+ * For required fields. Proto2 syntax only.
433
+ *
434
+ * @generated from enum value: CARDINALITY_REQUIRED = 2;
435
+ */
436
+ Field_Cardinality[(Field_Cardinality["REQUIRED"] = 2)] = "REQUIRED";
437
+ /**
438
+ * For repeated fields.
439
+ *
440
+ * @generated from enum value: CARDINALITY_REPEATED = 3;
441
+ */
442
+ Field_Cardinality[(Field_Cardinality["REPEATED"] = 3)] = "REPEATED";
443
+ })(
444
+ (Field_Cardinality =
445
+ exports.Field_Cardinality || (exports.Field_Cardinality = {}))
446
+ );
447
+ // Retrieve enum metadata with: proto3.getEnumType(Field_Cardinality)
448
+ index_js_1.proto3.util.setEnumType(
449
+ Field_Cardinality,
450
+ "google.protobuf.Field.Cardinality",
451
+ [
452
+ { no: 0, name: "CARDINALITY_UNKNOWN" },
453
+ { no: 1, name: "CARDINALITY_OPTIONAL" },
454
+ { no: 2, name: "CARDINALITY_REQUIRED" },
455
+ { no: 3, name: "CARDINALITY_REPEATED" },
456
+ ]
457
+ );
458
+ /**
459
+ * Enum type definition.
460
+ *
461
+ * @generated from message google.protobuf.Enum
462
+ */
463
+ class Enum extends index_js_1.Message {
464
+ constructor(data) {
465
+ super();
466
+ /**
467
+ * Enum type name.
468
+ *
469
+ * @generated from field: string name = 1;
470
+ */
471
+ this.name = "";
472
+ /**
473
+ * Enum value definitions.
474
+ *
475
+ * @generated from field: repeated google.protobuf.EnumValue enumvalue = 2;
476
+ */
477
+ this.enumvalue = [];
478
+ /**
479
+ * Protocol buffer options.
480
+ *
481
+ * @generated from field: repeated google.protobuf.Option options = 3;
482
+ */
483
+ this.options = [];
484
+ /**
485
+ * The source syntax.
486
+ *
487
+ * @generated from field: google.protobuf.Syntax syntax = 5;
488
+ */
489
+ this.syntax = Syntax.PROTO2;
490
+ index_js_1.proto3.util.initPartial(data, this);
491
+ }
492
+ static fromBinary(bytes, options) {
493
+ return new Enum().fromBinary(bytes, options);
494
+ }
495
+ static fromJson(jsonValue, options) {
496
+ return new Enum().fromJson(jsonValue, options);
497
+ }
498
+ static fromJsonString(jsonString, options) {
499
+ return new Enum().fromJsonString(jsonString, options);
500
+ }
501
+ static equals(a, b) {
502
+ return index_js_1.proto3.util.equals(Enum, a, b);
503
+ }
504
+ }
505
+ exports.Enum = Enum;
506
+ Enum.runtime = index_js_1.proto3;
507
+ Enum.typeName = "google.protobuf.Enum";
508
+ Enum.fields = index_js_1.proto3.util.newFieldList(() => [
509
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
510
+ { no: 2, name: "enumvalue", kind: "message", T: EnumValue, repeated: true },
511
+ { no: 3, name: "options", kind: "message", T: Option, repeated: true },
512
+ {
513
+ no: 4,
514
+ name: "source_context",
515
+ kind: "message",
516
+ T: source_context_pb_js_1.SourceContext,
517
+ },
518
+ {
519
+ no: 5,
520
+ name: "syntax",
521
+ kind: "enum",
522
+ T: index_js_1.proto3.getEnumType(Syntax),
523
+ },
524
+ ]);
525
+ /**
526
+ * Enum value definition.
527
+ *
528
+ * @generated from message google.protobuf.EnumValue
529
+ */
530
+ class EnumValue extends index_js_1.Message {
531
+ constructor(data) {
532
+ super();
533
+ /**
534
+ * Enum value name.
535
+ *
536
+ * @generated from field: string name = 1;
537
+ */
538
+ this.name = "";
539
+ /**
540
+ * Enum value number.
541
+ *
542
+ * @generated from field: int32 number = 2;
543
+ */
544
+ this.number = 0;
545
+ /**
546
+ * Protocol buffer options.
547
+ *
548
+ * @generated from field: repeated google.protobuf.Option options = 3;
549
+ */
550
+ this.options = [];
551
+ index_js_1.proto3.util.initPartial(data, this);
552
+ }
553
+ static fromBinary(bytes, options) {
554
+ return new EnumValue().fromBinary(bytes, options);
555
+ }
556
+ static fromJson(jsonValue, options) {
557
+ return new EnumValue().fromJson(jsonValue, options);
558
+ }
559
+ static fromJsonString(jsonString, options) {
560
+ return new EnumValue().fromJsonString(jsonString, options);
561
+ }
562
+ static equals(a, b) {
563
+ return index_js_1.proto3.util.equals(EnumValue, a, b);
564
+ }
565
+ }
566
+ exports.EnumValue = EnumValue;
567
+ EnumValue.runtime = index_js_1.proto3;
568
+ EnumValue.typeName = "google.protobuf.EnumValue";
569
+ EnumValue.fields = index_js_1.proto3.util.newFieldList(() => [
570
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
571
+ { no: 2, name: "number", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
572
+ { no: 3, name: "options", kind: "message", T: Option, repeated: true },
573
+ ]);
574
+ /**
575
+ * A protocol buffer option, which can be attached to a message, field,
576
+ * enumeration, etc.
577
+ *
578
+ * @generated from message google.protobuf.Option
579
+ */
580
+ class Option extends index_js_1.Message {
581
+ constructor(data) {
582
+ super();
583
+ /**
584
+ * The option's name. For protobuf built-in options (options defined in
585
+ * descriptor.proto), this is the short name. For example, `"map_entry"`.
586
+ * For custom options, it should be the fully-qualified name. For example,
587
+ * `"google.api.http"`.
588
+ *
589
+ * @generated from field: string name = 1;
590
+ */
591
+ this.name = "";
592
+ index_js_1.proto3.util.initPartial(data, this);
593
+ }
594
+ static fromBinary(bytes, options) {
595
+ return new Option().fromBinary(bytes, options);
596
+ }
597
+ static fromJson(jsonValue, options) {
598
+ return new Option().fromJson(jsonValue, options);
599
+ }
600
+ static fromJsonString(jsonString, options) {
601
+ return new Option().fromJsonString(jsonString, options);
602
+ }
603
+ static equals(a, b) {
604
+ return index_js_1.proto3.util.equals(Option, a, b);
605
+ }
606
+ }
607
+ exports.Option = Option;
608
+ Option.runtime = index_js_1.proto3;
609
+ Option.typeName = "google.protobuf.Option";
610
+ Option.fields = index_js_1.proto3.util.newFieldList(() => [
611
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
612
+ { no: 2, name: "value", kind: "message", T: any_pb_js_1.Any },
613
+ ]);