@bufbuild/protobuf 0.0.1-alpha.1 → 0.0.2-alpha.2

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 (138) hide show
  1. package/dist/cjs/binary-encoding.js +414 -409
  2. package/dist/cjs/binary-format.js +13 -0
  3. package/dist/cjs/descriptor-registry.js +420 -449
  4. package/dist/cjs/descriptor-set.js +429 -513
  5. package/dist/cjs/enum.js +13 -0
  6. package/dist/cjs/field-list.js +13 -0
  7. package/dist/cjs/field.js +43 -30
  8. package/dist/cjs/google/protobuf/any_pb.js +122 -140
  9. package/dist/cjs/google/protobuf/api_pb.js +177 -224
  10. package/dist/cjs/google/protobuf/compiler/plugin_pb.js +125 -227
  11. package/dist/cjs/google/protobuf/descriptor_pb.js +1029 -1888
  12. package/dist/cjs/google/protobuf/duration_pb.js +72 -88
  13. package/dist/cjs/google/protobuf/empty_pb.js +17 -17
  14. package/dist/cjs/google/protobuf/field_mask_pb.js +77 -94
  15. package/dist/cjs/google/protobuf/source_context_pb.js +25 -25
  16. package/dist/cjs/google/protobuf/struct_pb.js +144 -181
  17. package/dist/cjs/google/protobuf/timestamp_pb.js +86 -123
  18. package/dist/cjs/google/protobuf/type_pb.js +406 -462
  19. package/dist/cjs/google/protobuf/wrappers_pb.js +407 -470
  20. package/dist/cjs/google/varint.js +166 -171
  21. package/dist/cjs/index.js +41 -122
  22. package/dist/cjs/json-format.js +13 -0
  23. package/dist/cjs/message-type.js +13 -0
  24. package/dist/cjs/message.js +89 -85
  25. package/dist/cjs/private/assert.js +33 -26
  26. package/dist/cjs/private/base64.js +93 -79
  27. package/dist/cjs/private/binary-format-common.js +208 -208
  28. package/dist/cjs/private/binary-format-proto2.js +88 -109
  29. package/dist/cjs/private/binary-format-proto3.js +70 -90
  30. package/dist/cjs/private/enum.js +77 -44
  31. package/dist/cjs/private/field-list.js +64 -50
  32. package/dist/cjs/private/field-wrapper.js +21 -10
  33. package/dist/cjs/private/field.js +35 -25
  34. package/dist/cjs/private/json-format-common.js +427 -440
  35. package/dist/cjs/private/json-format-proto2.js +91 -89
  36. package/dist/cjs/private/json-format-proto3.js +82 -93
  37. package/dist/cjs/private/message-type.js +39 -27
  38. package/dist/cjs/private/names.js +71 -62
  39. package/dist/cjs/private/options-map.js +13 -0
  40. package/dist/cjs/private/proto-runtime.js +25 -16
  41. package/dist/cjs/private/scalars.js +113 -103
  42. package/dist/cjs/private/util-common.js +193 -210
  43. package/dist/cjs/private/util.js +13 -0
  44. package/dist/cjs/proto-int64.js +123 -111
  45. package/dist/cjs/proto2.js +63 -63
  46. package/dist/cjs/proto3.js +74 -74
  47. package/dist/cjs/service-type.js +27 -17
  48. package/dist/cjs/type-registry.js +46 -31
  49. package/dist/esm/binary-encoding.js +414 -414
  50. package/dist/esm/binary-format.js +13 -0
  51. package/dist/esm/descriptor-registry.js +422 -458
  52. package/dist/esm/descriptor-set.js +430 -478
  53. package/dist/esm/enum.js +13 -0
  54. package/dist/esm/field-list.js +13 -0
  55. package/dist/esm/field.js +42 -29
  56. package/dist/esm/google/protobuf/any_pb.js +122 -140
  57. package/dist/esm/google/protobuf/api_pb.js +177 -197
  58. package/dist/esm/google/protobuf/compiler/plugin_pb.js +123 -216
  59. package/dist/esm/google/protobuf/descriptor_pb.js +1013 -1804
  60. package/dist/esm/google/protobuf/duration_pb.js +72 -88
  61. package/dist/esm/google/protobuf/empty_pb.js +17 -17
  62. package/dist/esm/google/protobuf/field_mask_pb.js +77 -94
  63. package/dist/esm/google/protobuf/source_context_pb.js +25 -25
  64. package/dist/esm/google/protobuf/struct_pb.js +143 -180
  65. package/dist/esm/google/protobuf/timestamp_pb.js +86 -123
  66. package/dist/esm/google/protobuf/type_pb.js +401 -421
  67. package/dist/esm/google/protobuf/wrappers_pb.js +406 -397
  68. package/dist/esm/google/varint.js +165 -164
  69. package/dist/esm/index.js +14 -1
  70. package/dist/esm/json-format.js +13 -0
  71. package/dist/esm/message-type.js +13 -0
  72. package/dist/esm/message.js +89 -85
  73. package/dist/esm/private/assert.js +32 -21
  74. package/dist/esm/private/base64.js +92 -78
  75. package/dist/esm/private/binary-format-common.js +209 -207
  76. package/dist/esm/private/binary-format-proto2.js +89 -81
  77. package/dist/esm/private/binary-format-proto3.js +71 -67
  78. package/dist/esm/private/enum.js +75 -43
  79. package/dist/esm/private/field-list.js +64 -50
  80. package/dist/esm/private/field-wrapper.js +21 -10
  81. package/dist/esm/private/field.js +35 -22
  82. package/dist/esm/private/json-format-common.js +427 -435
  83. package/dist/esm/private/json-format-proto2.js +89 -81
  84. package/dist/esm/private/json-format-proto3.js +79 -80
  85. package/dist/esm/private/message-type.js +40 -28
  86. package/dist/esm/private/names.js +70 -57
  87. package/dist/esm/private/options-map.js +13 -0
  88. package/dist/esm/private/proto-runtime.js +26 -12
  89. package/dist/esm/private/scalars.js +112 -99
  90. package/dist/esm/private/util-common.js +193 -192
  91. package/dist/esm/private/util.js +13 -0
  92. package/dist/esm/proto-int64.js +123 -111
  93. package/dist/esm/proto2.js +63 -57
  94. package/dist/esm/proto3.js +74 -68
  95. package/dist/esm/service-type.js +25 -12
  96. package/dist/esm/type-registry.js +46 -31
  97. package/dist/types/binary-encoding.d.ts +398 -398
  98. package/dist/types/binary-format.d.ts +69 -91
  99. package/dist/types/descriptor-registry.d.ts +23 -29
  100. package/dist/types/descriptor-set.d.ts +107 -128
  101. package/dist/types/enum.d.ts +21 -21
  102. package/dist/types/field-list.d.ts +21 -21
  103. package/dist/types/field.d.ts +191 -231
  104. package/dist/types/google/protobuf/any_pb.d.ts +56 -77
  105. package/dist/types/google/protobuf/api_pb.d.ts +144 -187
  106. package/dist/types/google/protobuf/compiler/plugin_pb.d.ts +195 -257
  107. package/dist/types/google/protobuf/descriptor_pb.d.ts +1360 -1737
  108. package/dist/types/google/protobuf/duration_pb.d.ts +30 -50
  109. package/dist/types/google/protobuf/empty_pb.d.ts +9 -28
  110. package/dist/types/google/protobuf/field_mask_pb.d.ts +17 -37
  111. package/dist/types/google/protobuf/source_context_pb.d.ts +16 -35
  112. package/dist/types/google/protobuf/struct_pb.d.ts +64 -115
  113. package/dist/types/google/protobuf/timestamp_pb.d.ts +31 -51
  114. package/dist/types/google/protobuf/type_pb.d.ts +355 -422
  115. package/dist/types/google/protobuf/wrappers_pb.d.ts +181 -297
  116. package/dist/types/google/varint.d.ts +6 -13
  117. package/dist/types/index.d.ts +4 -27
  118. package/dist/types/json-format.d.ts +70 -89
  119. package/dist/types/message-type.d.ts +37 -45
  120. package/dist/types/message.d.ts +62 -87
  121. package/dist/types/private/assert.d.ts +1 -4
  122. package/dist/types/private/binary-format-common.d.ts +6 -32
  123. package/dist/types/private/enum.d.ts +13 -11
  124. package/dist/types/private/field-list.d.ts +14 -21
  125. package/dist/types/private/field-wrapper.d.ts +4 -10
  126. package/dist/types/private/field.d.ts +12 -12
  127. package/dist/types/private/json-format-common.d.ts +5 -27
  128. package/dist/types/private/message-type.d.ts +12 -7
  129. package/dist/types/private/names.d.ts +1 -4
  130. package/dist/types/private/options-map.d.ts +1 -1
  131. package/dist/types/private/proto-runtime.d.ts +34 -42
  132. package/dist/types/private/scalars.d.ts +5 -12
  133. package/dist/types/private/util-common.d.ts +1 -4
  134. package/dist/types/private/util.d.ts +29 -41
  135. package/dist/types/proto-int64.d.ts +42 -42
  136. package/dist/types/service-type.d.ts +36 -56
  137. package/dist/types/type-registry.d.ts +13 -15
  138. package/package.json +2 -3
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /* eslint-disable */
3
- // @generated by protoc-gen-es v0.0.1-alpha.1 with parameter "bootstrap_wkt=true,ts_nocheck=false"
3
+ // @generated by protoc-gen-es v0.0.2-alpha.2 with parameter "bootstrap_wkt=true,ts_nocheck=false,target=ts"
4
4
  // @generated from file google/protobuf/wrappers.proto (package google.protobuf, syntax proto3)
