@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.
- package/README.md +6 -0
- package/dist/cjs/binary-encoding.js +434 -0
- package/dist/cjs/binary-format.js +2 -0
- package/dist/cjs/descriptor-registry.js +518 -0
- package/dist/cjs/descriptor-set.js +557 -0
- package/dist/cjs/enum.js +2 -0
- package/dist/cjs/field-list.js +2 -0
- package/dist/cjs/field.js +40 -0
- package/dist/cjs/google/protobuf/any_pb.js +280 -0
- package/dist/cjs/google/protobuf/api_pb.js +383 -0
- package/dist/cjs/google/protobuf/compiler/plugin_pb.js +334 -0
- package/dist/cjs/google/protobuf/descriptor_pb.js +2311 -0
- package/dist/cjs/google/protobuf/duration_pb.js +201 -0
- package/dist/cjs/google/protobuf/empty_pb.js +72 -0
- package/dist/cjs/google/protobuf/field_mask_pb.js +347 -0
- package/dist/cjs/google/protobuf/source_context_pb.js +74 -0
- package/dist/cjs/google/protobuf/struct_pb.js +288 -0
- package/dist/cjs/google/protobuf/timestamp_pb.js +271 -0
- package/dist/cjs/google/protobuf/type_pb.js +613 -0
- package/dist/cjs/google/protobuf/wrappers_pb.js +658 -0
- package/dist/cjs/google/varint.js +280 -0
- package/dist/cjs/index.js +148 -0
- package/dist/cjs/json-format.js +2 -0
- package/dist/cjs/message-type.js +2 -0
- package/dist/cjs/message.js +98 -0
- package/dist/cjs/private/assert.js +52 -0
- package/dist/cjs/private/base64.js +118 -0
- package/dist/cjs/private/binary-format-common.js +253 -0
- package/dist/cjs/private/binary-format-proto2.js +120 -0
- package/dist/cjs/private/binary-format-proto3.js +102 -0
- package/dist/cjs/private/enum.js +70 -0
- package/dist/cjs/private/field-list.js +62 -0
- package/dist/cjs/private/field-wrapper.js +25 -0
- package/dist/cjs/private/field.js +34 -0
- package/dist/cjs/private/json-format-common.js +482 -0
- package/dist/cjs/private/json-format-proto2.js +100 -0
- package/dist/cjs/private/json-format-proto3.js +103 -0
- package/dist/cjs/private/message-type.js +37 -0
- package/dist/cjs/private/names.js +101 -0
- package/dist/cjs/private/options-map.js +2 -0
- package/dist/cjs/private/proto-runtime.js +24 -0
- package/dist/cjs/private/scalars.js +138 -0
- package/dist/cjs/private/util-common.js +229 -0
- package/dist/cjs/private/util.js +2 -0
- package/dist/cjs/proto-int64.js +121 -0
- package/dist/cjs/proto2.js +86 -0
- package/dist/cjs/proto3.js +99 -0
- package/dist/cjs/service-type.js +43 -0
- package/dist/cjs/type-registry.js +42 -0
- package/dist/esm/binary-encoding.js +434 -0
- package/dist/esm/binary-format.js +1 -0
- package/dist/esm/descriptor-registry.js +521 -0
- package/dist/esm/descriptor-set.js +517 -0
- package/dist/esm/enum.js +1 -0
- package/dist/esm/field-list.js +1 -0
- package/dist/esm/field.js +37 -0
- package/dist/esm/google/protobuf/any_pb.js +276 -0
- package/dist/esm/google/protobuf/api_pb.js +350 -0
- package/dist/esm/google/protobuf/compiler/plugin_pb.js +318 -0
- package/dist/esm/google/protobuf/descriptor_pb.js +2213 -0
- package/dist/esm/google/protobuf/duration_pb.js +197 -0
- package/dist/esm/google/protobuf/empty_pb.js +68 -0
- package/dist/esm/google/protobuf/field_mask_pb.js +343 -0
- package/dist/esm/google/protobuf/source_context_pb.js +70 -0
- package/dist/esm/google/protobuf/struct_pb.js +282 -0
- package/dist/esm/google/protobuf/timestamp_pb.js +267 -0
- package/dist/esm/google/protobuf/type_pb.js +569 -0
- package/dist/esm/google/protobuf/wrappers_pb.js +574 -0
- package/dist/esm/google/varint.js +265 -0
- package/dist/esm/index.js +24 -0
- package/dist/esm/json-format.js +1 -0
- package/dist/esm/message-type.js +1 -0
- package/dist/esm/message.js +94 -0
- package/dist/esm/private/assert.js +41 -0
- package/dist/esm/private/base64.js +113 -0
- package/dist/esm/private/binary-format-common.js +243 -0
- package/dist/esm/private/binary-format-proto2.js +87 -0
- package/dist/esm/private/binary-format-proto3.js +74 -0
- package/dist/esm/private/enum.js +64 -0
- package/dist/esm/private/field-list.js +58 -0
- package/dist/esm/private/field-wrapper.js +20 -0
- package/dist/esm/private/field.js +27 -0
- package/dist/esm/private/json-format-common.js +473 -0
- package/dist/esm/private/json-format-proto2.js +90 -0
- package/dist/esm/private/json-format-proto3.js +89 -0
- package/dist/esm/private/message-type.js +33 -0
- package/dist/esm/private/names.js +90 -0
- package/dist/esm/private/options-map.js +1 -0
- package/dist/esm/private/proto-runtime.js +15 -0
- package/dist/esm/private/scalars.js +129 -0
- package/dist/esm/private/util-common.js +207 -0
- package/dist/esm/private/util.js +1 -0
- package/dist/esm/proto-int64.js +118 -0
- package/dist/esm/proto2.js +77 -0
- package/dist/esm/proto3.js +90 -0
- package/dist/esm/service-type.js +37 -0
- package/dist/esm/type-registry.js +38 -0
- package/dist/types/binary-encoding.d.ts +421 -0
- package/dist/types/binary-format.d.ts +109 -0
- package/dist/types/descriptor-registry.d.ts +42 -0
- package/dist/types/descriptor-set.d.ts +171 -0
- package/dist/types/enum.d.ts +31 -0
- package/dist/types/field-list.d.ts +27 -0
- package/dist/types/field.d.ts +295 -0
- package/dist/types/google/protobuf/any_pb.d.ts +167 -0
- package/dist/types/google/protobuf/api_pb.d.ts +296 -0
- package/dist/types/google/protobuf/compiler/plugin_pb.d.ts +294 -0
- package/dist/types/google/protobuf/descriptor_pb.d.ts +1959 -0
- package/dist/types/google/protobuf/duration_pb.d.ts +117 -0
- package/dist/types/google/protobuf/empty_pb.d.ts +44 -0
- package/dist/types/google/protobuf/field_mask_pb.d.ts +243 -0
- package/dist/types/google/protobuf/source_context_pb.d.ts +44 -0
- package/dist/types/google/protobuf/struct_pb.d.ts +205 -0
- package/dist/types/google/protobuf/timestamp_pb.d.ts +151 -0
- package/dist/types/google/protobuf/type_pb.d.ts +482 -0
- package/dist/types/google/protobuf/wrappers_pb.d.ts +379 -0
- package/dist/types/google/varint.d.ts +65 -0
- package/dist/types/index.d.ts +53 -0
- package/dist/types/json-format.d.ts +129 -0
- package/dist/types/message-type.d.ts +58 -0
- package/dist/types/message.d.ts +124 -0
- package/dist/types/private/assert.d.ts +19 -0
- package/dist/types/private/base64.d.ts +18 -0
- package/dist/types/private/binary-format-common.d.ts +38 -0
- package/dist/types/private/binary-format-proto2.d.ts +2 -0
- package/dist/types/private/binary-format-proto3.d.ts +2 -0
- package/dist/types/private/enum.d.ts +29 -0
- package/dist/types/private/field-list.d.ts +25 -0
- package/dist/types/private/field-wrapper.d.ts +27 -0
- package/dist/types/private/field.d.ts +15 -0
- package/dist/types/private/json-format-common.d.ts +30 -0
- package/dist/types/private/json-format-proto2.d.ts +2 -0
- package/dist/types/private/json-format-proto3.d.ts +2 -0
- package/dist/types/private/message-type.d.ts +15 -0
- package/dist/types/private/names.d.ts +19 -0
- package/dist/types/private/options-map.d.ts +7 -0
- package/dist/types/private/proto-runtime.d.ts +55 -0
- package/dist/types/private/scalars.d.ts +33 -0
- package/dist/types/private/util-common.d.ts +5 -0
- package/dist/types/private/util.d.ts +55 -0
- package/dist/types/proto-int64.d.ts +94 -0
- package/dist/types/proto2.d.ts +4 -0
- package/dist/types/proto3.d.ts +4 -0
- package/dist/types/service-type.d.ts +118 -0
- package/dist/types/type-registry.d.ts +37 -0
- package/package.json +31 -0
|
@@ -0,0 +1,658 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
// @generated by protoc-gen-es v0.0.1-alpha.1 with parameter "bootstrap_wkt=true,ts_nocheck=false"
|
|
4
|
+
// @generated from file google/protobuf/wrappers.proto (package google.protobuf, syntax proto3)
|
|
5
|
+
//
|
|
6
|
+
// Protocol Buffers - Google's data interchange format
|
|
7
|
+
// Copyright 2008 Google Inc. All rights reserved.
|
|
8
|
+
// https://developers.google.com/protocol-buffers/
|
|
9
|
+
//
|
|
10
|
+
// Redistribution and use in source and binary forms, with or without
|
|
11
|
+
// modification, are permitted provided that the following conditions are
|
|
12
|
+
// met:
|
|
13
|
+
//
|
|
14
|
+
// * Redistributions of source code must retain the above copyright
|
|
15
|
+
// notice, this list of conditions and the following disclaimer.
|
|
16
|
+
// * Redistributions in binary form must reproduce the above
|
|
17
|
+
// copyright notice, this list of conditions and the following disclaimer
|
|
18
|
+
// in the documentation and/or other materials provided with the
|
|
19
|
+
// distribution.
|
|
20
|
+
// * Neither the name of Google Inc. nor the names of its
|
|
21
|
+
// contributors may be used to endorse or promote products derived from
|
|
22
|
+
// this software without specific prior written permission.
|
|
23
|
+
//
|
|
24
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
25
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
26
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
27
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
28
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
29
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
30
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
31
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
32
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
33
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
34
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
35
|
+
// Wrappers for primitive (non-message) types. These types are useful
|
|
36
|
+
// for embedding primitives in the `google.protobuf.Any` type and for places
|
|
37
|
+
// where we need to distinguish between the absence of a primitive
|
|
38
|
+
// typed field and its default value.
|
|
39
|
+
//
|
|
40
|
+
// These wrappers have no meaningful use within repeated fields as they lack
|
|
41
|
+
// the ability to detect presence on individual elements.
|
|
42
|
+
// These wrappers have no meaningful use within a map or a oneof since
|
|
43
|
+
// individual entries of a map or fields of a oneof can already detect presence.
|
|
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;
|
|
55
|
+
const index_js_1 = require("../../index.js");
|
|
56
|
+
/**
|
|
57
|
+
* Wrapper message for `double`.
|
|
58
|
+
*
|
|
59
|
+
* The JSON representation for `DoubleValue` is JSON number.
|
|
60
|
+
*
|
|
61
|
+
* @generated from message google.protobuf.DoubleValue
|
|
62
|
+
*/
|
|
63
|
+
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
|
+
}
|
|
108
|
+
}
|
|
109
|
+
exports.DoubleValue = DoubleValue;
|
|
110
|
+
DoubleValue.runtime = index_js_1.proto3;
|
|
111
|
+
DoubleValue.typeName = "google.protobuf.DoubleValue";
|
|
112
|
+
DoubleValue.fields = index_js_1.proto3.util.newFieldList(() => [
|
|
113
|
+
{ no: 1, name: "value", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
|
|
114
|
+
]);
|
|
115
|
+
DoubleValue.fieldWrapper = {
|
|
116
|
+
wrapField(value) {
|
|
117
|
+
return value instanceof DoubleValue ? value : new DoubleValue({ value });
|
|
118
|
+
},
|
|
119
|
+
unwrapField(value) {
|
|
120
|
+
return value.value;
|
|
121
|
+
},
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* Wrapper message for `float`.
|
|
125
|
+
*
|
|
126
|
+
* The JSON representation for `FloatValue` is JSON number.
|
|
127
|
+
*
|
|
128
|
+
* @generated from message google.protobuf.FloatValue
|
|
129
|
+
*/
|
|
130
|
+
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
|
+
}
|
|
175
|
+
}
|
|
176
|
+
exports.FloatValue = FloatValue;
|
|
177
|
+
FloatValue.runtime = index_js_1.proto3;
|
|
178
|
+
FloatValue.typeName = "google.protobuf.FloatValue";
|
|
179
|
+
FloatValue.fields = index_js_1.proto3.util.newFieldList(() => [
|
|
180
|
+
{ no: 1, name: "value", kind: "scalar", T: 2 /* ScalarType.FLOAT */ },
|
|
181
|
+
]);
|
|
182
|
+
FloatValue.fieldWrapper = {
|
|
183
|
+
wrapField(value) {
|
|
184
|
+
return value instanceof FloatValue ? value : new FloatValue({ value });
|
|
185
|
+
},
|
|
186
|
+
unwrapField(value) {
|
|
187
|
+
return value.value;
|
|
188
|
+
},
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* Wrapper message for `int64`.
|
|
192
|
+
*
|
|
193
|
+
* The JSON representation for `Int64Value` is JSON string.
|
|
194
|
+
*
|
|
195
|
+
* @generated from message google.protobuf.Int64Value
|
|
196
|
+
*/
|
|
197
|
+
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
|
+
}
|
|
242
|
+
}
|
|
243
|
+
exports.Int64Value = Int64Value;
|
|
244
|
+
Int64Value.runtime = index_js_1.proto3;
|
|
245
|
+
Int64Value.typeName = "google.protobuf.Int64Value";
|
|
246
|
+
Int64Value.fields = index_js_1.proto3.util.newFieldList(() => [
|
|
247
|
+
{ no: 1, name: "value", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
|
|
248
|
+
]);
|
|
249
|
+
Int64Value.fieldWrapper = {
|
|
250
|
+
wrapField(value) {
|
|
251
|
+
return value instanceof Int64Value ? value : new Int64Value({ value });
|
|
252
|
+
},
|
|
253
|
+
unwrapField(value) {
|
|
254
|
+
return value.value;
|
|
255
|
+
},
|
|
256
|
+
};
|
|
257
|
+
/**
|
|
258
|
+
* Wrapper message for `uint64`.
|
|
259
|
+
*
|
|
260
|
+
* The JSON representation for `UInt64Value` is JSON string.
|
|
261
|
+
*
|
|
262
|
+
* @generated from message google.protobuf.UInt64Value
|
|
263
|
+
*/
|
|
264
|
+
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
|
+
}
|
|
309
|
+
}
|
|
310
|
+
exports.UInt64Value = UInt64Value;
|
|
311
|
+
UInt64Value.runtime = index_js_1.proto3;
|
|
312
|
+
UInt64Value.typeName = "google.protobuf.UInt64Value";
|
|
313
|
+
UInt64Value.fields = index_js_1.proto3.util.newFieldList(() => [
|
|
314
|
+
{ no: 1, name: "value", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
|
|
315
|
+
]);
|
|
316
|
+
UInt64Value.fieldWrapper = {
|
|
317
|
+
wrapField(value) {
|
|
318
|
+
return value instanceof UInt64Value ? value : new UInt64Value({ value });
|
|
319
|
+
},
|
|
320
|
+
unwrapField(value) {
|
|
321
|
+
return value.value;
|
|
322
|
+
},
|
|
323
|
+
};
|
|
324
|
+
/**
|
|
325
|
+
* Wrapper message for `int32`.
|
|
326
|
+
*
|
|
327
|
+
* The JSON representation for `Int32Value` is JSON number.
|
|
328
|
+
*
|
|
329
|
+
* @generated from message google.protobuf.Int32Value
|
|
330
|
+
*/
|
|
331
|
+
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
|
+
}
|
|
376
|
+
}
|
|
377
|
+
exports.Int32Value = Int32Value;
|
|
378
|
+
Int32Value.runtime = index_js_1.proto3;
|
|
379
|
+
Int32Value.typeName = "google.protobuf.Int32Value";
|
|
380
|
+
Int32Value.fields = index_js_1.proto3.util.newFieldList(() => [
|
|
381
|
+
{ no: 1, name: "value", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
382
|
+
]);
|
|
383
|
+
Int32Value.fieldWrapper = {
|
|
384
|
+
wrapField(value) {
|
|
385
|
+
return value instanceof Int32Value ? value : new Int32Value({ value });
|
|
386
|
+
},
|
|
387
|
+
unwrapField(value) {
|
|
388
|
+
return value.value;
|
|
389
|
+
},
|
|
390
|
+
};
|
|
391
|
+
/**
|
|
392
|
+
* Wrapper message for `uint32`.
|
|
393
|
+
*
|
|
394
|
+
* The JSON representation for `UInt32Value` is JSON number.
|
|
395
|
+
*
|
|
396
|
+
* @generated from message google.protobuf.UInt32Value
|
|
397
|
+
*/
|
|
398
|
+
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
|
+
}
|
|
443
|
+
}
|
|
444
|
+
exports.UInt32Value = UInt32Value;
|
|
445
|
+
UInt32Value.runtime = index_js_1.proto3;
|
|
446
|
+
UInt32Value.typeName = "google.protobuf.UInt32Value";
|
|
447
|
+
UInt32Value.fields = index_js_1.proto3.util.newFieldList(() => [
|
|
448
|
+
{ no: 1, name: "value", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
|
|
449
|
+
]);
|
|
450
|
+
UInt32Value.fieldWrapper = {
|
|
451
|
+
wrapField(value) {
|
|
452
|
+
return value instanceof UInt32Value ? value : new UInt32Value({ value });
|
|
453
|
+
},
|
|
454
|
+
unwrapField(value) {
|
|
455
|
+
return value.value;
|
|
456
|
+
},
|
|
457
|
+
};
|
|
458
|
+
/**
|
|
459
|
+
* Wrapper message for `bool`.
|
|
460
|
+
*
|
|
461
|
+
* The JSON representation for `BoolValue` is JSON `true` and `false`.
|
|
462
|
+
*
|
|
463
|
+
* @generated from message google.protobuf.BoolValue
|
|
464
|
+
*/
|
|
465
|
+
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
|
+
}
|
|
510
|
+
}
|
|
511
|
+
exports.BoolValue = BoolValue;
|
|
512
|
+
BoolValue.runtime = index_js_1.proto3;
|
|
513
|
+
BoolValue.typeName = "google.protobuf.BoolValue";
|
|
514
|
+
BoolValue.fields = index_js_1.proto3.util.newFieldList(() => [
|
|
515
|
+
{ no: 1, name: "value", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
|
|
516
|
+
]);
|
|
517
|
+
BoolValue.fieldWrapper = {
|
|
518
|
+
wrapField(value) {
|
|
519
|
+
return value instanceof BoolValue ? value : new BoolValue({ value });
|
|
520
|
+
},
|
|
521
|
+
unwrapField(value) {
|
|
522
|
+
return value.value;
|
|
523
|
+
},
|
|
524
|
+
};
|
|
525
|
+
/**
|
|
526
|
+
* Wrapper message for `string`.
|
|
527
|
+
*
|
|
528
|
+
* The JSON representation for `StringValue` is JSON string.
|
|
529
|
+
*
|
|
530
|
+
* @generated from message google.protobuf.StringValue
|
|
531
|
+
*/
|
|
532
|
+
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
|
+
}
|
|
577
|
+
}
|
|
578
|
+
exports.StringValue = StringValue;
|
|
579
|
+
StringValue.runtime = index_js_1.proto3;
|
|
580
|
+
StringValue.typeName = "google.protobuf.StringValue";
|
|
581
|
+
StringValue.fields = index_js_1.proto3.util.newFieldList(() => [
|
|
582
|
+
{ no: 1, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
583
|
+
]);
|
|
584
|
+
StringValue.fieldWrapper = {
|
|
585
|
+
wrapField(value) {
|
|
586
|
+
return value instanceof StringValue ? value : new StringValue({ value });
|
|
587
|
+
},
|
|
588
|
+
unwrapField(value) {
|
|
589
|
+
return value.value;
|
|
590
|
+
},
|
|
591
|
+
};
|
|
592
|
+
/**
|
|
593
|
+
* Wrapper message for `bytes`.
|
|
594
|
+
*
|
|
595
|
+
* The JSON representation for `BytesValue` is JSON string.
|
|
596
|
+
*
|
|
597
|
+
* @generated from message google.protobuf.BytesValue
|
|
598
|
+
*/
|
|
599
|
+
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
|
+
}
|
|
644
|
+
}
|
|
645
|
+
exports.BytesValue = BytesValue;
|
|
646
|
+
BytesValue.runtime = index_js_1.proto3;
|
|
647
|
+
BytesValue.typeName = "google.protobuf.BytesValue";
|
|
648
|
+
BytesValue.fields = index_js_1.proto3.util.newFieldList(() => [
|
|
649
|
+
{ no: 1, name: "value", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
|
|
650
|
+
]);
|
|
651
|
+
BytesValue.fieldWrapper = {
|
|
652
|
+
wrapField(value) {
|
|
653
|
+
return value instanceof BytesValue ? value : new BytesValue({ value });
|
|
654
|
+
},
|
|
655
|
+
unwrapField(value) {
|
|
656
|
+
return value.value;
|
|
657
|
+
},
|
|
658
|
+
};
|