mezon-js-protobuf 1.7.35 → 1.7.36
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/api/api.ts +40094 -39974
- package/dist/mezon-js-protobuf/api/api.d.ts +209 -10
- package/dist/mezon-js-protobuf/rtapi/realtime.d.ts +273 -213
- package/dist/mezon-js-protobuf.cjs.js +142 -3
- package/dist/mezon-js-protobuf.esm.mjs +142 -3
- package/google/protobuf/struct.ts +554 -554
- package/google/protobuf/timestamp.ts +223 -223
- package/google/protobuf/wrappers.ts +670 -670
- package/package.json +1 -1
- package/rtapi/realtime.ts +12663 -12663
|
@@ -1,670 +1,670 @@
|
|
|
1
|
-
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
-
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v1.181.2
|
|
4
|
-
// protoc
|
|
5
|
-
// source: google/protobuf/wrappers.proto
|
|
6
|
-
|
|
7
|
-
/* eslint-disable */
|
|
8
|
-
import Long from "long";
|
|
9
|
-
import _m0 from "protobufjs/minimal";
|
|
10
|
-
|
|
11
|
-
export const protobufPackage = "google.protobuf";
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Wrapper message for `double`.
|
|
15
|
-
*
|
|
16
|
-
* The JSON representation for `DoubleValue` is JSON number.
|
|
17
|
-
*/
|
|
18
|
-
export interface DoubleValue {
|
|
19
|
-
/** The double value. */
|
|
20
|
-
value: number;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Wrapper message for `float`.
|
|
25
|
-
*
|
|
26
|
-
* The JSON representation for `FloatValue` is JSON number.
|
|
27
|
-
*/
|
|
28
|
-
export interface FloatValue {
|
|
29
|
-
/** The float value. */
|
|
30
|
-
value: number;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Wrapper message for `int64`.
|
|
35
|
-
*
|
|
36
|
-
* The JSON representation for `Int64Value` is JSON string.
|
|
37
|
-
*/
|
|
38
|
-
export interface Int64Value {
|
|
39
|
-
/** The int64 value. */
|
|
40
|
-
value: number;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Wrapper message for `uint64`.
|
|
45
|
-
*
|
|
46
|
-
* The JSON representation for `UInt64Value` is JSON string.
|
|
47
|
-
*/
|
|
48
|
-
export interface UInt64Value {
|
|
49
|
-
/** The uint64 value. */
|
|
50
|
-
value: number;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Wrapper message for `int32`.
|
|
55
|
-
*
|
|
56
|
-
* The JSON representation for `Int32Value` is JSON number.
|
|
57
|
-
*/
|
|
58
|
-
export interface Int32Value {
|
|
59
|
-
/** The int32 value. */
|
|
60
|
-
value: number;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Wrapper message for `uint32`.
|
|
65
|
-
*
|
|
66
|
-
* The JSON representation for `UInt32Value` is JSON number.
|
|
67
|
-
*/
|
|
68
|
-
export interface UInt32Value {
|
|
69
|
-
/** The uint32 value. */
|
|
70
|
-
value: number;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Wrapper message for `bool`.
|
|
75
|
-
*
|
|
76
|
-
* The JSON representation for `BoolValue` is JSON `true` and `false`.
|
|
77
|
-
*/
|
|
78
|
-
export interface BoolValue {
|
|
79
|
-
/** The bool value. */
|
|
80
|
-
value: boolean;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Wrapper message for `string`.
|
|
85
|
-
*
|
|
86
|
-
* The JSON representation for `StringValue` is JSON string.
|
|
87
|
-
*/
|
|
88
|
-
export interface StringValue {
|
|
89
|
-
/** The string value. */
|
|
90
|
-
value: string;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Wrapper message for `bytes`.
|
|
95
|
-
*
|
|
96
|
-
* The JSON representation for `BytesValue` is JSON string.
|
|
97
|
-
*/
|
|
98
|
-
export interface BytesValue {
|
|
99
|
-
/** The bytes value. */
|
|
100
|
-
value: Uint8Array;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function createBaseDoubleValue(): DoubleValue {
|
|
104
|
-
return { value: 0 };
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
export const DoubleValue = {
|
|
108
|
-
encode(message: DoubleValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
109
|
-
if (message.value !== 0) {
|
|
110
|
-
writer.uint32(9).double(message.value);
|
|
111
|
-
}
|
|
112
|
-
return writer;
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): DoubleValue {
|
|
116
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
117
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
118
|
-
const message = createBaseDoubleValue();
|
|
119
|
-
while (reader.pos < end) {
|
|
120
|
-
const tag = reader.uint32();
|
|
121
|
-
switch (tag >>> 3) {
|
|
122
|
-
case 1:
|
|
123
|
-
if (tag !== 9) {
|
|
124
|
-
break;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
message.value = reader.double();
|
|
128
|
-
continue;
|
|
129
|
-
}
|
|
130
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
131
|
-
break;
|
|
132
|
-
}
|
|
133
|
-
reader.skipType(tag & 7);
|
|
134
|
-
}
|
|
135
|
-
return message;
|
|
136
|
-
},
|
|
137
|
-
|
|
138
|
-
fromJSON(object: any): DoubleValue {
|
|
139
|
-
return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
|
|
140
|
-
},
|
|
141
|
-
|
|
142
|
-
toJSON(message: DoubleValue): unknown {
|
|
143
|
-
const obj: any = {};
|
|
144
|
-
if (message.value !== 0) {
|
|
145
|
-
obj.value = message.value;
|
|
146
|
-
}
|
|
147
|
-
return obj;
|
|
148
|
-
},
|
|
149
|
-
|
|
150
|
-
create<I extends Exact<DeepPartial<DoubleValue>, I>>(base?: I): DoubleValue {
|
|
151
|
-
return DoubleValue.fromPartial(base ?? ({} as any));
|
|
152
|
-
},
|
|
153
|
-
fromPartial<I extends Exact<DeepPartial<DoubleValue>, I>>(object: I): DoubleValue {
|
|
154
|
-
const message = createBaseDoubleValue();
|
|
155
|
-
message.value = object.value ?? 0;
|
|
156
|
-
return message;
|
|
157
|
-
},
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
function createBaseFloatValue(): FloatValue {
|
|
161
|
-
return { value: 0 };
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
export const FloatValue = {
|
|
165
|
-
encode(message: FloatValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
166
|
-
if (message.value !== 0) {
|
|
167
|
-
writer.uint32(13).float(message.value);
|
|
168
|
-
}
|
|
169
|
-
return writer;
|
|
170
|
-
},
|
|
171
|
-
|
|
172
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): FloatValue {
|
|
173
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
174
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
175
|
-
const message = createBaseFloatValue();
|
|
176
|
-
while (reader.pos < end) {
|
|
177
|
-
const tag = reader.uint32();
|
|
178
|
-
switch (tag >>> 3) {
|
|
179
|
-
case 1:
|
|
180
|
-
if (tag !== 13) {
|
|
181
|
-
break;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
message.value = reader.float();
|
|
185
|
-
continue;
|
|
186
|
-
}
|
|
187
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
188
|
-
break;
|
|
189
|
-
}
|
|
190
|
-
reader.skipType(tag & 7);
|
|
191
|
-
}
|
|
192
|
-
return message;
|
|
193
|
-
},
|
|
194
|
-
|
|
195
|
-
fromJSON(object: any): FloatValue {
|
|
196
|
-
return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
|
|
197
|
-
},
|
|
198
|
-
|
|
199
|
-
toJSON(message: FloatValue): unknown {
|
|
200
|
-
const obj: any = {};
|
|
201
|
-
if (message.value !== 0) {
|
|
202
|
-
obj.value = message.value;
|
|
203
|
-
}
|
|
204
|
-
return obj;
|
|
205
|
-
},
|
|
206
|
-
|
|
207
|
-
create<I extends Exact<DeepPartial<FloatValue>, I>>(base?: I): FloatValue {
|
|
208
|
-
return FloatValue.fromPartial(base ?? ({} as any));
|
|
209
|
-
},
|
|
210
|
-
fromPartial<I extends Exact<DeepPartial<FloatValue>, I>>(object: I): FloatValue {
|
|
211
|
-
const message = createBaseFloatValue();
|
|
212
|
-
message.value = object.value ?? 0;
|
|
213
|
-
return message;
|
|
214
|
-
},
|
|
215
|
-
};
|
|
216
|
-
|
|
217
|
-
function createBaseInt64Value(): Int64Value {
|
|
218
|
-
return { value: 0 };
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
export const Int64Value = {
|
|
222
|
-
encode(message: Int64Value, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
223
|
-
if (message.value !== 0) {
|
|
224
|
-
writer.uint32(8).int64(message.value);
|
|
225
|
-
}
|
|
226
|
-
return writer;
|
|
227
|
-
},
|
|
228
|
-
|
|
229
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): Int64Value {
|
|
230
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
231
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
232
|
-
const message = createBaseInt64Value();
|
|
233
|
-
while (reader.pos < end) {
|
|
234
|
-
const tag = reader.uint32();
|
|
235
|
-
switch (tag >>> 3) {
|
|
236
|
-
case 1:
|
|
237
|
-
if (tag !== 8) {
|
|
238
|
-
break;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
message.value = longToNumber(reader.int64() as Long);
|
|
242
|
-
continue;
|
|
243
|
-
}
|
|
244
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
245
|
-
break;
|
|
246
|
-
}
|
|
247
|
-
reader.skipType(tag & 7);
|
|
248
|
-
}
|
|
249
|
-
return message;
|
|
250
|
-
},
|
|
251
|
-
|
|
252
|
-
fromJSON(object: any): Int64Value {
|
|
253
|
-
return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
|
|
254
|
-
},
|
|
255
|
-
|
|
256
|
-
toJSON(message: Int64Value): unknown {
|
|
257
|
-
const obj: any = {};
|
|
258
|
-
if (message.value !== 0) {
|
|
259
|
-
obj.value = Math.round(message.value);
|
|
260
|
-
}
|
|
261
|
-
return obj;
|
|
262
|
-
},
|
|
263
|
-
|
|
264
|
-
create<I extends Exact<DeepPartial<Int64Value>, I>>(base?: I): Int64Value {
|
|
265
|
-
return Int64Value.fromPartial(base ?? ({} as any));
|
|
266
|
-
},
|
|
267
|
-
fromPartial<I extends Exact<DeepPartial<Int64Value>, I>>(object: I): Int64Value {
|
|
268
|
-
const message = createBaseInt64Value();
|
|
269
|
-
message.value = object.value ?? 0;
|
|
270
|
-
return message;
|
|
271
|
-
},
|
|
272
|
-
};
|
|
273
|
-
|
|
274
|
-
function createBaseUInt64Value(): UInt64Value {
|
|
275
|
-
return { value: 0 };
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
export const UInt64Value = {
|
|
279
|
-
encode(message: UInt64Value, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
280
|
-
if (message.value !== 0) {
|
|
281
|
-
writer.uint32(8).uint64(message.value);
|
|
282
|
-
}
|
|
283
|
-
return writer;
|
|
284
|
-
},
|
|
285
|
-
|
|
286
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): UInt64Value {
|
|
287
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
288
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
289
|
-
const message = createBaseUInt64Value();
|
|
290
|
-
while (reader.pos < end) {
|
|
291
|
-
const tag = reader.uint32();
|
|
292
|
-
switch (tag >>> 3) {
|
|
293
|
-
case 1:
|
|
294
|
-
if (tag !== 8) {
|
|
295
|
-
break;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
message.value = longToNumber(reader.uint64() as Long);
|
|
299
|
-
continue;
|
|
300
|
-
}
|
|
301
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
302
|
-
break;
|
|
303
|
-
}
|
|
304
|
-
reader.skipType(tag & 7);
|
|
305
|
-
}
|
|
306
|
-
return message;
|
|
307
|
-
},
|
|
308
|
-
|
|
309
|
-
fromJSON(object: any): UInt64Value {
|
|
310
|
-
return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
|
|
311
|
-
},
|
|
312
|
-
|
|
313
|
-
toJSON(message: UInt64Value): unknown {
|
|
314
|
-
const obj: any = {};
|
|
315
|
-
if (message.value !== 0) {
|
|
316
|
-
obj.value = Math.round(message.value);
|
|
317
|
-
}
|
|
318
|
-
return obj;
|
|
319
|
-
},
|
|
320
|
-
|
|
321
|
-
create<I extends Exact<DeepPartial<UInt64Value>, I>>(base?: I): UInt64Value {
|
|
322
|
-
return UInt64Value.fromPartial(base ?? ({} as any));
|
|
323
|
-
},
|
|
324
|
-
fromPartial<I extends Exact<DeepPartial<UInt64Value>, I>>(object: I): UInt64Value {
|
|
325
|
-
const message = createBaseUInt64Value();
|
|
326
|
-
message.value = object.value ?? 0;
|
|
327
|
-
return message;
|
|
328
|
-
},
|
|
329
|
-
};
|
|
330
|
-
|
|
331
|
-
function createBaseInt32Value(): Int32Value {
|
|
332
|
-
return { value: 0 };
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
export const Int32Value = {
|
|
336
|
-
encode(message: Int32Value, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
337
|
-
if (message.value !== 0) {
|
|
338
|
-
writer.uint32(8).int32(message.value);
|
|
339
|
-
}
|
|
340
|
-
return writer;
|
|
341
|
-
},
|
|
342
|
-
|
|
343
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): Int32Value {
|
|
344
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
345
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
346
|
-
const message = createBaseInt32Value();
|
|
347
|
-
while (reader.pos < end) {
|
|
348
|
-
const tag = reader.uint32();
|
|
349
|
-
switch (tag >>> 3) {
|
|
350
|
-
case 1:
|
|
351
|
-
if (tag !== 8) {
|
|
352
|
-
break;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
message.value = reader.int32();
|
|
356
|
-
continue;
|
|
357
|
-
}
|
|
358
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
359
|
-
break;
|
|
360
|
-
}
|
|
361
|
-
reader.skipType(tag & 7);
|
|
362
|
-
}
|
|
363
|
-
return message;
|
|
364
|
-
},
|
|
365
|
-
|
|
366
|
-
fromJSON(object: any): Int32Value {
|
|
367
|
-
return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
|
|
368
|
-
},
|
|
369
|
-
|
|
370
|
-
toJSON(message: Int32Value): unknown {
|
|
371
|
-
const obj: any = {};
|
|
372
|
-
if (message.value !== 0) {
|
|
373
|
-
obj.value = Math.round(message.value);
|
|
374
|
-
}
|
|
375
|
-
return obj;
|
|
376
|
-
},
|
|
377
|
-
|
|
378
|
-
create<I extends Exact<DeepPartial<Int32Value>, I>>(base?: I): Int32Value {
|
|
379
|
-
return Int32Value.fromPartial(base ?? ({} as any));
|
|
380
|
-
},
|
|
381
|
-
fromPartial<I extends Exact<DeepPartial<Int32Value>, I>>(object: I): Int32Value {
|
|
382
|
-
const message = createBaseInt32Value();
|
|
383
|
-
message.value = object.value ?? 0;
|
|
384
|
-
return message;
|
|
385
|
-
},
|
|
386
|
-
};
|
|
387
|
-
|
|
388
|
-
function createBaseUInt32Value(): UInt32Value {
|
|
389
|
-
return { value: 0 };
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
export const UInt32Value = {
|
|
393
|
-
encode(message: UInt32Value, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
394
|
-
if (message.value !== 0) {
|
|
395
|
-
writer.uint32(8).uint32(message.value);
|
|
396
|
-
}
|
|
397
|
-
return writer;
|
|
398
|
-
},
|
|
399
|
-
|
|
400
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): UInt32Value {
|
|
401
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
402
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
403
|
-
const message = createBaseUInt32Value();
|
|
404
|
-
while (reader.pos < end) {
|
|
405
|
-
const tag = reader.uint32();
|
|
406
|
-
switch (tag >>> 3) {
|
|
407
|
-
case 1:
|
|
408
|
-
if (tag !== 8) {
|
|
409
|
-
break;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
message.value = reader.uint32();
|
|
413
|
-
continue;
|
|
414
|
-
}
|
|
415
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
416
|
-
break;
|
|
417
|
-
}
|
|
418
|
-
reader.skipType(tag & 7);
|
|
419
|
-
}
|
|
420
|
-
return message;
|
|
421
|
-
},
|
|
422
|
-
|
|
423
|
-
fromJSON(object: any): UInt32Value {
|
|
424
|
-
return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
|
|
425
|
-
},
|
|
426
|
-
|
|
427
|
-
toJSON(message: UInt32Value): unknown {
|
|
428
|
-
const obj: any = {};
|
|
429
|
-
if (message.value !== 0) {
|
|
430
|
-
obj.value = Math.round(message.value);
|
|
431
|
-
}
|
|
432
|
-
return obj;
|
|
433
|
-
},
|
|
434
|
-
|
|
435
|
-
create<I extends Exact<DeepPartial<UInt32Value>, I>>(base?: I): UInt32Value {
|
|
436
|
-
return UInt32Value.fromPartial(base ?? ({} as any));
|
|
437
|
-
},
|
|
438
|
-
fromPartial<I extends Exact<DeepPartial<UInt32Value>, I>>(object: I): UInt32Value {
|
|
439
|
-
const message = createBaseUInt32Value();
|
|
440
|
-
message.value = object.value ?? 0;
|
|
441
|
-
return message;
|
|
442
|
-
},
|
|
443
|
-
};
|
|
444
|
-
|
|
445
|
-
function createBaseBoolValue(): BoolValue {
|
|
446
|
-
return { value: false };
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
export const BoolValue = {
|
|
450
|
-
encode(message: BoolValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
451
|
-
if (message.value !== false) {
|
|
452
|
-
writer.uint32(8).bool(message.value);
|
|
453
|
-
}
|
|
454
|
-
return writer;
|
|
455
|
-
},
|
|
456
|
-
|
|
457
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): BoolValue {
|
|
458
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
459
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
460
|
-
const message = createBaseBoolValue();
|
|
461
|
-
while (reader.pos < end) {
|
|
462
|
-
const tag = reader.uint32();
|
|
463
|
-
switch (tag >>> 3) {
|
|
464
|
-
case 1:
|
|
465
|
-
if (tag !== 8) {
|
|
466
|
-
break;
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
message.value = reader.bool();
|
|
470
|
-
continue;
|
|
471
|
-
}
|
|
472
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
473
|
-
break;
|
|
474
|
-
}
|
|
475
|
-
reader.skipType(tag & 7);
|
|
476
|
-
}
|
|
477
|
-
return message;
|
|
478
|
-
},
|
|
479
|
-
|
|
480
|
-
fromJSON(object: any): BoolValue {
|
|
481
|
-
return { value: isSet(object.value) ? globalThis.Boolean(object.value) : false };
|
|
482
|
-
},
|
|
483
|
-
|
|
484
|
-
toJSON(message: BoolValue): unknown {
|
|
485
|
-
const obj: any = {};
|
|
486
|
-
if (message.value !== false) {
|
|
487
|
-
obj.value = message.value;
|
|
488
|
-
}
|
|
489
|
-
return obj;
|
|
490
|
-
},
|
|
491
|
-
|
|
492
|
-
create<I extends Exact<DeepPartial<BoolValue>, I>>(base?: I): BoolValue {
|
|
493
|
-
return BoolValue.fromPartial(base ?? ({} as any));
|
|
494
|
-
},
|
|
495
|
-
fromPartial<I extends Exact<DeepPartial<BoolValue>, I>>(object: I): BoolValue {
|
|
496
|
-
const message = createBaseBoolValue();
|
|
497
|
-
message.value = object.value ?? false;
|
|
498
|
-
return message;
|
|
499
|
-
},
|
|
500
|
-
};
|
|
501
|
-
|
|
502
|
-
function createBaseStringValue(): StringValue {
|
|
503
|
-
return { value: "" };
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
export const StringValue = {
|
|
507
|
-
encode(message: StringValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
508
|
-
if (message.value !== "") {
|
|
509
|
-
writer.uint32(10).string(message.value);
|
|
510
|
-
}
|
|
511
|
-
return writer;
|
|
512
|
-
},
|
|
513
|
-
|
|
514
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): StringValue {
|
|
515
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
516
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
517
|
-
const message = createBaseStringValue();
|
|
518
|
-
while (reader.pos < end) {
|
|
519
|
-
const tag = reader.uint32();
|
|
520
|
-
switch (tag >>> 3) {
|
|
521
|
-
case 1:
|
|
522
|
-
if (tag !== 10) {
|
|
523
|
-
break;
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
message.value = reader.string();
|
|
527
|
-
continue;
|
|
528
|
-
}
|
|
529
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
530
|
-
break;
|
|
531
|
-
}
|
|
532
|
-
reader.skipType(tag & 7);
|
|
533
|
-
}
|
|
534
|
-
return message;
|
|
535
|
-
},
|
|
536
|
-
|
|
537
|
-
fromJSON(object: any): StringValue {
|
|
538
|
-
return { value: isSet(object.value) ? globalThis.String(object.value) : "" };
|
|
539
|
-
},
|
|
540
|
-
|
|
541
|
-
toJSON(message: StringValue): unknown {
|
|
542
|
-
const obj: any = {};
|
|
543
|
-
if (message.value !== "") {
|
|
544
|
-
obj.value = message.value;
|
|
545
|
-
}
|
|
546
|
-
return obj;
|
|
547
|
-
},
|
|
548
|
-
|
|
549
|
-
create<I extends Exact<DeepPartial<StringValue>, I>>(base?: I): StringValue {
|
|
550
|
-
return StringValue.fromPartial(base ?? ({} as any));
|
|
551
|
-
},
|
|
552
|
-
fromPartial<I extends Exact<DeepPartial<StringValue>, I>>(object: I): StringValue {
|
|
553
|
-
const message = createBaseStringValue();
|
|
554
|
-
message.value = object.value ?? "";
|
|
555
|
-
return message;
|
|
556
|
-
},
|
|
557
|
-
};
|
|
558
|
-
|
|
559
|
-
function createBaseBytesValue(): BytesValue {
|
|
560
|
-
return { value: new Uint8Array(0) };
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
export const BytesValue = {
|
|
564
|
-
encode(message: BytesValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
565
|
-
if (message.value.length !== 0) {
|
|
566
|
-
writer.uint32(10).bytes(message.value);
|
|
567
|
-
}
|
|
568
|
-
return writer;
|
|
569
|
-
},
|
|
570
|
-
|
|
571
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): BytesValue {
|
|
572
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
573
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
574
|
-
const message = createBaseBytesValue();
|
|
575
|
-
while (reader.pos < end) {
|
|
576
|
-
const tag = reader.uint32();
|
|
577
|
-
switch (tag >>> 3) {
|
|
578
|
-
case 1:
|
|
579
|
-
if (tag !== 10) {
|
|
580
|
-
break;
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
message.value = reader.bytes();
|
|
584
|
-
continue;
|
|
585
|
-
}
|
|
586
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
587
|
-
break;
|
|
588
|
-
}
|
|
589
|
-
reader.skipType(tag & 7);
|
|
590
|
-
}
|
|
591
|
-
return message;
|
|
592
|
-
},
|
|
593
|
-
|
|
594
|
-
fromJSON(object: any): BytesValue {
|
|
595
|
-
return { value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(0) };
|
|
596
|
-
},
|
|
597
|
-
|
|
598
|
-
toJSON(message: BytesValue): unknown {
|
|
599
|
-
const obj: any = {};
|
|
600
|
-
if (message.value.length !== 0) {
|
|
601
|
-
obj.value = base64FromBytes(message.value);
|
|
602
|
-
}
|
|
603
|
-
return obj;
|
|
604
|
-
},
|
|
605
|
-
|
|
606
|
-
create<I extends Exact<DeepPartial<BytesValue>, I>>(base?: I): BytesValue {
|
|
607
|
-
return BytesValue.fromPartial(base ?? ({} as any));
|
|
608
|
-
},
|
|
609
|
-
fromPartial<I extends Exact<DeepPartial<BytesValue>, I>>(object: I): BytesValue {
|
|
610
|
-
const message = createBaseBytesValue();
|
|
611
|
-
message.value = object.value ?? new Uint8Array(0);
|
|
612
|
-
return message;
|
|
613
|
-
},
|
|
614
|
-
};
|
|
615
|
-
|
|
616
|
-
function bytesFromBase64(b64: string): Uint8Array {
|
|
617
|
-
if ((globalThis as any).Buffer) {
|
|
618
|
-
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
619
|
-
} else {
|
|
620
|
-
const bin = globalThis.atob(b64);
|
|
621
|
-
const arr = new Uint8Array(bin.length);
|
|
622
|
-
for (let i = 0; i < bin.length; ++i) {
|
|
623
|
-
arr[i] = bin.charCodeAt(i);
|
|
624
|
-
}
|
|
625
|
-
return arr;
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
function base64FromBytes(arr: Uint8Array): string {
|
|
630
|
-
if ((globalThis as any).Buffer) {
|
|
631
|
-
return globalThis.Buffer.from(arr).toString("base64");
|
|
632
|
-
} else {
|
|
633
|
-
const bin: string[] = [];
|
|
634
|
-
arr.forEach((byte) => {
|
|
635
|
-
bin.push(globalThis.String.fromCharCode(byte));
|
|
636
|
-
});
|
|
637
|
-
return globalThis.btoa(bin.join(""));
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
642
|
-
|
|
643
|
-
export type DeepPartial<T> = T extends Builtin ? T
|
|
644
|
-
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
645
|
-
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
646
|
-
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
647
|
-
: Partial<T>;
|
|
648
|
-
|
|
649
|
-
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
650
|
-
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
651
|
-
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
652
|
-
|
|
653
|
-
function longToNumber(long: Long): number {
|
|
654
|
-
if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
|
|
655
|
-
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
656
|
-
}
|
|
657
|
-
if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
|
|
658
|
-
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
659
|
-
}
|
|
660
|
-
return long.toNumber();
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
if (_m0.util.Long !== Long) {
|
|
664
|
-
_m0.util.Long = Long as any;
|
|
665
|
-
_m0.configure();
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
function isSet(value: any): boolean {
|
|
669
|
-
return value !== null && value !== undefined;
|
|
670
|
-
}
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v1.181.2
|
|
4
|
+
// protoc v5.28.3
|
|
5
|
+
// source: google/protobuf/wrappers.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import Long from "long";
|
|
9
|
+
import _m0 from "protobufjs/minimal";
|
|
10
|
+
|
|
11
|
+
export const protobufPackage = "google.protobuf";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Wrapper message for `double`.
|
|
15
|
+
*
|
|
16
|
+
* The JSON representation for `DoubleValue` is JSON number.
|
|
17
|
+
*/
|
|
18
|
+
export interface DoubleValue {
|
|
19
|
+
/** The double value. */
|
|
20
|
+
value: number;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Wrapper message for `float`.
|
|
25
|
+
*
|
|
26
|
+
* The JSON representation for `FloatValue` is JSON number.
|
|
27
|
+
*/
|
|
28
|
+
export interface FloatValue {
|
|
29
|
+
/** The float value. */
|
|
30
|
+
value: number;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Wrapper message for `int64`.
|
|
35
|
+
*
|
|
36
|
+
* The JSON representation for `Int64Value` is JSON string.
|
|
37
|
+
*/
|
|
38
|
+
export interface Int64Value {
|
|
39
|
+
/** The int64 value. */
|
|
40
|
+
value: number;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Wrapper message for `uint64`.
|
|
45
|
+
*
|
|
46
|
+
* The JSON representation for `UInt64Value` is JSON string.
|
|
47
|
+
*/
|
|
48
|
+
export interface UInt64Value {
|
|
49
|
+
/** The uint64 value. */
|
|
50
|
+
value: number;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Wrapper message for `int32`.
|
|
55
|
+
*
|
|
56
|
+
* The JSON representation for `Int32Value` is JSON number.
|
|
57
|
+
*/
|
|
58
|
+
export interface Int32Value {
|
|
59
|
+
/** The int32 value. */
|
|
60
|
+
value: number;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Wrapper message for `uint32`.
|
|
65
|
+
*
|
|
66
|
+
* The JSON representation for `UInt32Value` is JSON number.
|
|
67
|
+
*/
|
|
68
|
+
export interface UInt32Value {
|
|
69
|
+
/** The uint32 value. */
|
|
70
|
+
value: number;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Wrapper message for `bool`.
|
|
75
|
+
*
|
|
76
|
+
* The JSON representation for `BoolValue` is JSON `true` and `false`.
|
|
77
|
+
*/
|
|
78
|
+
export interface BoolValue {
|
|
79
|
+
/** The bool value. */
|
|
80
|
+
value: boolean;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Wrapper message for `string`.
|
|
85
|
+
*
|
|
86
|
+
* The JSON representation for `StringValue` is JSON string.
|
|
87
|
+
*/
|
|
88
|
+
export interface StringValue {
|
|
89
|
+
/** The string value. */
|
|
90
|
+
value: string;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Wrapper message for `bytes`.
|
|
95
|
+
*
|
|
96
|
+
* The JSON representation for `BytesValue` is JSON string.
|
|
97
|
+
*/
|
|
98
|
+
export interface BytesValue {
|
|
99
|
+
/** The bytes value. */
|
|
100
|
+
value: Uint8Array;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function createBaseDoubleValue(): DoubleValue {
|
|
104
|
+
return { value: 0 };
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export const DoubleValue = {
|
|
108
|
+
encode(message: DoubleValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
109
|
+
if (message.value !== 0) {
|
|
110
|
+
writer.uint32(9).double(message.value);
|
|
111
|
+
}
|
|
112
|
+
return writer;
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): DoubleValue {
|
|
116
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
117
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
118
|
+
const message = createBaseDoubleValue();
|
|
119
|
+
while (reader.pos < end) {
|
|
120
|
+
const tag = reader.uint32();
|
|
121
|
+
switch (tag >>> 3) {
|
|
122
|
+
case 1:
|
|
123
|
+
if (tag !== 9) {
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
message.value = reader.double();
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
reader.skipType(tag & 7);
|
|
134
|
+
}
|
|
135
|
+
return message;
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
fromJSON(object: any): DoubleValue {
|
|
139
|
+
return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
|
|
140
|
+
},
|
|
141
|
+
|
|
142
|
+
toJSON(message: DoubleValue): unknown {
|
|
143
|
+
const obj: any = {};
|
|
144
|
+
if (message.value !== 0) {
|
|
145
|
+
obj.value = message.value;
|
|
146
|
+
}
|
|
147
|
+
return obj;
|
|
148
|
+
},
|
|
149
|
+
|
|
150
|
+
create<I extends Exact<DeepPartial<DoubleValue>, I>>(base?: I): DoubleValue {
|
|
151
|
+
return DoubleValue.fromPartial(base ?? ({} as any));
|
|
152
|
+
},
|
|
153
|
+
fromPartial<I extends Exact<DeepPartial<DoubleValue>, I>>(object: I): DoubleValue {
|
|
154
|
+
const message = createBaseDoubleValue();
|
|
155
|
+
message.value = object.value ?? 0;
|
|
156
|
+
return message;
|
|
157
|
+
},
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
function createBaseFloatValue(): FloatValue {
|
|
161
|
+
return { value: 0 };
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export const FloatValue = {
|
|
165
|
+
encode(message: FloatValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
166
|
+
if (message.value !== 0) {
|
|
167
|
+
writer.uint32(13).float(message.value);
|
|
168
|
+
}
|
|
169
|
+
return writer;
|
|
170
|
+
},
|
|
171
|
+
|
|
172
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): FloatValue {
|
|
173
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
174
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
175
|
+
const message = createBaseFloatValue();
|
|
176
|
+
while (reader.pos < end) {
|
|
177
|
+
const tag = reader.uint32();
|
|
178
|
+
switch (tag >>> 3) {
|
|
179
|
+
case 1:
|
|
180
|
+
if (tag !== 13) {
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
message.value = reader.float();
|
|
185
|
+
continue;
|
|
186
|
+
}
|
|
187
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
188
|
+
break;
|
|
189
|
+
}
|
|
190
|
+
reader.skipType(tag & 7);
|
|
191
|
+
}
|
|
192
|
+
return message;
|
|
193
|
+
},
|
|
194
|
+
|
|
195
|
+
fromJSON(object: any): FloatValue {
|
|
196
|
+
return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
|
|
197
|
+
},
|
|
198
|
+
|
|
199
|
+
toJSON(message: FloatValue): unknown {
|
|
200
|
+
const obj: any = {};
|
|
201
|
+
if (message.value !== 0) {
|
|
202
|
+
obj.value = message.value;
|
|
203
|
+
}
|
|
204
|
+
return obj;
|
|
205
|
+
},
|
|
206
|
+
|
|
207
|
+
create<I extends Exact<DeepPartial<FloatValue>, I>>(base?: I): FloatValue {
|
|
208
|
+
return FloatValue.fromPartial(base ?? ({} as any));
|
|
209
|
+
},
|
|
210
|
+
fromPartial<I extends Exact<DeepPartial<FloatValue>, I>>(object: I): FloatValue {
|
|
211
|
+
const message = createBaseFloatValue();
|
|
212
|
+
message.value = object.value ?? 0;
|
|
213
|
+
return message;
|
|
214
|
+
},
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
function createBaseInt64Value(): Int64Value {
|
|
218
|
+
return { value: 0 };
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export const Int64Value = {
|
|
222
|
+
encode(message: Int64Value, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
223
|
+
if (message.value !== 0) {
|
|
224
|
+
writer.uint32(8).int64(message.value);
|
|
225
|
+
}
|
|
226
|
+
return writer;
|
|
227
|
+
},
|
|
228
|
+
|
|
229
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): Int64Value {
|
|
230
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
231
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
232
|
+
const message = createBaseInt64Value();
|
|
233
|
+
while (reader.pos < end) {
|
|
234
|
+
const tag = reader.uint32();
|
|
235
|
+
switch (tag >>> 3) {
|
|
236
|
+
case 1:
|
|
237
|
+
if (tag !== 8) {
|
|
238
|
+
break;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
message.value = longToNumber(reader.int64() as Long);
|
|
242
|
+
continue;
|
|
243
|
+
}
|
|
244
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
245
|
+
break;
|
|
246
|
+
}
|
|
247
|
+
reader.skipType(tag & 7);
|
|
248
|
+
}
|
|
249
|
+
return message;
|
|
250
|
+
},
|
|
251
|
+
|
|
252
|
+
fromJSON(object: any): Int64Value {
|
|
253
|
+
return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
|
|
254
|
+
},
|
|
255
|
+
|
|
256
|
+
toJSON(message: Int64Value): unknown {
|
|
257
|
+
const obj: any = {};
|
|
258
|
+
if (message.value !== 0) {
|
|
259
|
+
obj.value = Math.round(message.value);
|
|
260
|
+
}
|
|
261
|
+
return obj;
|
|
262
|
+
},
|
|
263
|
+
|
|
264
|
+
create<I extends Exact<DeepPartial<Int64Value>, I>>(base?: I): Int64Value {
|
|
265
|
+
return Int64Value.fromPartial(base ?? ({} as any));
|
|
266
|
+
},
|
|
267
|
+
fromPartial<I extends Exact<DeepPartial<Int64Value>, I>>(object: I): Int64Value {
|
|
268
|
+
const message = createBaseInt64Value();
|
|
269
|
+
message.value = object.value ?? 0;
|
|
270
|
+
return message;
|
|
271
|
+
},
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
function createBaseUInt64Value(): UInt64Value {
|
|
275
|
+
return { value: 0 };
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export const UInt64Value = {
|
|
279
|
+
encode(message: UInt64Value, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
280
|
+
if (message.value !== 0) {
|
|
281
|
+
writer.uint32(8).uint64(message.value);
|
|
282
|
+
}
|
|
283
|
+
return writer;
|
|
284
|
+
},
|
|
285
|
+
|
|
286
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): UInt64Value {
|
|
287
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
288
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
289
|
+
const message = createBaseUInt64Value();
|
|
290
|
+
while (reader.pos < end) {
|
|
291
|
+
const tag = reader.uint32();
|
|
292
|
+
switch (tag >>> 3) {
|
|
293
|
+
case 1:
|
|
294
|
+
if (tag !== 8) {
|
|
295
|
+
break;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
message.value = longToNumber(reader.uint64() as Long);
|
|
299
|
+
continue;
|
|
300
|
+
}
|
|
301
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
302
|
+
break;
|
|
303
|
+
}
|
|
304
|
+
reader.skipType(tag & 7);
|
|
305
|
+
}
|
|
306
|
+
return message;
|
|
307
|
+
},
|
|
308
|
+
|
|
309
|
+
fromJSON(object: any): UInt64Value {
|
|
310
|
+
return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
|
|
311
|
+
},
|
|
312
|
+
|
|
313
|
+
toJSON(message: UInt64Value): unknown {
|
|
314
|
+
const obj: any = {};
|
|
315
|
+
if (message.value !== 0) {
|
|
316
|
+
obj.value = Math.round(message.value);
|
|
317
|
+
}
|
|
318
|
+
return obj;
|
|
319
|
+
},
|
|
320
|
+
|
|
321
|
+
create<I extends Exact<DeepPartial<UInt64Value>, I>>(base?: I): UInt64Value {
|
|
322
|
+
return UInt64Value.fromPartial(base ?? ({} as any));
|
|
323
|
+
},
|
|
324
|
+
fromPartial<I extends Exact<DeepPartial<UInt64Value>, I>>(object: I): UInt64Value {
|
|
325
|
+
const message = createBaseUInt64Value();
|
|
326
|
+
message.value = object.value ?? 0;
|
|
327
|
+
return message;
|
|
328
|
+
},
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
function createBaseInt32Value(): Int32Value {
|
|
332
|
+
return { value: 0 };
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
export const Int32Value = {
|
|
336
|
+
encode(message: Int32Value, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
337
|
+
if (message.value !== 0) {
|
|
338
|
+
writer.uint32(8).int32(message.value);
|
|
339
|
+
}
|
|
340
|
+
return writer;
|
|
341
|
+
},
|
|
342
|
+
|
|
343
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): Int32Value {
|
|
344
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
345
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
346
|
+
const message = createBaseInt32Value();
|
|
347
|
+
while (reader.pos < end) {
|
|
348
|
+
const tag = reader.uint32();
|
|
349
|
+
switch (tag >>> 3) {
|
|
350
|
+
case 1:
|
|
351
|
+
if (tag !== 8) {
|
|
352
|
+
break;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
message.value = reader.int32();
|
|
356
|
+
continue;
|
|
357
|
+
}
|
|
358
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
359
|
+
break;
|
|
360
|
+
}
|
|
361
|
+
reader.skipType(tag & 7);
|
|
362
|
+
}
|
|
363
|
+
return message;
|
|
364
|
+
},
|
|
365
|
+
|
|
366
|
+
fromJSON(object: any): Int32Value {
|
|
367
|
+
return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
|
|
368
|
+
},
|
|
369
|
+
|
|
370
|
+
toJSON(message: Int32Value): unknown {
|
|
371
|
+
const obj: any = {};
|
|
372
|
+
if (message.value !== 0) {
|
|
373
|
+
obj.value = Math.round(message.value);
|
|
374
|
+
}
|
|
375
|
+
return obj;
|
|
376
|
+
},
|
|
377
|
+
|
|
378
|
+
create<I extends Exact<DeepPartial<Int32Value>, I>>(base?: I): Int32Value {
|
|
379
|
+
return Int32Value.fromPartial(base ?? ({} as any));
|
|
380
|
+
},
|
|
381
|
+
fromPartial<I extends Exact<DeepPartial<Int32Value>, I>>(object: I): Int32Value {
|
|
382
|
+
const message = createBaseInt32Value();
|
|
383
|
+
message.value = object.value ?? 0;
|
|
384
|
+
return message;
|
|
385
|
+
},
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
function createBaseUInt32Value(): UInt32Value {
|
|
389
|
+
return { value: 0 };
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
export const UInt32Value = {
|
|
393
|
+
encode(message: UInt32Value, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
394
|
+
if (message.value !== 0) {
|
|
395
|
+
writer.uint32(8).uint32(message.value);
|
|
396
|
+
}
|
|
397
|
+
return writer;
|
|
398
|
+
},
|
|
399
|
+
|
|
400
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): UInt32Value {
|
|
401
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
402
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
403
|
+
const message = createBaseUInt32Value();
|
|
404
|
+
while (reader.pos < end) {
|
|
405
|
+
const tag = reader.uint32();
|
|
406
|
+
switch (tag >>> 3) {
|
|
407
|
+
case 1:
|
|
408
|
+
if (tag !== 8) {
|
|
409
|
+
break;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
message.value = reader.uint32();
|
|
413
|
+
continue;
|
|
414
|
+
}
|
|
415
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
416
|
+
break;
|
|
417
|
+
}
|
|
418
|
+
reader.skipType(tag & 7);
|
|
419
|
+
}
|
|
420
|
+
return message;
|
|
421
|
+
},
|
|
422
|
+
|
|
423
|
+
fromJSON(object: any): UInt32Value {
|
|
424
|
+
return { value: isSet(object.value) ? globalThis.Number(object.value) : 0 };
|
|
425
|
+
},
|
|
426
|
+
|
|
427
|
+
toJSON(message: UInt32Value): unknown {
|
|
428
|
+
const obj: any = {};
|
|
429
|
+
if (message.value !== 0) {
|
|
430
|
+
obj.value = Math.round(message.value);
|
|
431
|
+
}
|
|
432
|
+
return obj;
|
|
433
|
+
},
|
|
434
|
+
|
|
435
|
+
create<I extends Exact<DeepPartial<UInt32Value>, I>>(base?: I): UInt32Value {
|
|
436
|
+
return UInt32Value.fromPartial(base ?? ({} as any));
|
|
437
|
+
},
|
|
438
|
+
fromPartial<I extends Exact<DeepPartial<UInt32Value>, I>>(object: I): UInt32Value {
|
|
439
|
+
const message = createBaseUInt32Value();
|
|
440
|
+
message.value = object.value ?? 0;
|
|
441
|
+
return message;
|
|
442
|
+
},
|
|
443
|
+
};
|
|
444
|
+
|
|
445
|
+
function createBaseBoolValue(): BoolValue {
|
|
446
|
+
return { value: false };
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
export const BoolValue = {
|
|
450
|
+
encode(message: BoolValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
451
|
+
if (message.value !== false) {
|
|
452
|
+
writer.uint32(8).bool(message.value);
|
|
453
|
+
}
|
|
454
|
+
return writer;
|
|
455
|
+
},
|
|
456
|
+
|
|
457
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): BoolValue {
|
|
458
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
459
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
460
|
+
const message = createBaseBoolValue();
|
|
461
|
+
while (reader.pos < end) {
|
|
462
|
+
const tag = reader.uint32();
|
|
463
|
+
switch (tag >>> 3) {
|
|
464
|
+
case 1:
|
|
465
|
+
if (tag !== 8) {
|
|
466
|
+
break;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
message.value = reader.bool();
|
|
470
|
+
continue;
|
|
471
|
+
}
|
|
472
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
473
|
+
break;
|
|
474
|
+
}
|
|
475
|
+
reader.skipType(tag & 7);
|
|
476
|
+
}
|
|
477
|
+
return message;
|
|
478
|
+
},
|
|
479
|
+
|
|
480
|
+
fromJSON(object: any): BoolValue {
|
|
481
|
+
return { value: isSet(object.value) ? globalThis.Boolean(object.value) : false };
|
|
482
|
+
},
|
|
483
|
+
|
|
484
|
+
toJSON(message: BoolValue): unknown {
|
|
485
|
+
const obj: any = {};
|
|
486
|
+
if (message.value !== false) {
|
|
487
|
+
obj.value = message.value;
|
|
488
|
+
}
|
|
489
|
+
return obj;
|
|
490
|
+
},
|
|
491
|
+
|
|
492
|
+
create<I extends Exact<DeepPartial<BoolValue>, I>>(base?: I): BoolValue {
|
|
493
|
+
return BoolValue.fromPartial(base ?? ({} as any));
|
|
494
|
+
},
|
|
495
|
+
fromPartial<I extends Exact<DeepPartial<BoolValue>, I>>(object: I): BoolValue {
|
|
496
|
+
const message = createBaseBoolValue();
|
|
497
|
+
message.value = object.value ?? false;
|
|
498
|
+
return message;
|
|
499
|
+
},
|
|
500
|
+
};
|
|
501
|
+
|
|
502
|
+
function createBaseStringValue(): StringValue {
|
|
503
|
+
return { value: "" };
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
export const StringValue = {
|
|
507
|
+
encode(message: StringValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
508
|
+
if (message.value !== "") {
|
|
509
|
+
writer.uint32(10).string(message.value);
|
|
510
|
+
}
|
|
511
|
+
return writer;
|
|
512
|
+
},
|
|
513
|
+
|
|
514
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): StringValue {
|
|
515
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
516
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
517
|
+
const message = createBaseStringValue();
|
|
518
|
+
while (reader.pos < end) {
|
|
519
|
+
const tag = reader.uint32();
|
|
520
|
+
switch (tag >>> 3) {
|
|
521
|
+
case 1:
|
|
522
|
+
if (tag !== 10) {
|
|
523
|
+
break;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
message.value = reader.string();
|
|
527
|
+
continue;
|
|
528
|
+
}
|
|
529
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
530
|
+
break;
|
|
531
|
+
}
|
|
532
|
+
reader.skipType(tag & 7);
|
|
533
|
+
}
|
|
534
|
+
return message;
|
|
535
|
+
},
|
|
536
|
+
|
|
537
|
+
fromJSON(object: any): StringValue {
|
|
538
|
+
return { value: isSet(object.value) ? globalThis.String(object.value) : "" };
|
|
539
|
+
},
|
|
540
|
+
|
|
541
|
+
toJSON(message: StringValue): unknown {
|
|
542
|
+
const obj: any = {};
|
|
543
|
+
if (message.value !== "") {
|
|
544
|
+
obj.value = message.value;
|
|
545
|
+
}
|
|
546
|
+
return obj;
|
|
547
|
+
},
|
|
548
|
+
|
|
549
|
+
create<I extends Exact<DeepPartial<StringValue>, I>>(base?: I): StringValue {
|
|
550
|
+
return StringValue.fromPartial(base ?? ({} as any));
|
|
551
|
+
},
|
|
552
|
+
fromPartial<I extends Exact<DeepPartial<StringValue>, I>>(object: I): StringValue {
|
|
553
|
+
const message = createBaseStringValue();
|
|
554
|
+
message.value = object.value ?? "";
|
|
555
|
+
return message;
|
|
556
|
+
},
|
|
557
|
+
};
|
|
558
|
+
|
|
559
|
+
function createBaseBytesValue(): BytesValue {
|
|
560
|
+
return { value: new Uint8Array(0) };
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
export const BytesValue = {
|
|
564
|
+
encode(message: BytesValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
565
|
+
if (message.value.length !== 0) {
|
|
566
|
+
writer.uint32(10).bytes(message.value);
|
|
567
|
+
}
|
|
568
|
+
return writer;
|
|
569
|
+
},
|
|
570
|
+
|
|
571
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): BytesValue {
|
|
572
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
573
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
574
|
+
const message = createBaseBytesValue();
|
|
575
|
+
while (reader.pos < end) {
|
|
576
|
+
const tag = reader.uint32();
|
|
577
|
+
switch (tag >>> 3) {
|
|
578
|
+
case 1:
|
|
579
|
+
if (tag !== 10) {
|
|
580
|
+
break;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
message.value = reader.bytes();
|
|
584
|
+
continue;
|
|
585
|
+
}
|
|
586
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
587
|
+
break;
|
|
588
|
+
}
|
|
589
|
+
reader.skipType(tag & 7);
|
|
590
|
+
}
|
|
591
|
+
return message;
|
|
592
|
+
},
|
|
593
|
+
|
|
594
|
+
fromJSON(object: any): BytesValue {
|
|
595
|
+
return { value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(0) };
|
|
596
|
+
},
|
|
597
|
+
|
|
598
|
+
toJSON(message: BytesValue): unknown {
|
|
599
|
+
const obj: any = {};
|
|
600
|
+
if (message.value.length !== 0) {
|
|
601
|
+
obj.value = base64FromBytes(message.value);
|
|
602
|
+
}
|
|
603
|
+
return obj;
|
|
604
|
+
},
|
|
605
|
+
|
|
606
|
+
create<I extends Exact<DeepPartial<BytesValue>, I>>(base?: I): BytesValue {
|
|
607
|
+
return BytesValue.fromPartial(base ?? ({} as any));
|
|
608
|
+
},
|
|
609
|
+
fromPartial<I extends Exact<DeepPartial<BytesValue>, I>>(object: I): BytesValue {
|
|
610
|
+
const message = createBaseBytesValue();
|
|
611
|
+
message.value = object.value ?? new Uint8Array(0);
|
|
612
|
+
return message;
|
|
613
|
+
},
|
|
614
|
+
};
|
|
615
|
+
|
|
616
|
+
function bytesFromBase64(b64: string): Uint8Array {
|
|
617
|
+
if ((globalThis as any).Buffer) {
|
|
618
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
619
|
+
} else {
|
|
620
|
+
const bin = globalThis.atob(b64);
|
|
621
|
+
const arr = new Uint8Array(bin.length);
|
|
622
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
623
|
+
arr[i] = bin.charCodeAt(i);
|
|
624
|
+
}
|
|
625
|
+
return arr;
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
function base64FromBytes(arr: Uint8Array): string {
|
|
630
|
+
if ((globalThis as any).Buffer) {
|
|
631
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
632
|
+
} else {
|
|
633
|
+
const bin: string[] = [];
|
|
634
|
+
arr.forEach((byte) => {
|
|
635
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
636
|
+
});
|
|
637
|
+
return globalThis.btoa(bin.join(""));
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
642
|
+
|
|
643
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
644
|
+
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
645
|
+
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
646
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
647
|
+
: Partial<T>;
|
|
648
|
+
|
|
649
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
650
|
+
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
651
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
652
|
+
|
|
653
|
+
function longToNumber(long: Long): number {
|
|
654
|
+
if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
|
|
655
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
656
|
+
}
|
|
657
|
+
if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
|
|
658
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
659
|
+
}
|
|
660
|
+
return long.toNumber();
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
if (_m0.util.Long !== Long) {
|
|
664
|
+
_m0.util.Long = Long as any;
|
|
665
|
+
_m0.configure();
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
function isSet(value: any): boolean {
|
|
669
|
+
return value !== null && value !== undefined;
|
|
670
|
+
}
|