5
5
  //
6
6
  // Protocol Buffers - Google's data interchange format
@@ -42,16 +42,7 @@
42
42
  // These wrappers have no meaningful use within a map or a oneof since
43
43
  // individual entries of a map or fields of a oneof can already detect presence.
44
44
  Object.defineProperty(exports, "__esModule", { value: true });
45
- exports.BytesValue =
46
- exports.StringValue =
47
- exports.BoolValue =
48
- exports.UInt32Value =
49
- exports.Int32Value =
50
- exports.UInt64Value =
51
- exports.Int64Value =
52
- exports.FloatValue =
53
- exports.DoubleValue =
54
- void 0;
45
+ exports.BytesValue = exports.StringValue = exports.BoolValue = exports.UInt32Value = exports.Int32Value = exports.UInt64Value = exports.Int64Value = exports.FloatValue = exports.DoubleValue = void 0;
55
46
  const index_js_1 = require("../../index.js");
56
47
  /**
57
48
  * Wrapper message for `double`.
@@ -61,64 +52,58 @@ const index_js_1 = require("../../index.js");
61
52
  * @generated from message google.protobuf.DoubleValue
62
53
  */
63
54
  class DoubleValue extends index_js_1.Message {
64
- constructor(data) {
65
- super();
66
- /**
67
- * The double value.
68
- *
69
- * @generated from field: double value = 1;
70
- */
71
- this.value = 0;
72
- index_js_1.proto3.util.initPartial(data, this);
73
- }
74
- toJson(options) {
75
- return index_js_1.proto3.json.writeScalar(
76
- index_js_1.ScalarType.DOUBLE,
77
- this.value,
78
- true
79
- );
80
- }
81
- fromJson(json, options) {
82
- try {
83
- this.value = index_js_1.proto3.json.readScalar(
84
- index_js_1.ScalarType.DOUBLE,
85
- json
86
- );
87
- } catch (e) {
88
- let m = `cannot decode message google.protobuf.DoubleValue from JSON"`;
89
- if (e instanceof Error && e.message.length > 0) {
90
- m += `: ${e.message}`;
91
- }
92
- throw new Error(m);
93
- }
94
- return this;
95
- }
96
- static fromBinary(bytes, options) {
97
- return new DoubleValue().fromBinary(bytes, options);
98
- }
99
- static fromJson(jsonValue, options) {
100
- return new DoubleValue().fromJson(jsonValue, options);
101
- }
102
- static fromJsonString(jsonString, options) {
103
- return new DoubleValue().fromJsonString(jsonString, options);
104
- }
105
- static equals(a, b) {
106
- return index_js_1.proto3.util.equals(DoubleValue, a, b);
107
- }
55
+ constructor(data) {
56
+ super();
57
+ /**
58
+ * The double value.
59
+ *
60
+ * @generated from field: double value = 1;
61
+ */
62
+ this.value = 0;
63
+ index_js_1.proto3.util.initPartial(data, this);
64
+ }
65
+ toJson(options) {
66
+ return index_js_1.proto3.json.writeScalar(index_js_1.ScalarType.DOUBLE, this.value, true);
67
+ }
68
+ fromJson(json, options) {
69
+ try {
70
+ this.value = index_js_1.proto3.json.readScalar(index_js_1.ScalarType.DOUBLE, json);
71
+ }
72
+ catch (e) {
73
+ let m = `cannot decode message google.protobuf.DoubleValue from JSON"`;
74
+ if (e instanceof Error && e.message.length > 0) {
75
+ m += `: ${e.message}`;
76
+ }
77
+ throw new Error(m);
78
+ }
79
+ return this;
80
+ }
81
+ static fromBinary(bytes, options) {
82
+ return new DoubleValue().fromBinary(bytes, options);
83
+ }
84
+ static fromJson(jsonValue, options) {
85
+ return new DoubleValue().fromJson(jsonValue, options);
86
+ }
87
+ static fromJsonString(jsonString, options) {
88
+ return new DoubleValue().fromJsonString(jsonString, options);
89
+ }
90
+ static equals(a, b) {
91
+ return index_js_1.proto3.util.equals(DoubleValue, a, b);
92
+ }
108
93
  }
