@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,574 @@
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/wrappers.proto (package google.protobuf, syntax proto3)
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
+ // Wrappers for primitive (non-message) types. These types are useful
35
+ // for embedding primitives in the `google.protobuf.Any` type and for places
36
+ // where we need to distinguish between the absence of a primitive
37
+ // typed field and its default value.
38
+ //
39
+ // These wrappers have no meaningful use within repeated fields as they lack
40
+ // the ability to detect presence on individual elements.
41
+ // These wrappers have no meaningful use within a map or a oneof since
42
+ // individual entries of a map or fields of a oneof can already detect presence.
43
+ import { Message, ScalarType, proto3, protoInt64 } from "../../index.js";
44
+ /**
45
+ * Wrapper message for `double`.
46
+ *
47
+ * The JSON representation for `DoubleValue` is JSON number.
48
+ *
49
+ * @generated from message google.protobuf.DoubleValue
50
+ */
51
+ export class DoubleValue extends Message {
52
+ constructor(data) {
53
+ super();
54
+ /**
55
+ * The double value.
56
+ *
57
+ * @generated from field: double value = 1;
58
+ */
59
+ this.value = 0;
60
+ proto3.util.initPartial(data, this);
61
+ }
62
+ toJson(options) {
63
+ return proto3.json.writeScalar(ScalarType.DOUBLE, this.value, true);
64
+ }
65
+ fromJson(json, options) {
66
+ try {
67
+ this.value = proto3.json.readScalar(ScalarType.DOUBLE, json);
68
+ } catch (e) {
69
+ let m = `cannot decode message google.protobuf.DoubleValue from JSON"`;
70
+ if (e instanceof Error && e.message.length > 0) {
71
+ m += `: ${e.message}`;
72
+ }
73
+ throw new Error(m);
74
+ }
75
+ return this;
76
+ }
77
+ static fromBinary(bytes, options) {
78
+ return new DoubleValue().fromBinary(bytes, options);
79
+ }
80
+ static fromJson(jsonValue, options) {
81
+ return new DoubleValue().fromJson(jsonValue, options);
82
+ }
83
+ static fromJsonString(jsonString, options) {
84
+ return new DoubleValue().fromJsonString(jsonString, options);
85
+ }
86
+ static equals(a, b) {
87
+ return proto3.util.equals(DoubleValue, a, b);
88
+ }
89
+ }
90
+ DoubleValue.runtime = proto3;
91
+ DoubleValue.typeName = "google.protobuf.DoubleValue";
92
+ DoubleValue.fields = proto3.util.newFieldList(() => [
93
+ { no: 1, name: "value", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
94
+ ]);
95
+ DoubleValue.fieldWrapper = {
96
+ wrapField(value) {
97
+ return value instanceof DoubleValue ? value : new DoubleValue({ value });
98
+ },
99
+ unwrapField(value) {
100
+ return value.value;
101
+ },
102
+ };
103
+ /**
104
+ * Wrapper message for `float`.
105
+ *
106
+ * The JSON representation for `FloatValue` is JSON number.
107
+ *
108
+ * @generated from message google.protobuf.FloatValue
109
+ */
110
+ export class FloatValue extends Message {
111
+ constructor(data) {
112
+ super();
113
+ /**
114
+ * The float value.
115
+ *
116
+ * @generated from field: float value = 1;
117
+ */
118
+ this.value = 0;
119
+ proto3.util.initPartial(data, this);
120
+ }
121
+ toJson(options) {
122
+ return proto3.json.writeScalar(ScalarType.FLOAT, this.value, true);
123
+ }
124
+ fromJson(json, options) {
125
+ try {
126
+ this.value = proto3.json.readScalar(ScalarType.FLOAT, json);
127
+ } catch (e) {
128
+ let m = `cannot decode message google.protobuf.FloatValue from JSON"`;
129
+ if (e instanceof Error && e.message.length > 0) {
130
+ m += `: ${e.message}`;
131
+ }
132
+ throw new Error(m);
133
+ }
134
+ return this;
135
+ }
136
+ static fromBinary(bytes, options) {
137
+ return new FloatValue().fromBinary(bytes, options);
138
+ }
139
+ static fromJson(jsonValue, options) {
140
+ return new FloatValue().fromJson(jsonValue, options);
141
+ }
142
+ static fromJsonString(jsonString, options) {
143
+ return new FloatValue().fromJsonString(jsonString, options);
144
+ }
145
+ static equals(a, b) {
146
+ return proto3.util.equals(FloatValue, a, b);
147
+ }
148
+ }
149
+ FloatValue.runtime = proto3;
150
+ FloatValue.typeName = "google.protobuf.FloatValue";
151
+ FloatValue.fields = proto3.util.newFieldList(() => [
152
+ { no: 1, name: "value", kind: "scalar", T: 2 /* ScalarType.FLOAT */ },
153
+ ]);
154
+ FloatValue.fieldWrapper = {
155
+ wrapField(value) {
156
+ return value instanceof FloatValue ? value : new FloatValue({ value });
157
+ },
158
+ unwrapField(value) {
159
+ return value.value;
160
+ },
161
+ };
162
+ /**
163
+ * Wrapper message for `int64`.
164
+ *
165
+ * The JSON representation for `Int64Value` is JSON string.
166
+ *
167
+ * @generated from message google.protobuf.Int64Value
168
+ */
169
+ export class Int64Value extends Message {
170
+ constructor(data) {
171
+ super();
172
+ /**
173
+ * The int64 value.
174
+ *
175
+ * @generated from field: int64 value = 1;
176
+ */
177
+ this.value = protoInt64.zero;
178
+ proto3.util.initPartial(data, this);
179
+ }
180
+ toJson(options) {
181
+ return proto3.json.writeScalar(ScalarType.INT64, this.value, true);
182
+ }
183
+ fromJson(json, options) {
184
+ try {
185
+ this.value = proto3.json.readScalar(ScalarType.INT64, json);
186
+ } catch (e) {
187
+ let m = `cannot decode message google.protobuf.Int64Value from JSON"`;
188
+ if (e instanceof Error && e.message.length > 0) {
189
+ m += `: ${e.message}`;
190
+ }
191
+ throw new Error(m);
192
+ }
193
+ return this;
194
+ }
195
+ static fromBinary(bytes, options) {
196
+ return new Int64Value().fromBinary(bytes, options);
197
+ }
198
+ static fromJson(jsonValue, options) {
199
+ return new Int64Value().fromJson(jsonValue, options);
200
+ }
201
+ static fromJsonString(jsonString, options) {
202
+ return new Int64Value().fromJsonString(jsonString, options);
203
+ }
204
+ static equals(a, b) {
205
+ return proto3.util.equals(Int64Value, a, b);
206
+ }
207
+ }
208
+ Int64Value.runtime = proto3;
209
+ Int64Value.typeName = "google.protobuf.Int64Value";
210
+ Int64Value.fields = proto3.util.newFieldList(() => [
211
+ { no: 1, name: "value", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
212
+ ]);
213
+ Int64Value.fieldWrapper = {
214
+ wrapField(value) {
215
+ return value instanceof Int64Value ? value : new Int64Value({ value });
216
+ },
217
+ unwrapField(value) {
218
+ return value.value;
219
+ },
220
+ };
221
+ /**
222
+ * Wrapper message for `uint64`.
223
+ *
224
+ * The JSON representation for `UInt64Value` is JSON string.
225
+ *
226
+ * @generated from message google.protobuf.UInt64Value
227
+ */
228
+ export class UInt64Value extends Message {
229
+ constructor(data) {
230
+ super();
231
+ /**
232
+ * The uint64 value.
233
+ *
234
+ * @generated from field: uint64 value = 1;
235
+ */
236
+ this.value = protoInt64.zero;
237
+ proto3.util.initPartial(data, this);
238
+ }
239
+ toJson(options) {
240
+ return proto3.json.writeScalar(ScalarType.UINT64, this.value, true);
241
+ }
242
+ fromJson(json, options) {
243
+ try {
244
+ this.value = proto3.json.readScalar(ScalarType.UINT64, json);
245
+ } catch (e) {
246
+ let m = `cannot decode message google.protobuf.UInt64Value from JSON"`;
247
+ if (e instanceof Error && e.message.length > 0) {
248
+ m += `: ${e.message}`;
249
+ }
250
+ throw new Error(m);
251
+ }
252
+ return this;
253
+ }
254
+ static fromBinary(bytes, options) {
255
+ return new UInt64Value().fromBinary(bytes, options);
256
+ }
257
+ static fromJson(jsonValue, options) {
258
+ return new UInt64Value().fromJson(jsonValue, options);
259
+ }
260
+ static fromJsonString(jsonString, options) {
261
+ return new UInt64Value().fromJsonString(jsonString, options);
262
+ }
263
+ static equals(a, b) {
264
+ return proto3.util.equals(UInt64Value, a, b);
265
+ }
266
+ }
267
+ UInt64Value.runtime = proto3;
268
+ UInt64Value.typeName = "google.protobuf.UInt64Value";
269
+ UInt64Value.fields = proto3.util.newFieldList(() => [
270
+ { no: 1, name: "value", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
271
+ ]);
272
+ UInt64Value.fieldWrapper = {
273
+ wrapField(value) {
274
+ return value instanceof UInt64Value ? value : new UInt64Value({ value });
275
+ },
276
+ unwrapField(value) {
277
+ return value.value;
278
+ },
279
+ };
280
+ /**
281
+ * Wrapper message for `int32`.
282
+ *
283
+ * The JSON representation for `Int32Value` is JSON number.
284
+ *
285
+ * @generated from message google.protobuf.Int32Value
286
+ */
287
+ export class Int32Value extends Message {
288
+ constructor(data) {
289
+ super();
290
+ /**
291
+ * The int32 value.
292
+ *
293
+ * @generated from field: int32 value = 1;
294
+ */
295
+ this.value = 0;
296
+ proto3.util.initPartial(data, this);
297
+ }
298
+ toJson(options) {
299
+ return proto3.json.writeScalar(ScalarType.INT32, this.value, true);
300
+ }
301
+ fromJson(json, options) {
302
+ try {
303
+ this.value = proto3.json.readScalar(ScalarType.INT32, json);
304
+ } catch (e) {
305
+ let m = `cannot decode message google.protobuf.Int32Value from JSON"`;
306
+ if (e instanceof Error && e.message.length > 0) {
307
+ m += `: ${e.message}`;
308
+ }
309
+ throw new Error(m);
310
+ }
311
+ return this;
312
+ }
313
+ static fromBinary(bytes, options) {
314
+ return new Int32Value().fromBinary(bytes, options);
315
+ }
316
+ static fromJson(jsonValue, options) {
317
+ return new Int32Value().fromJson(jsonValue, options);
318
+ }
319
+ static fromJsonString(jsonString, options) {
320
+ return new Int32Value().fromJsonString(jsonString, options);
321
+ }
322
+ static equals(a, b) {
323
+ return proto3.util.equals(Int32Value, a, b);
324
+ }
325
+ }
326
+ Int32Value.runtime = proto3;
327
+ Int32Value.typeName = "google.protobuf.Int32Value";
328
+ Int32Value.fields = proto3.util.newFieldList(() => [
329
+ { no: 1, name: "value", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
330
+ ]);
331
+ Int32Value.fieldWrapper = {
332
+ wrapField(value) {
333
+ return value instanceof Int32Value ? value : new Int32Value({ value });
334
+ },
335
+ unwrapField(value) {
336
+ return value.value;
337
+ },
338
+ };
339
+ /**
340
+ * Wrapper message for `uint32`.
341
+ *
342
+ * The JSON representation for `UInt32Value` is JSON number.
343
+ *
344
+ * @generated from message google.protobuf.UInt32Value
345
+ */
346
+ export class UInt32Value extends Message {
347
+ constructor(data) {
348
+ super();
349
+ /**
350
+ * The uint32 value.
351
+ *
352
+ * @generated from field: uint32 value = 1;
353
+ */
354
+ this.value = 0;
355
+ proto3.util.initPartial(data, this);
356
+ }
357
+ toJson(options) {
358
+ return proto3.json.writeScalar(ScalarType.UINT32, this.value, true);
359
+ }
360
+ fromJson(json, options) {
361
+ try {
362
+ this.value = proto3.json.readScalar(ScalarType.UINT32, json);
363
+ } catch (e) {
364
+ let m = `cannot decode message google.protobuf.UInt32Value from JSON"`;
365
+ if (e instanceof Error && e.message.length > 0) {
366
+ m += `: ${e.message}`;
367
+ }
368
+ throw new Error(m);
369
+ }
370
+ return this;
371
+ }
372
+ static fromBinary(bytes, options) {
373
+ return new UInt32Value().fromBinary(bytes, options);
374
+ }
375
+ static fromJson(jsonValue, options) {
376
+ return new UInt32Value().fromJson(jsonValue, options);
377
+ }
378
+ static fromJsonString(jsonString, options) {
379
+ return new UInt32Value().fromJsonString(jsonString, options);
380
+ }
381
+ static equals(a, b) {
382
+ return proto3.util.equals(UInt32Value, a, b);
383
+ }
384
+ }
385
+ UInt32Value.runtime = proto3;
386
+ UInt32Value.typeName = "google.protobuf.UInt32Value";
387
+ UInt32Value.fields = proto3.util.newFieldList(() => [
388
+ { no: 1, name: "value", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
389
+ ]);
390
+ UInt32Value.fieldWrapper = {
391
+ wrapField(value) {
392
+ return value instanceof UInt32Value ? value : new UInt32Value({ value });
393
+ },
394
+ unwrapField(value) {
395
+ return value.value;
396
+ },
397
+ };
398
+ /**
399
+ * Wrapper message for `bool`.
400
+ *
401
+ * The JSON representation for `BoolValue` is JSON `true` and `false`.
402
+ *
403
+ * @generated from message google.protobuf.BoolValue
404
+ */
405
+ export class BoolValue extends Message {
406
+ constructor(data) {
407
+ super();
408
+ /**
409
+ * The bool value.
410
+ *
411
+ * @generated from field: bool value = 1;
412
+ */
413
+ this.value = false;
414
+ proto3.util.initPartial(data, this);
415
+ }
416
+ toJson(options) {
417
+ return proto3.json.writeScalar(ScalarType.BOOL, this.value, true);
418
+ }
419
+ fromJson(json, options) {
420
+ try {
421
+ this.value = proto3.json.readScalar(ScalarType.BOOL, json);
422
+ } catch (e) {
423
+ let m = `cannot decode message google.protobuf.BoolValue from JSON"`;
424
+ if (e instanceof Error && e.message.length > 0) {
425
+ m += `: ${e.message}`;
426
+ }
427
+ throw new Error(m);
428
+ }
429
+ return this;
430
+ }
431
+ static fromBinary(bytes, options) {
432
+ return new BoolValue().fromBinary(bytes, options);
433
+ }
434
+ static fromJson(jsonValue, options) {
435
+ return new BoolValue().fromJson(jsonValue, options);
436
+ }
437
+ static fromJsonString(jsonString, options) {
438
+ return new BoolValue().fromJsonString(jsonString, options);
439
+ }
440
+ static equals(a, b) {
441
+ return proto3.util.equals(BoolValue, a, b);
442
+ }
443
+ }
444
+ BoolValue.runtime = proto3;
445
+ BoolValue.typeName = "google.protobuf.BoolValue";
446
+ BoolValue.fields = proto3.util.newFieldList(() => [
447
+ { no: 1, name: "value", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
448
+ ]);
449
+ BoolValue.fieldWrapper = {
450
+ wrapField(value) {
451
+ return value instanceof BoolValue ? value : new BoolValue({ value });
452
+ },
453
+ unwrapField(value) {
454
+ return value.value;
455
+ },
456
+ };
457
+ /**
458
+ * Wrapper message for `string`.
459
+ *
460
+ * The JSON representation for `StringValue` is JSON string.
461
+ *
462
+ * @generated from message google.protobuf.StringValue
463
+ */
464
+ export class StringValue extends Message {
465
+ constructor(data) {
466
+ super();
467
+ /**
468
+ * The string value.
469
+ *
470
+ * @generated from field: string value = 1;
471
+ */
472
+ this.value = "";
473
+ proto3.util.initPartial(data, this);
474
+ }
475
+ toJson(options) {
476
+ return proto3.json.writeScalar(ScalarType.STRING, this.value, true);
477
+ }
478
+ fromJson(json, options) {
479
+ try {
480
+ this.value = proto3.json.readScalar(ScalarType.STRING, json);
481
+ } catch (e) {
482
+ let m = `cannot decode message google.protobuf.StringValue from JSON"`;
483
+ if (e instanceof Error && e.message.length > 0) {
484
+ m += `: ${e.message}`;
485
+ }
486
+ throw new Error(m);
487
+ }
488
+ return this;
489
+ }
490
+ static fromBinary(bytes, options) {
491
+ return new StringValue().fromBinary(bytes, options);
492
+ }
493
+ static fromJson(jsonValue, options) {
494
+ return new StringValue().fromJson(jsonValue, options);
495
+ }
496
+ static fromJsonString(jsonString, options) {
497
+ return new StringValue().fromJsonString(jsonString, options);
498
+ }
499
+ static equals(a, b) {
500
+ return proto3.util.equals(StringValue, a, b);
501
+ }
502
+ }
503
+ StringValue.runtime = proto3;
504
+ StringValue.typeName = "google.protobuf.StringValue";
505
+ StringValue.fields = proto3.util.newFieldList(() => [
506
+ { no: 1, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
507
+ ]);
508
+ StringValue.fieldWrapper = {
509
+ wrapField(value) {
510
+ return value instanceof StringValue ? value : new StringValue({ value });
511
+ },
512
+ unwrapField(value) {
513
+ return value.value;
514
+ },
515
+ };
516
+ /**
517
+ * Wrapper message for `bytes`.
518
+ *
519
+ * The JSON representation for `BytesValue` is JSON string.
520
+ *
521
+ * @generated from message google.protobuf.BytesValue
522
+ */
523
+ export class BytesValue extends Message {
524
+ constructor(data) {
525
+ super();
526
+ /**
527
+ * The bytes value.
528
+ *
529
+ * @generated from field: bytes value = 1;
530
+ */
531
+ this.value = new Uint8Array(0);
532
+ proto3.util.initPartial(data, this);
533
+ }
534
+ toJson(options) {
535
+ return proto3.json.writeScalar(ScalarType.BYTES, this.value, true);
536
+ }
537
+ fromJson(json, options) {
538
+ try {
539
+ this.value = proto3.json.readScalar(ScalarType.BYTES, json);
540
+ } catch (e) {
541
+ let m = `cannot decode message google.protobuf.BytesValue from JSON"`;
542
+ if (e instanceof Error && e.message.length > 0) {
543
+ m += `: ${e.message}`;
544
+ }
545
+ throw new Error(m);
546
+ }
547
+ return this;
548
+ }
549
+ static fromBinary(bytes, options) {
550
+ return new BytesValue().fromBinary(bytes, options);
551
+ }
552
+ static fromJson(jsonValue, options) {
553
+ return new BytesValue().fromJson(jsonValue, options);
554
+ }
555
+ static fromJsonString(jsonString, options) {
556
+ return new BytesValue().fromJsonString(jsonString, options);
557
+ }
558
+ static equals(a, b) {
559
+ return proto3.util.equals(BytesValue, a, b);
560
+ }
561
+ }
562
+ BytesValue.runtime = proto3;
563
+ BytesValue.typeName = "google.protobuf.BytesValue";
564
+ BytesValue.fields = proto3.util.newFieldList(() => [
565
+ { no: 1, name: "value", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
566
+ ]);
567
+ BytesValue.fieldWrapper = {
568
+ wrapField(value) {
569
+ return value instanceof BytesValue ? value : new BytesValue({ value });
570
+ },
571
+ unwrapField(value) {
572
+ return value.value;
573
+ },
574
+ };