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