109
94
  exports.DoubleValue = DoubleValue;
110
95
  DoubleValue.runtime = index_js_1.proto3;
111
96
  DoubleValue.typeName = "google.protobuf.DoubleValue";
112
97
  DoubleValue.fields = index_js_1.proto3.util.newFieldList(() => [
113
- { no: 1, name: "value", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
98
+ { no: 1, name: "value", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
114
99
  ]);
115
100
  DoubleValue.fieldWrapper = {
116
- wrapField(value) {
117
- return value instanceof DoubleValue ? value : new DoubleValue({ value });
118
- },
119
- unwrapField(value) {
120
- return value.value;
121
- },
101
+ wrapField(value) {
102
+ return value instanceof DoubleValue ? value : new DoubleValue({ value });
103
+ },
104
+ unwrapField(value) {
105
+ return value.value;
106
+ }
122
107
  };
123
108
  /**
124
109
  * Wrapper message for `float`.
@@ -128,64 +113,58 @@ DoubleValue.fieldWrapper = {
128
113
  * @generated from message google.protobuf.FloatValue
129
114
  */
130
115
  class FloatValue extends index_js_1.Message {
131
- constructor(data) {
132
- super();
133
- /**
134
- * The float value.
135
- *
136
- * @generated from field: float value = 1;
137
- */
138
- this.value = 0;
139
- index_js_1.proto3.util.initPartial(data, this);
140
- }
141
- toJson(options) {
142
- return index_js_1.proto3.json.writeScalar(
143
- index_js_1.ScalarType.FLOAT,
144
- this.value,
145
- true
146
- );
147
- }
148
- fromJson(json, options) {
149
- try {
150
- this.value = index_js_1.proto3.json.readScalar(
151
- index_js_1.ScalarType.FLOAT,
152
- json
153
- );
154
- } catch (e) {
155
- let m = `cannot decode message google.protobuf.FloatValue from JSON"`;
156
- if (e instanceof Error && e.message.length > 0) {
157
- m += `: ${e.message}`;
158
- }
159
- throw new Error(m);
160
- }
161
- return this;
162
- }
163
- static fromBinary(bytes, options) {
164
- return new FloatValue().fromBinary(bytes, options);
165
- }
166
- static fromJson(jsonValue, options) {
167
- return new FloatValue().fromJson(jsonValue, options);
168
- }
169
- static fromJsonString(jsonString, options) {
170
- return new FloatValue().fromJsonString(jsonString, options);
171
- }
172
- static equals(a, b) {
173
- return index_js_1.proto3.util.equals(FloatValue, a, b);
174
- }
116
+ constructor(data) {
117
+ super();
118
+ /**
119
+ * The float value.
120
+ *
121
+ * @generated from field: float value = 1;
122
+ */
123
+ this.value = 0;
124
+ index_js_1.proto3.util.initPartial(data, this);
125
+ }
126
+ toJson(options) {
127
+ return index_js_1.proto3.json.writeScalar(index_js_1.ScalarType.FLOAT, this.value, true);
128
+ }
129
+ fromJson(json, options) {
130
+ try {
131
+ this.value = index_js_1.proto3.json.readScalar(index_js_1.ScalarType.FLOAT, json);
132
+ }
133
+ catch (e) {
134
+ let m = `cannot decode message google.protobuf.FloatValue from JSON"`;
135
+ if (e instanceof Error && e.message.length > 0) {
136
+ m += `: ${e.message}`;
137
+ }
138
+ throw new Error(m);
139
+ }
140
+ return this;
141
+ }
142
+ static fromBinary(bytes, options) {
143
+ return new FloatValue().fromBinary(bytes, options);
144
+ }
145
+ static fromJson(jsonValue, options) {
146
+ return new FloatValue().fromJson(jsonValue, options);
147
+ }
148
+ static fromJsonString(jsonString, options) {
149
+ return new FloatValue().fromJsonString(jsonString, options);
150
+ }
151
+ static equals(a, b) {
152
+ return index_js_1.proto3.util.equals(FloatValue, a, b);
153
+ }
175
154
  }
176
155
  exports.FloatValue = FloatValue;
177
156
  FloatValue.runtime = index_js_1.proto3;
178
157
  FloatValue.typeName = "google.protobuf.FloatValue";
179
158
  FloatValue.fields = index_js_1.proto3.util.newFieldList(() => [
180
- { no: 1, name: "value", kind: "scalar", T: 2 /* ScalarType.FLOAT */ },
159
+ { no: 1, name: "value", kind: "scalar", T: 2 /* ScalarType.FLOAT */ },
181
160
  ]);
182
161
  FloatValue.fieldWrapper = {
183
- wrapField(value) {
184
- return value instanceof FloatValue ? value : new FloatValue({ value });
185
- },
186
- unwrapField(value) {
187
- return value.value;
188
- },
162
+ wrapField(value) {
163
+ return value instanceof FloatValue ? value : new FloatValue({ value });
164
+ },
165
+ unwrapField(value) {
166
+ return value.value;
167
+ }
189
168
  };
190
169
  /**
191
170
  * Wrapper message for `int64`.
@@ -195,64 +174,58 @@ FloatValue.fieldWrapper = {
195
174
  * @generated from message google.protobuf.Int64Value
196
175
  */
197
176
  class Int64Value extends index_js_1.Message {
198
- constructor(data) {
199
- super();
200
- /**
201
- * The int64 value.
202
- *
203
- * @generated from field: int64 value = 1;
204
- */
205
- this.value = index_js_1.protoInt64.zero;
206
- index_js_1.proto3.util.initPartial(data, this);
207
- }
208
- toJson(options) {
209
- return index_js_1.proto3.json.writeScalar(
210
- index_js_1.ScalarType.INT64,
211
- this.value,
212
- true
213
- );
214
- }
215
- fromJson(json, options) {
216
- try {
217
- this.value = index_js_1.proto3.json.readScalar(
218
- index_js_1.ScalarType.INT64,
219
- json
220
- );
221
- } catch (e) {
222
- let m = `cannot decode message google.protobuf.Int64Value from JSON"`;
223
- if (e instanceof Error && e.message.length > 0) {
224
- m += `: ${e.message}`;
225
- }
226
- throw new Error(m);
227
- }
228
- return this;
229
- }
230
- static fromBinary(bytes, options) {
231
- return new Int64Value().fromBinary(bytes, options);
232
- }
233
- static fromJson(jsonValue, options) {
234
- return new Int64Value().fromJson(jsonValue, options);
235
- }
236
- static fromJsonString(jsonString, options) {
237
- return new Int64Value().fromJsonString(jsonString, options);
238
- }
239
- static equals(a, b) {
240
- return index_js_1.proto3.util.equals(Int64Value, a, b);
241
- }
177
+ constructor(data) {
178
+ super();
179
+ /**
180
+ * The int64 value.
181
+ *
182
+ * @generated from field: int64 value = 1;
183
+ */
184
+ this.value = index_js_1.protoInt64.zero;
185
+ index_js_1.proto3.util.initPartial(data, this);
186
+ }
187
+ toJson(options) {
188
+ return index_js_1.proto3.json.writeScalar(index_js_1.ScalarType.INT64, this.value, true);
189
+ }
190
+ fromJson(json, options) {
191
+ try {
192
+ this.value = index_js_1.proto3.json.readScalar(index_js_1.ScalarType.INT64, json);
193
+ }
194
+ catch (e) {
195
+ let m = `cannot decode message google.protobuf.Int64Value from JSON"`;
196
+ if (e instanceof Error && e.message.length > 0) {
197
+ m += `: ${e.message}`;
198
+ }
199
+ throw new Error(m);
200
+ }
201
+ return this;
202
+ }
203
+ static fromBinary(bytes, options) {
204
+ return new Int64Value().fromBinary(bytes, options);
205
+ }
206
+ static fromJson(jsonValue, options) {
207
+ return new Int64Value().fromJson(jsonValue, options);
208
+ }
209
+ static fromJsonString(jsonString, options) {
210
+ return new Int64Value().fromJsonString(jsonString, options);
211
+ }
212
+ static equals(a, b) {
213
+ return index_js_1.proto3.util.equals(Int64Value, a, b);
214
+ }
242
215
  }
243
216
  exports.Int64Value = Int64Value;
244
217
  Int64Value.runtime = index_js_1.proto3;
245
218
  Int64Value.typeName = "google.protobuf.Int64Value";
246
219
  Int64Value.fields = index_js_1.proto3.util.newFieldList(() => [
247
- { no: 1, name: "value", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
220
+ { no: 1, name: "value", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
248
221
  ]);
249
222
  Int64Value.fieldWrapper = {
250
- wrapField(value) {
251
- return value instanceof Int64Value ? value : new Int64Value({ value });
252
- },
253
- unwrapField(value) {
254
- return value.value;
255
- },
223
+ wrapField(value) {
224
+ return value instanceof Int64Value ? value : new Int64Value({ value });
225
+ },
226
+ unwrapField(value) {
227
+ return value.value;
228
+ }
256
229
  };
257
230
  /**
258
231
  * Wrapper message for `uint64`.
@@ -262,64 +235,58 @@ Int64Value.fieldWrapper = {
262
235
  * @generated from message google.protobuf.UInt64Value
263
236
  */
264
237
  class UInt64Value extends index_js_1.Message {
265
- constructor(data) {
266
- super();
267
- /**
268
- * The uint64 value.
269
- *
270
- * @generated from field: uint64 value = 1;
271
- */
272
- this.value = index_js_1.protoInt64.zero;
273
- index_js_1.proto3.util.initPartial(data, this);
274
- }
275
- toJson(options) {
276
- return index_js_1.proto3.json.writeScalar(
277
- index_js_1.ScalarType.UINT64,
278
- this.value,
279
- true
280
- );
281
- }
282
- fromJson(json, options) {
283
- try {
284
- this.value = index_js_1.proto3.json.readScalar(
285
- index_js_1.ScalarType.UINT64,
286
- json
287
- );
288
- } catch (e) {
289
- let m = `cannot decode message google.protobuf.UInt64Value from JSON"`;
290
- if (e instanceof Error && e.message.length > 0) {
291
- m += `: ${e.message}`;
292
- }
293
- throw new Error(m);
294
- }
295
- return this;
296
- }
297
- static fromBinary(bytes, options) {
298
- return new UInt64Value().fromBinary(bytes, options);
299
- }
300
- static fromJson(jsonValue, options) {
301
- return new UInt64Value().fromJson(jsonValue, options);
302
- }
303
- static fromJsonString(jsonString, options) {
304
- return new UInt64Value().fromJsonString(jsonString, options);
305
- }
306
- static equals(a, b) {
307
- return index_js_1.proto3.util.equals(UInt64Value, a, b);
308
- }
238
+ constructor(data) {
239
+ super();
240
+ /**
241
+ * The uint64 value.
242
+ *
243
+ * @generated from field: uint64 value = 1;
244
+ */
245
+ this.value = index_js_1.protoInt64.zero;
246
+ index_js_1.proto3.util.initPartial(data, this);
247
+ }
248
+ toJson(options) {
249
+ return index_js_1.proto3.json.writeScalar(index_js_1.ScalarType.UINT64, this.value, true);
250
+ }
251
+ fromJson(json, options) {
252
+ try {
253
+ this.value = index_js_1.proto3.json.readScalar(index_js_1.ScalarType.UINT64, json);
254
+ }
255
+ catch (e) {
256
+ let m = `cannot decode message google.protobuf.UInt64Value from JSON"`;
257
+ if (e instanceof Error && e.message.length > 0) {
258
+ m += `: ${e.message}`;
259
+ }
260
+ throw new Error(m);
261
+ }
262
+ return this;
263
+ }
264
+ static fromBinary(bytes, options) {
265
+ return new UInt64Value().fromBinary(bytes, options);
266
+ }
267
+ static fromJson(jsonValue, options) {
268
+ return new UInt64Value().fromJson(jsonValue, options);
269
+ }
270
+ static fromJsonString(jsonString, options) {
271
+ return new UInt64Value().fromJsonString(jsonString, options);
272
+ }
273
+ static equals(a, b) {
274
+ return index_js_1.proto3.util.equals(UInt64Value, a, b);
275
+ }
309
276
  }
310
277
  exports.UInt64Value = UInt64Value;
311
278
  UInt64Value.runtime = index_js_1.proto3;
312
279
  UInt64Value.typeName = "google.protobuf.UInt64Value";
313
280
  UInt64Value.fields = index_js_1.proto3.util.newFieldList(() => [
314
- { no: 1, name: "value", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
281
+ { no: 1, name: "value", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
315
282
  ]);
316
283
  UInt64Value.fieldWrapper = {
317
- wrapField(value) {
318
- return value instanceof UInt64Value ? value : new UInt64Value({ value });
319
- },
320
- unwrapField(value) {
321
- return value.value;
322
- },
284
+ wrapField(value) {
285
+ return value instanceof UInt64Value ? value : new UInt64Value({ value });
286
+ },
287
+ unwrapField(value) {
288
+ return value.value;
289
+ }
323
290
  };
324
291
  /**
325
292
  * Wrapper message for `int32`.
@@ -329,64 +296,58 @@ UInt64Value.fieldWrapper = {
329
296
  * @generated from message google.protobuf.Int32Value
330
297
  */
331
298
  class Int32Value extends index_js_1.Message {
332
- constructor(data) {
333
- super();
334
- /**
335
- * The int32 value.
336
- *
337
- * @generated from field: int32 value = 1;
338
- */
339
- this.value = 0;
340
- index_js_1.proto3.util.initPartial(data, this);
341
- }
342
- toJson(options) {
343
- return index_js_1.proto3.json.writeScalar(
344
- index_js_1.ScalarType.INT32,
345
- this.value,
346
- true
347
- );
348
- }
349
- fromJson(json, options) {
350
- try {
351
- this.value = index_js_1.proto3.json.readScalar(
352
- index_js_1.ScalarType.INT32,
353
- json
354
- );
355
- } catch (e) {
356
- let m = `cannot decode message google.protobuf.Int32Value from JSON"`;
357
- if (e instanceof Error && e.message.length > 0) {
358
- m += `: ${e.message}`;
359
- }
360
- throw new Error(m);
361
- }
362
- return this;
363
- }
364
- static fromBinary(bytes, options) {
365
- return new Int32Value().fromBinary(bytes, options);
366
- }
367
- static fromJson(jsonValue, options) {
368
- return new Int32Value().fromJson(jsonValue, options);
369
- }
370
- static fromJsonString(jsonString, options) {
371
- return new Int32Value().fromJsonString(jsonString, options);
372
- }
373
- static equals(a, b) {
374
- return index_js_1.proto3.util.equals(Int32Value, a, b);
375
- }
299
+ constructor(data) {
300
+ super();
301
+ /**
302
+ * The int32 value.
303
+ *
304
+ * @generated from field: int32 value = 1;
305
+ */
306
+ this.value = 0;
307
+ index_js_1.proto3.util.initPartial(data, this);
308
+ }
309
+ toJson(options) {
310
+ return index_js_1.proto3.json.writeScalar(index_js_1.ScalarType.INT32, this.value, true);
311
+ }
312
+ fromJson(json, options) {
313
+ try {
314
+ this.value = index_js_1.proto3.json.readScalar(index_js_1.ScalarType.INT32, json);
315
+ }
316
+ catch (e) {
317
+ let m = `cannot decode message google.protobuf.Int32Value from JSON"`;
318
+ if (e instanceof Error && e.message.length > 0) {
319
+ m += `: ${e.message}`;
320
+ }
321
+ throw new Error(m);
322
+ }
323
+ return this;
324
+ }
325
+ static fromBinary(bytes, options) {
326
+ return new Int32Value().fromBinary(bytes, options);
327
+ }
328
+ static fromJson(jsonValue, options) {
329
+ return new Int32Value().fromJson(jsonValue, options);
330
+ }
331
+ static fromJsonString(jsonString, options) {
332
+ return new Int32Value().fromJsonString(jsonString, options);
333
+ }
334
+ static equals(a, b) {
335
+ return index_js_1.proto3.util.equals(Int32Value, a, b);
336
+ }
376
337
  }
377
338
  exports.Int32Value = Int32Value;
378
339
  Int32Value.runtime = index_js_1.proto3;
379
340
  Int32Value.typeName = "google.protobuf.Int32Value";
380
341
  Int32Value.fields = index_js_1.proto3.util.newFieldList(() => [
381
- { no: 1, name: "value", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
342
+ { no: 1, name: "value", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
382
343
  ]);
383
344
  Int32Value.fieldWrapper = {
384
- wrapField(value) {
385
- return value instanceof Int32Value ? value : new Int32Value({ value });
386
- },
387
- unwrapField(value) {
388
- return value.value;
389
- },
345
+ wrapField(value) {
346
+ return value instanceof Int32Value ? value : new Int32Value({ value });
347
+ },
348
+ unwrapField(value) {
349
+ return value.value;
350
+ }
390
351
  };
391
352
  /**
392
353
  * Wrapper message for `uint32`.
@@ -396,64 +357,58 @@ Int32Value.fieldWrapper = {
396
357
  * @generated from message google.protobuf.UInt32Value
397
358
  */
398
359
  class UInt32Value extends index_js_1.Message {
399
- constructor(data) {
400
- super();
401
- /**
402
- * The uint32 value.
403
- *
404
- * @generated from field: uint32 value = 1;
405
- */
406
- this.value = 0;
407
- index_js_1.proto3.util.initPartial(data, this);
408
- }
409
- toJson(options) {
410
- return index_js_1.proto3.json.writeScalar(
411
- index_js_1.ScalarType.UINT32,
412
- this.value,
413
- true
414
- );
415
- }
416
- fromJson(json, options) {
417
- try {
418
- this.value = index_js_1.proto3.json.readScalar(
419
- index_js_1.ScalarType.UINT32,
420
- json
421
- );
422
- } catch (e) {
423
- let m = `cannot decode message google.protobuf.UInt32Value 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 UInt32Value().fromBinary(bytes, options);
433
- }
434
- static fromJson(jsonValue, options) {
435
- return new UInt32Value().fromJson(jsonValue, options);
436
- }
437
- static fromJsonString(jsonString, options) {
438
- return new UInt32Value().fromJsonString(jsonString, options);
439
- }
440
- static equals(a, b) {
441
- return index_js_1.proto3.util.equals(UInt32Value, a, b);
442
- }
360
+ constructor(data) {
361
+ super();
362
+ /**
363
+ * The uint32 value.
364
+ *
365
+ * @generated from field: uint32 value = 1;
366
+ */
367
+ this.value = 0;
368
+ index_js_1.proto3.util.initPartial(data, this);
369
+ }
370
+ toJson(options) {
371
+ return index_js_1.proto3.json.writeScalar(index_js_1.ScalarType.UINT32, this.value, true);
372
+ }
373
+ fromJson(json, options) {
374
+ try {
375
+ this.value = index_js_1.proto3.json.readScalar(index_js_1.ScalarType.UINT32, json);
376
+ }
377
+ catch (e) {
378
+ let m = `cannot decode message google.protobuf.UInt32Value from JSON"`;
379
+ if (e instanceof Error && e.message.length > 0) {
380
+ m += `: ${e.message}`;
381
+ }
382
+ throw new Error(m);
383
+ }
384
+ return this;
385
+ }
386
+ static fromBinary(bytes, options) {
387
+ return new UInt32Value().fromBinary(bytes, options);
388
+ }
389
+ static fromJson(jsonValue, options) {
390
+ return new UInt32Value().fromJson(jsonValue, options);
391
+ }
392
+ static fromJsonString(jsonString, options) {
393
+ return new UInt32Value().fromJsonString(jsonString, options);
394
+ }
395
+ static equals(a, b) {
396
+ return index_js_1.proto3.util.equals(UInt32Value, a, b);
397
+ }
443
398
  }
444
399
  exports.UInt32Value = UInt32Value;
445
400
  UInt32Value.runtime = index_js_1.proto3;
446
401
  UInt32Value.typeName = "google.protobuf.UInt32Value";
447
402
  UInt32Value.fields = index_js_1.proto3.util.newFieldList(() => [
448
- { no: 1, name: "value", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
403
+ { no: 1, name: "value", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
449
404
  ]);
450
405
  UInt32Value.fieldWrapper = {
451
- wrapField(value) {
452
- return value instanceof UInt32Value ? value : new UInt32Value({ value });
453
- },
454
- unwrapField(value) {
455
- return value.value;
456
- },
406
+ wrapField(value) {
407
+ return value instanceof UInt32Value ? value : new UInt32Value({ value });
408
+ },
409
+ unwrapField(value) {
410
+ return value.value;
411
+ }
457
412
  };
458
413
  /**
459
414
  * Wrapper message for `bool`.
@@ -463,64 +418,58 @@ UInt32Value.fieldWrapper = {
463
418
  * @generated from message google.protobuf.BoolValue
464
419
  */
465
420
  class BoolValue extends index_js_1.Message {
466
- constructor(data) {
467
- super();
468
- /**
469
- * The bool value.
470
- *
471
- * @generated from field: bool value = 1;
472
- */
473
- this.value = false;
474
- index_js_1.proto3.util.initPartial(data, this);
475
- }
476
- toJson(options) {
477
- return index_js_1.proto3.json.writeScalar(
478
- index_js_1.ScalarType.BOOL,
479
- this.value,
480
- true
481
- );
482
- }
483
- fromJson(json, options) {
484
- try {
485
- this.value = index_js_1.proto3.json.readScalar(
486
- index_js_1.ScalarType.BOOL,
487
- json
488
- );
489
- } catch (e) {
490
- let m = `cannot decode message google.protobuf.BoolValue from JSON"`;
491
- if (e instanceof Error && e.message.length > 0) {
492
- m += `: ${e.message}`;
493
- }
494
- throw new Error(m);
495
- }
496
- return this;
497
- }
498
- static fromBinary(bytes, options) {
499
- return new BoolValue().fromBinary(bytes, options);
500
- }
501
- static fromJson(jsonValue, options) {
502
- return new BoolValue().fromJson(jsonValue, options);
503
- }
504
- static fromJsonString(jsonString, options) {
505
- return new BoolValue().fromJsonString(jsonString, options);
506
- }
507
- static equals(a, b) {
508
- return index_js_1.proto3.util.equals(BoolValue, a, b);
509
- }
421
+ constructor(data) {
422
+ super();
423
+ /**
424
+ * The bool value.
425
+ *
426
+ * @generated from field: bool value = 1;
427
+ */
428
+ this.value = false;
429
+ index_js_1.proto3.util.initPartial(data, this);
430
+ }
431
+ toJson(options) {
432
+ return index_js_1.proto3.json.writeScalar(index_js_1.ScalarType.BOOL, this.value, true);
433
+ }
434
+ fromJson(json, options) {
435
+ try {
436
+ this.value = index_js_1.proto3.json.readScalar(index_js_1.ScalarType.BOOL, json);
437
+ }
438
+ catch (e) {
439
+ let m = `cannot decode message google.protobuf.BoolValue from JSON"`;
440
+ if (e instanceof Error && e.message.length > 0) {
441
+ m += `: ${e.message}`;
442
+ }
443
+ throw new Error(m);
444
+ }
445
+ return this;
446
+ }
447
+ static fromBinary(bytes, options) {
448
+ return new BoolValue().fromBinary(bytes, options);
449
+ }
450
+ static fromJson(jsonValue, options) {
451
+ return new BoolValue().fromJson(jsonValue, options);
452
+ }
453
+ static fromJsonString(jsonString, options) {
454
+ return new BoolValue().fromJsonString(jsonString, options);
455
+ }
456
+ static equals(a, b) {
457
+ return index_js_1.proto3.util.equals(BoolValue, a, b);
458
+ }
510
459
  }
511
460
  exports.BoolValue = BoolValue;
512
461
  BoolValue.runtime = index_js_1.proto3;
513
462
  BoolValue.typeName = "google.protobuf.BoolValue";
514
463
  BoolValue.fields = index_js_1.proto3.util.newFieldList(() => [
515
- { no: 1, name: "value", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
464
+ { no: 1, name: "value", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
516
465
  ]);
517
466
  BoolValue.fieldWrapper = {
518
- wrapField(value) {
519
- return value instanceof BoolValue ? value : new BoolValue({ value });
520
- },
521
- unwrapField(value) {
522
- return value.value;
523
- },
467
+ wrapField(value) {
468
+ return value instanceof BoolValue ? value : new BoolValue({ value });
469
+ },
470
+ unwrapField(value) {
471
+ return value.value;
472
+ }
524
473
  };
525
474
  /**
526
475
  * Wrapper message for `string`.
@@ -530,64 +479,58 @@ BoolValue.fieldWrapper = {
530
479
  * @generated from message google.protobuf.StringValue
531
480
  */
532
481
  class StringValue extends index_js_1.Message {
533
- constructor(data) {
534
- super();
535
- /**
536
- * The string value.
537
- *
538
- * @generated from field: string value = 1;
539
- */
540
- this.value = "";
541
- index_js_1.proto3.util.initPartial(data, this);
542
- }
543
- toJson(options) {
544
- return index_js_1.proto3.json.writeScalar(
545
- index_js_1.ScalarType.STRING,
546
- this.value,
547
- true
548
- );
549
- }
550
- fromJson(json, options) {
551
- try {
552
- this.value = index_js_1.proto3.json.readScalar(
553
- index_js_1.ScalarType.STRING,
554
- json
555
- );
556
- } catch (e) {
557
- let m = `cannot decode message google.protobuf.StringValue from JSON"`;
558
- if (e instanceof Error && e.message.length > 0) {
559
- m += `: ${e.message}`;
560
- }
561
- throw new Error(m);
562
- }
563
- return this;
564
- }
565
- static fromBinary(bytes, options) {
566
- return new StringValue().fromBinary(bytes, options);
567
- }
568
- static fromJson(jsonValue, options) {
569
- return new StringValue().fromJson(jsonValue, options);
570
- }
571
- static fromJsonString(jsonString, options) {
572
- return new StringValue().fromJsonString(jsonString, options);
573
- }
574
- static equals(a, b) {
575
- return index_js_1.proto3.util.equals(StringValue, a, b);
576
- }
482
+ constructor(data) {
483
+ super();
484
+ /**
485
+ * The string value.
486
+ *
487
+ * @generated from field: string value = 1;
488
+ */
489
+ this.value = "";
490
+ index_js_1.proto3.util.initPartial(data, this);
491
+ }
492
+ toJson(options) {
493
+ return index_js_1.proto3.json.writeScalar(index_js_1.ScalarType.STRING, this.value, true);
494
+ }
495
+ fromJson(json, options) {
496
+ try {
497
+ this.value = index_js_1.proto3.json.readScalar(index_js_1.ScalarType.STRING, json);
498
+ }
499
+ catch (e) {
500
+ let m = `cannot decode message google.protobuf.StringValue from JSON"`;
501
+ if (e instanceof Error && e.message.length > 0) {
502
+ m += `: ${e.message}`;
503
+ }
504
+ throw new Error(m);
505
+ }
506
+ return this;
507
+ }
508
+ static fromBinary(bytes, options) {
509
+ return new StringValue().fromBinary(bytes, options);
510
+ }
511
+ static fromJson(jsonValue, options) {
512
+ return new StringValue().fromJson(jsonValue, options);
513
+ }
514
+ static fromJsonString(jsonString, options) {
515
+ return new StringValue().fromJsonString(jsonString, options);
516
+ }
517
+ static equals(a, b) {
518
+ return index_js_1.proto3.util.equals(StringValue, a, b);
519
+ }
577
520
  }
578
521
  exports.StringValue = StringValue;
579
522
  StringValue.runtime = index_js_1.proto3;
580
523
  StringValue.typeName = "google.protobuf.StringValue";
581
524
  StringValue.fields = index_js_1.proto3.util.newFieldList(() => [
582
- { no: 1, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
525
+ { no: 1, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
583
526
  ]);
584
527
  StringValue.fieldWrapper = {
585
- wrapField(value) {
586
- return value instanceof StringValue ? value : new StringValue({ value });
587
- },
588
- unwrapField(value) {
589
- return value.value;
590
- },
528
+ wrapField(value) {
529
+ return value instanceof StringValue ? value : new StringValue({ value });
530
+ },
531
+ unwrapField(value) {
532
+ return value.value;
533
+ }
591
534
  };
592
535
  /**
593
536
  * Wrapper message for `bytes`.
@@ -597,62 +540,56 @@ StringValue.fieldWrapper = {
597
540
  * @generated from message google.protobuf.BytesValue
598
541
  */
599
542
  class BytesValue extends index_js_1.Message {
600
- constructor(data) {
601
- super();
602
- /**
603
- * The bytes value.
604
- *
605
- * @generated from field: bytes value = 1;
606
- */
607
- this.value = new Uint8Array(0);
608
- index_js_1.proto3.util.initPartial(data, this);
609
- }
610
- toJson(options) {
611
- return index_js_1.proto3.json.writeScalar(
612
- index_js_1.ScalarType.BYTES,
613
- this.value,
614
- true
615
- );
616
- }
617
- fromJson(json, options) {
618
- try {
619
- this.value = index_js_1.proto3.json.readScalar(
620
- index_js_1.ScalarType.BYTES,
621
- json
622
- );
623
- } catch (e) {
624
- let m = `cannot decode message google.protobuf.BytesValue from JSON"`;
625
- if (e instanceof Error && e.message.length > 0) {
626
- m += `: ${e.message}`;
627
- }
628
- throw new Error(m);
629
- }
630
- return this;
631
- }
632
- static fromBinary(bytes, options) {
633
- return new BytesValue().fromBinary(bytes, options);
634
- }
635
- static fromJson(jsonValue, options) {
636
- return new BytesValue().fromJson(jsonValue, options);
637
- }
638
- static fromJsonString(jsonString, options) {
639
- return new BytesValue().fromJsonString(jsonString, options);
640
- }
641
- static equals(a, b) {
642
- return index_js_1.proto3.util.equals(BytesValue, a, b);
643
- }
543
+ constructor(data) {
544
+ super();
545
+ /**
546
+ * The bytes value.
547
+ *
548
+ * @generated from field: bytes value = 1;
549
+ */
550
+ this.value = new Uint8Array(0);
551
+ index_js_1.proto3.util.initPartial(data, this);
552
+ }
553
+ toJson(options) {
554
+ return index_js_1.proto3.json.writeScalar(index_js_1.ScalarType.BYTES, this.value, true);
555
+ }
556
+ fromJson(json, options) {
557
+ try {
558
+ this.value = index_js_1.proto3.json.readScalar(index_js_1.ScalarType.BYTES, json);
559
+ }
560
+ catch (e) {
561
+ let m = `cannot decode message google.protobuf.BytesValue from JSON"`;
562
+ if (e instanceof Error && e.message.length > 0) {
563
+ m += `: ${e.message}`;
564
+ }
565
+ throw new Error(m);
566
+ }
567
+ return this;
568
+ }
569
+ static fromBinary(bytes, options) {
570
+ return new BytesValue().fromBinary(bytes, options);
571
+ }
572
+ static fromJson(jsonValue, options) {
573
+ return new BytesValue().fromJson(jsonValue, options);
574
+ }
575
+ static fromJsonString(jsonString, options) {
576
+ return new BytesValue().fromJsonString(jsonString, options);
577
+ }
578
+ static equals(a, b) {
579
+ return index_js_1.proto3.util.equals(BytesValue, a, b);
580
+ }
644
581
  }
645
582
  exports.BytesValue = BytesValue;
646
583
  BytesValue.runtime = index_js_1.proto3;
647
584
  BytesValue.typeName = "google.protobuf.BytesValue";
648
585
  BytesValue.fields = index_js_1.proto3.util.newFieldList(() => [
649
- { no: 1, name: "value", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
586
+ { no: 1, name: "value", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
650
587
  ]);
651
588
  BytesValue.fieldWrapper = {
652
- wrapField(value) {
653
- return value instanceof BytesValue ? value : new BytesValue({ value });
654
- },
655
- unwrapField(value) {
656
- return value.value;
657
- },
589
+ wrapField(value) {
590
+ return value instanceof BytesValue ? value : new BytesValue({ value });
591
+ },
592
+ unwrapField(value) {
593
+ return value.value;
594
+ }
658
595
  };