@milaboratories/pl-client 2.7.14 → 2.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/core/client.d.ts +4 -1
  2. package/dist/core/client.d.ts.map +1 -1
  3. package/dist/core/ll_client.d.ts +12 -2
  4. package/dist/core/ll_client.d.ts.map +1 -1
  5. package/dist/index.js +1 -1
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +4341 -4316
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/proto/github.com/googleapis/googleapis/google/rpc/status.d.ts +15 -15
  10. package/dist/proto/github.com/googleapis/googleapis/google/rpc/status.d.ts.map +1 -1
  11. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.d.ts +4 -4
  12. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.d.ts.map +1 -1
  13. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.d.ts +59 -59
  14. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.d.ts.map +1 -1
  15. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.d.ts +72 -72
  16. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.d.ts.map +1 -1
  17. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.d.ts +152 -152
  18. package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.d.ts.map +1 -1
  19. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.client.d.ts +156 -156
  20. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.client.d.ts.map +1 -1
  21. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.d.ts +790 -773
  22. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.d.ts.map +1 -1
  23. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api_types.d.ts +163 -163
  24. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api_types.d.ts.map +1 -1
  25. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/base_types.d.ts +22 -22
  26. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/base_types.d.ts.map +1 -1
  27. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/import.d.ts +32 -32
  28. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/import.d.ts.map +1 -1
  29. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/resource_types.d.ts +78 -78
  30. package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/resource_types.d.ts.map +1 -1
  31. package/dist/proto/google/protobuf/any.d.ts +52 -52
  32. package/dist/proto/google/protobuf/any.d.ts.map +1 -1
  33. package/dist/proto/google/protobuf/duration.d.ts +19 -19
  34. package/dist/proto/google/protobuf/duration.d.ts.map +1 -1
  35. package/dist/proto/google/protobuf/empty.d.ts.map +1 -1
  36. package/dist/proto/google/protobuf/struct.d.ts +56 -56
  37. package/dist/proto/google/protobuf/struct.d.ts.map +1 -1
  38. package/dist/proto/google/protobuf/timestamp.d.ts +25 -25
  39. package/dist/proto/google/protobuf/timestamp.d.ts.map +1 -1
  40. package/dist/proto/google/protobuf/wrappers.d.ts +72 -72
  41. package/dist/proto/google/protobuf/wrappers.d.ts.map +1 -1
  42. package/package.json +3 -3
  43. package/src/core/client.ts +31 -35
  44. package/src/core/ll_client.ts +48 -23
  45. package/src/proto/github.com/googleapis/googleapis/google/rpc/status.ts +72 -75
  46. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.ts +21 -22
  47. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.ts +276 -291
  48. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.ts +54 -59
  49. package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.ts +470 -491
  50. package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/api.client.ts +238 -263
  51. package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/api.ts +11058 -11752
  52. package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/api_types.ts +1115 -1156
  53. package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/base_types.ts +126 -132
  54. package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/import.ts +201 -204
  55. package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/resource_types.ts +541 -560
  56. package/src/proto/google/protobuf/any.ts +140 -150
  57. package/src/proto/google/protobuf/duration.ts +103 -108
  58. package/src/proto/google/protobuf/empty.ts +39 -42
  59. package/src/proto/google/protobuf/struct.ts +323 -337
  60. package/src/proto/google/protobuf/timestamp.ts +124 -132
  61. package/src/proto/google/protobuf/wrappers.ts +492 -537
@@ -1,4 +1,4 @@
1
- // @generated by protobuf-ts 2.9.5 with parameter client_generic,optimize_speed,generate_dependencies,force_server_none
1
+ // @generated by protobuf-ts 2.9.6 with parameter client_generic,optimize_speed,generate_dependencies,force_server_none
2
2
  // @generated from protobuf file "google/protobuf/struct.proto" (package "google.protobuf", syntax proto3)
3
3
  // tslint:disable
4
4
  //
@@ -32,21 +32,21 @@
32
32
  // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33
33
  // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
34
  //
35
- import type { BinaryWriteOptions } from '@protobuf-ts/runtime';
36
- import type { IBinaryWriter } from '@protobuf-ts/runtime';
37
- import { WireType } from '@protobuf-ts/runtime';
38
- import type { BinaryReadOptions } from '@protobuf-ts/runtime';
39
- import type { IBinaryReader } from '@protobuf-ts/runtime';
40
- import { UnknownFieldHandler } from '@protobuf-ts/runtime';
41
- import type { PartialMessage } from '@protobuf-ts/runtime';
42
- import { reflectionMergePartial } from '@protobuf-ts/runtime';
43
- import { isJsonObject } from '@protobuf-ts/runtime';
44
- import { typeofJsonValue } from '@protobuf-ts/runtime';
45
- import type { JsonValue } from '@protobuf-ts/runtime';
46
- import type { JsonReadOptions } from '@protobuf-ts/runtime';
47
- import type { JsonWriteOptions } from '@protobuf-ts/runtime';
48
- import type { JsonObject } from '@protobuf-ts/runtime';
49
- import { MessageType } from '@protobuf-ts/runtime';
35
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
36
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
37
+ import { WireType } from "@protobuf-ts/runtime";
38
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
39
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
40
+ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
41
+ import type { PartialMessage } from "@protobuf-ts/runtime";
42
+ import { reflectionMergePartial } from "@protobuf-ts/runtime";
43
+ import { isJsonObject } from "@protobuf-ts/runtime";
44
+ import { typeofJsonValue } from "@protobuf-ts/runtime";
45
+ import type { JsonValue } from "@protobuf-ts/runtime";
46
+ import type { JsonReadOptions } from "@protobuf-ts/runtime";
47
+ import type { JsonWriteOptions } from "@protobuf-ts/runtime";
48
+ import type { JsonObject } from "@protobuf-ts/runtime";
49
+ import { MessageType } from "@protobuf-ts/runtime";
50
50
  /**
51
51
  * `Struct` represents a structured data value, consisting of fields
52
52
  * which map to dynamically typed values. In some languages, `Struct`
@@ -60,14 +60,14 @@ import { MessageType } from '@protobuf-ts/runtime';
60
60
  * @generated from protobuf message google.protobuf.Struct
61
61
  */
62
62
  export interface Struct {
63
- /**
63
+ /**
64
64
  * Unordered map of dynamically typed values.
65
65
  *
66
66
  * @generated from protobuf field: map<string, google.protobuf.Value> fields = 1;
67
67
  */
68
- fields: {
69
- [key: string]: Value;
70
- };
68
+ fields: {
69
+ [key: string]: Value;
70
+ };
71
71
  }
72
72
  /**
73
73
  * `Value` represents a dynamically typed value which can be either
@@ -80,60 +80,60 @@ export interface Struct {
80
80
  * @generated from protobuf message google.protobuf.Value
81
81
  */
82
82
  export interface Value {
83
- /**
83
+ /**
84
84
  * @generated from protobuf oneof: kind
85
85
  */
86
- kind: {
87
- oneofKind: 'nullValue';
88
- /**
86
+ kind: {
87
+ oneofKind: "nullValue";
88
+ /**
89
89
  * Represents a null value.
90
90
  *
91
91
  * @generated from protobuf field: google.protobuf.NullValue null_value = 1;
92
92
  */
93
- nullValue: NullValue;
94
- } | {
95
- oneofKind: 'numberValue';
96
- /**
93
+ nullValue: NullValue;
94
+ } | {
95
+ oneofKind: "numberValue";
96
+ /**
97
97
  * Represents a double value.
98
98
  *
99
99
  * @generated from protobuf field: double number_value = 2;
100
100
  */
101
- numberValue: number;
102
- } | {
103
- oneofKind: 'stringValue';
104
- /**
101
+ numberValue: number;
102
+ } | {
103
+ oneofKind: "stringValue";
104
+ /**
105
105
  * Represents a string value.
106
106
  *
107
107
  * @generated from protobuf field: string string_value = 3;
108
108
  */
109
- stringValue: string;
110
- } | {
111
- oneofKind: 'boolValue';
112
- /**
109
+ stringValue: string;
110
+ } | {
111
+ oneofKind: "boolValue";
112
+ /**
113
113
  * Represents a boolean value.
114
114
  *
115
115
  * @generated from protobuf field: bool bool_value = 4;
116
116
  */
117
- boolValue: boolean;
118
- } | {
119
- oneofKind: 'structValue';
120
- /**
117
+ boolValue: boolean;
118
+ } | {
119
+ oneofKind: "structValue";
120
+ /**
121
121
  * Represents a structured value.
122
122
  *
123
123
  * @generated from protobuf field: google.protobuf.Struct struct_value = 5;
124
124
  */
125
- structValue: Struct;
126
- } | {
127
- oneofKind: 'listValue';
128
- /**
125
+ structValue: Struct;
126
+ } | {
127
+ oneofKind: "listValue";
128
+ /**
129
129
  * Represents a repeated `Value`.
130
130
  *
131
131
  * @generated from protobuf field: google.protobuf.ListValue list_value = 6;
132
132
  */
133
- listValue: ListValue;
134
- } | {
135
- oneofKind: undefined;
136
- };
133
+ listValue: ListValue;
134
+ } | {
135
+ oneofKind: undefined;
136
+ };
137
137
  }
138
138
  /**
139
139
  * `ListValue` is a wrapper around a repeated field of values.
@@ -143,12 +143,12 @@ export interface Value {
143
143
  * @generated from protobuf message google.protobuf.ListValue
144
144
  */
145
145
  export interface ListValue {
146
- /**
146
+ /**
147
147
  * Repeated field of dynamically typed values.
148
148
  *
149
149
  * @generated from protobuf field: repeated google.protobuf.Value values = 1;
150
150
  */
151
- values: Value[];
151
+ values: Value[];
152
152
  }
153
153
  /**
154
154
  * `NullValue` is a singleton enumeration to represent the null value for the
@@ -159,104 +159,98 @@ export interface ListValue {
159
159
  * @generated from protobuf enum google.protobuf.NullValue
160
160
  */
161
161
  export enum NullValue {
162
- /**
162
+ /**
163
163
  * Null value.
164
164
  *
165
165
  * @generated from protobuf enum value: NULL_VALUE = 0;
166
166
  */
167
- NULL_VALUE = 0,
167
+ NULL_VALUE = 0
168
168
  }
169
169
  // @generated message type with reflection information, may provide speed optimized methods
170
170
  class Struct$Type extends MessageType<Struct> {
171
- constructor() {
172
- super('google.protobuf.Struct', [
173
- { no: 1, name: 'fields', kind: 'map', K: 9 /* ScalarType.STRING */, V: { kind: 'message', T: () => Value } },
174
- ]);
175
- }
176
-
177
- /**
171
+ constructor() {
172
+ super("google.protobuf.Struct", [
173
+ { no: 1, name: "fields", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "message", T: () => Value } }
174
+ ]);
175
+ }
176
+ /**
178
177
  * Encode `Struct` to JSON object.
179
178
  */
180
- internalJsonWrite(message: Struct, options: JsonWriteOptions): JsonValue {
181
- const json: JsonObject = {};
182
- for (const [k, v] of Object.entries(message.fields)) {
183
- json[k] = Value.toJson(v);
179
+ internalJsonWrite(message: Struct, options: JsonWriteOptions): JsonValue {
180
+ let json: JsonObject = {};
181
+ for (let [k, v] of Object.entries(message.fields)) {
182
+ json[k] = Value.toJson(v);
183
+ }
184
+ return json;
184
185
  }
185
- return json;
186
- }
187
-
188
- /**
186
+ /**
189
187
  * Decode `Struct` from JSON object.
190
188
  */
191
- internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Struct): Struct {
192
- if (!isJsonObject(json))
193
- throw new globalThis.Error('Unable to parse message ' + this.typeName + ' from JSON ' + typeofJsonValue(json) + '.');
194
- if (!target)
195
- target = this.create();
196
- for (const [k, v] of globalThis.Object.entries(json)) {
197
- target.fields[k] = Value.fromJson(v);
189
+ internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Struct): Struct {
190
+ if (!isJsonObject(json))
191
+ throw new globalThis.Error("Unable to parse message " + this.typeName + " from JSON " + typeofJsonValue(json) + ".");
192
+ if (!target)
193
+ target = this.create();
194
+ for (let [k, v] of globalThis.Object.entries(json)) {
195
+ target.fields[k] = Value.fromJson(v);
196
+ }
197
+ return target;
198
198
  }
199
- return target;
200
- }
201
-
202
- create(value?: PartialMessage<Struct>): Struct {
203
- const message = globalThis.Object.create((this.messagePrototype!));
204
- message.fields = {};
205
- if (value !== undefined)
206
- reflectionMergePartial<Struct>(this, message, value);
207
- return message;
208
- }
209
-
210
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Struct): Struct {
211
- const message = target ?? this.create(), end = reader.pos + length;
212
- while (reader.pos < end) {
213
- const [fieldNo, wireType] = reader.tag();
214
- switch (fieldNo) {
215
- case /* map<string, google.protobuf.Value> fields */ 1:
216
- this.binaryReadMap1(message.fields, reader, options);
217
- break;
218
- default:
219
- const u = options.readUnknownField;
220
- if (u === 'throw')
221
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
222
- const d = reader.skip(wireType);
223
- if (u !== false)
224
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
225
- }
199
+ create(value?: PartialMessage<Struct>): Struct {
200
+ const message = globalThis.Object.create((this.messagePrototype!));
201
+ message.fields = {};
202
+ if (value !== undefined)
203
+ reflectionMergePartial<Struct>(this, message, value);
204
+ return message;
205
+ }
206
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Struct): Struct {
207
+ let message = target ?? this.create(), end = reader.pos + length;
208
+ while (reader.pos < end) {
209
+ let [fieldNo, wireType] = reader.tag();
210
+ switch (fieldNo) {
211
+ case /* map<string, google.protobuf.Value> fields */ 1:
212
+ this.binaryReadMap1(message.fields, reader, options);
213
+ break;
214
+ default:
215
+ let u = options.readUnknownField;
216
+ if (u === "throw")
217
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
218
+ let d = reader.skip(wireType);
219
+ if (u !== false)
220
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
221
+ }
222
+ }
223
+ return message;
226
224
  }
227
- return message;
228
- }
229
-
230
- private binaryReadMap1(map: Struct['fields'], reader: IBinaryReader, options: BinaryReadOptions): void {
231
- let len = reader.uint32(), end = reader.pos + len, key: keyof Struct['fields'] | undefined, val: Struct['fields'][any] | undefined;
232
- while (reader.pos < end) {
233
- const [fieldNo, wireType] = reader.tag();
234
- switch (fieldNo) {
235
- case 1:
236
- key = reader.string();
237
- break;
238
- case 2:
239
- val = Value.internalBinaryRead(reader, reader.uint32(), options);
240
- break;
241
- default: throw new globalThis.Error('unknown map entry field for field google.protobuf.Struct.fields');
242
- }
225
+ private binaryReadMap1(map: Struct["fields"], reader: IBinaryReader, options: BinaryReadOptions): void {
226
+ let len = reader.uint32(), end = reader.pos + len, key: keyof Struct["fields"] | undefined, val: Struct["fields"][any] | undefined;
227
+ while (reader.pos < end) {
228
+ let [fieldNo, wireType] = reader.tag();
229
+ switch (fieldNo) {
230
+ case 1:
231
+ key = reader.string();
232
+ break;
233
+ case 2:
234
+ val = Value.internalBinaryRead(reader, reader.uint32(), options);
235
+ break;
236
+ default: throw new globalThis.Error("unknown map entry field for field google.protobuf.Struct.fields");
237
+ }
238
+ }
239
+ map[key ?? ""] = val ?? Value.create();
243
240
  }
244
- map[key ?? ''] = val ?? Value.create();
245
- }
246
-
247
- internalBinaryWrite(message: Struct, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
248
- /* map<string, google.protobuf.Value> fields = 1; */
249
- for (const k of globalThis.Object.keys(message.fields)) {
250
- writer.tag(1, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k);
251
- writer.tag(2, WireType.LengthDelimited).fork();
252
- Value.internalBinaryWrite(message.fields[k], writer, options);
253
- writer.join().join();
241
+ internalBinaryWrite(message: Struct, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
242
+ /* map<string, google.protobuf.Value> fields = 1; */
243
+ for (let k of globalThis.Object.keys(message.fields)) {
244
+ writer.tag(1, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k);
245
+ writer.tag(2, WireType.LengthDelimited).fork();
246
+ Value.internalBinaryWrite(message.fields[k], writer, options);
247
+ writer.join().join();
248
+ }
249
+ let u = options.writeUnknownFields;
250
+ if (u !== false)
251
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
252
+ return writer;
254
253
  }
255
- const u = options.writeUnknownFields;
256
- if (u !== false)
257
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
258
- return writer;
259
- }
260
254
  }
261
255
  /**
262
256
  * @generated MessageType for protobuf message google.protobuf.Struct
@@ -264,161 +258,158 @@ class Struct$Type extends MessageType<Struct> {
264
258
  export const Struct = new Struct$Type();
265
259
  // @generated message type with reflection information, may provide speed optimized methods
266
260
  class Value$Type extends MessageType<Value> {
267
- constructor() {
268
- super('google.protobuf.Value', [
269
- { no: 1, name: 'null_value', kind: 'enum', oneof: 'kind', T: () => ['google.protobuf.NullValue', NullValue] },
270
- { no: 2, name: 'number_value', kind: 'scalar', oneof: 'kind', T: 1 /* ScalarType.DOUBLE */ },
271
- { no: 3, name: 'string_value', kind: 'scalar', oneof: 'kind', T: 9 /* ScalarType.STRING */ },
272
- { no: 4, name: 'bool_value', kind: 'scalar', oneof: 'kind', T: 8 /* ScalarType.BOOL */ },
273
- { no: 5, name: 'struct_value', kind: 'message', oneof: 'kind', T: () => Struct },
274
- { no: 6, name: 'list_value', kind: 'message', oneof: 'kind', T: () => ListValue },
275
- ]);
276
- }
277
-
278
- /**
261
+ constructor() {
262
+ super("google.protobuf.Value", [
263
+ { no: 1, name: "null_value", kind: "enum", oneof: "kind", T: () => ["google.protobuf.NullValue", NullValue] },
264
+ { no: 2, name: "number_value", kind: "scalar", oneof: "kind", T: 1 /*ScalarType.DOUBLE*/ },
265
+ { no: 3, name: "string_value", kind: "scalar", oneof: "kind", T: 9 /*ScalarType.STRING*/ },
266
+ { no: 4, name: "bool_value", kind: "scalar", oneof: "kind", T: 8 /*ScalarType.BOOL*/ },
267
+ { no: 5, name: "struct_value", kind: "message", oneof: "kind", T: () => Struct },
268
+ { no: 6, name: "list_value", kind: "message", oneof: "kind", T: () => ListValue }
269
+ ]);
270
+ }
271
+ /**
279
272
  * Encode `Value` to JSON value.
280
273
  */
281
- internalJsonWrite(message: Value, options: JsonWriteOptions): JsonValue {
282
- if (message.kind.oneofKind === undefined)
283
- throw new globalThis.Error();
284
- switch (message.kind.oneofKind) {
285
- case undefined: throw new globalThis.Error();
286
- case 'boolValue': return message.kind.boolValue;
287
- case 'nullValue': return null;
288
- case 'numberValue':
289
- const numberValue = message.kind.numberValue;
290
- if (typeof numberValue == 'number' && !Number.isFinite(numberValue))
291
- throw new globalThis.Error();
292
- return numberValue;
293
- case 'stringValue': return message.kind.stringValue;
294
- case 'listValue':
295
- const listValueField = this.fields.find((f) => f.no === 6);
296
- if (listValueField?.kind !== 'message')
297
- throw new globalThis.Error();
298
- return listValueField.T().toJson(message.kind.listValue);
299
- case 'structValue':
300
- const structValueField = this.fields.find((f) => f.no === 5);
301
- if (structValueField?.kind !== 'message')
302
- throw new globalThis.Error();
303
- return structValueField.T().toJson(message.kind.structValue);
274
+ internalJsonWrite(message: Value, options: JsonWriteOptions): JsonValue {
275
+ if (message.kind.oneofKind === undefined)
276
+ throw new globalThis.Error();
277
+ switch (message.kind.oneofKind) {
278
+ case undefined: throw new globalThis.Error();
279
+ case "boolValue": return message.kind.boolValue;
280
+ case "nullValue": return null;
281
+ case "numberValue":
282
+ let numberValue = message.kind.numberValue;
283
+ if (typeof numberValue == "number" && !Number.isFinite(numberValue))
284
+ throw new globalThis.Error();
285
+ return numberValue;
286
+ case "stringValue": return message.kind.stringValue;
287
+ case "listValue":
288
+ let listValueField = this.fields.find(f => f.no === 6);
289
+ if (listValueField?.kind !== "message")
290
+ throw new globalThis.Error();
291
+ return listValueField.T().toJson(message.kind.listValue);
292
+ case "structValue":
293
+ let structValueField = this.fields.find(f => f.no === 5);
294
+ if (structValueField?.kind !== "message")
295
+ throw new globalThis.Error();
296
+ return structValueField.T().toJson(message.kind.structValue);
297
+ }
304
298
  }
305
- }
306
-
307
- /**
299
+ /**
308
300
  * Decode `Value` from JSON value.
309
301
  */
310
- internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Value): Value {
311
- if (!target)
312
- target = this.create();
313
- switch (typeof json) {
314
- case 'number':
315
- target.kind = { oneofKind: 'numberValue', numberValue: json };
316
- break;
317
- case 'string':
318
- target.kind = { oneofKind: 'stringValue', stringValue: json };
319
- break;
320
- case 'boolean':
321
- target.kind = { oneofKind: 'boolValue', boolValue: json };
322
- break;
323
- case 'object':
324
- if (json === null) {
325
- target.kind = { oneofKind: 'nullValue', nullValue: NullValue.NULL_VALUE };
326
- } else if (globalThis.Array.isArray(json)) {
327
- target.kind = { oneofKind: 'listValue', listValue: ListValue.fromJson(json) };
328
- } else {
329
- target.kind = { oneofKind: 'structValue', structValue: Struct.fromJson(json) };
302
+ internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Value): Value {
303
+ if (!target)
304
+ target = this.create();
305
+ switch (typeof json) {
306
+ case "number":
307
+ target.kind = { oneofKind: "numberValue", numberValue: json };
308
+ break;
309
+ case "string":
310
+ target.kind = { oneofKind: "stringValue", stringValue: json };
311
+ break;
312
+ case "boolean":
313
+ target.kind = { oneofKind: "boolValue", boolValue: json };
314
+ break;
315
+ case "object":
316
+ if (json === null) {
317
+ target.kind = { oneofKind: "nullValue", nullValue: NullValue.NULL_VALUE };
318
+ }
319
+ else if (globalThis.Array.isArray(json)) {
320
+ target.kind = { oneofKind: "listValue", listValue: ListValue.fromJson(json) };
321
+ }
322
+ else {
323
+ target.kind = { oneofKind: "structValue", structValue: Struct.fromJson(json) };
324
+ }
325
+ break;
326
+ default: throw new globalThis.Error("Unable to parse " + this.typeName + " from JSON " + typeofJsonValue(json));
327
+ }
328
+ return target;
329
+ }
330
+ create(value?: PartialMessage<Value>): Value {
331
+ const message = globalThis.Object.create((this.messagePrototype!));
332
+ message.kind = { oneofKind: undefined };
333
+ if (value !== undefined)
334
+ reflectionMergePartial<Value>(this, message, value);
335
+ return message;
336
+ }
337
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Value): Value {
338
+ let message = target ?? this.create(), end = reader.pos + length;
339
+ while (reader.pos < end) {
340
+ let [fieldNo, wireType] = reader.tag();
341
+ switch (fieldNo) {
342
+ case /* google.protobuf.NullValue null_value */ 1:
343
+ message.kind = {
344
+ oneofKind: "nullValue",
345
+ nullValue: reader.int32()
346
+ };
347
+ break;
348
+ case /* double number_value */ 2:
349
+ message.kind = {
350
+ oneofKind: "numberValue",
351
+ numberValue: reader.double()
352
+ };
353
+ break;
354
+ case /* string string_value */ 3:
355
+ message.kind = {
356
+ oneofKind: "stringValue",
357
+ stringValue: reader.string()
358
+ };
359
+ break;
360
+ case /* bool bool_value */ 4:
361
+ message.kind = {
362
+ oneofKind: "boolValue",
363
+ boolValue: reader.bool()
364
+ };
365
+ break;
366
+ case /* google.protobuf.Struct struct_value */ 5:
367
+ message.kind = {
368
+ oneofKind: "structValue",
369
+ structValue: Struct.internalBinaryRead(reader, reader.uint32(), options, (message.kind as any).structValue)
370
+ };
371
+ break;
372
+ case /* google.protobuf.ListValue list_value */ 6:
373
+ message.kind = {
374
+ oneofKind: "listValue",
375
+ listValue: ListValue.internalBinaryRead(reader, reader.uint32(), options, (message.kind as any).listValue)
376
+ };
377
+ break;
378
+ default:
379
+ let u = options.readUnknownField;
380
+ if (u === "throw")
381
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
382
+ let d = reader.skip(wireType);
383
+ if (u !== false)
384
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
385
+ }
330
386
  }
331
- break;
332
- default: throw new globalThis.Error('Unable to parse ' + this.typeName + ' from JSON ' + typeofJsonValue(json));
387
+ return message;
333
388
  }
334
- return target;
335
- }
336
-
337
- create(value?: PartialMessage<Value>): Value {
338
- const message = globalThis.Object.create((this.messagePrototype!));
339
- message.kind = { oneofKind: undefined };
340
- if (value !== undefined)
341
- reflectionMergePartial<Value>(this, message, value);
342
- return message;
343
- }
344
-
345
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Value): Value {
346
- const message = target ?? this.create(), end = reader.pos + length;
347
- while (reader.pos < end) {
348
- const [fieldNo, wireType] = reader.tag();
349
- switch (fieldNo) {
350
- case /* google.protobuf.NullValue null_value */ 1:
351
- message.kind = {
352
- oneofKind: 'nullValue',
353
- nullValue: reader.int32(),
354
- };
355
- break;
356
- case /* double number_value */ 2:
357
- message.kind = {
358
- oneofKind: 'numberValue',
359
- numberValue: reader.double(),
360
- };
361
- break;
362
- case /* string string_value */ 3:
363
- message.kind = {
364
- oneofKind: 'stringValue',
365
- stringValue: reader.string(),
366
- };
367
- break;
368
- case /* bool bool_value */ 4:
369
- message.kind = {
370
- oneofKind: 'boolValue',
371
- boolValue: reader.bool(),
372
- };
373
- break;
374
- case /* google.protobuf.Struct struct_value */ 5:
375
- message.kind = {
376
- oneofKind: 'structValue',
377
- structValue: Struct.internalBinaryRead(reader, reader.uint32(), options, (message.kind as any).structValue),
378
- };
379
- break;
380
- case /* google.protobuf.ListValue list_value */ 6:
381
- message.kind = {
382
- oneofKind: 'listValue',
383
- listValue: ListValue.internalBinaryRead(reader, reader.uint32(), options, (message.kind as any).listValue),
384
- };
385
- break;
386
- default:
387
- const u = options.readUnknownField;
388
- if (u === 'throw')
389
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
390
- const d = reader.skip(wireType);
391
- if (u !== false)
392
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
393
- }
389
+ internalBinaryWrite(message: Value, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
390
+ /* google.protobuf.NullValue null_value = 1; */
391
+ if (message.kind.oneofKind === "nullValue")
392
+ writer.tag(1, WireType.Varint).int32(message.kind.nullValue);
393
+ /* double number_value = 2; */
394
+ if (message.kind.oneofKind === "numberValue")
395
+ writer.tag(2, WireType.Bit64).double(message.kind.numberValue);
396
+ /* string string_value = 3; */
397
+ if (message.kind.oneofKind === "stringValue")
398
+ writer.tag(3, WireType.LengthDelimited).string(message.kind.stringValue);
399
+ /* bool bool_value = 4; */
400
+ if (message.kind.oneofKind === "boolValue")
401
+ writer.tag(4, WireType.Varint).bool(message.kind.boolValue);
402
+ /* google.protobuf.Struct struct_value = 5; */
403
+ if (message.kind.oneofKind === "structValue")
404
+ Struct.internalBinaryWrite(message.kind.structValue, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
405
+ /* google.protobuf.ListValue list_value = 6; */
406
+ if (message.kind.oneofKind === "listValue")
407
+ ListValue.internalBinaryWrite(message.kind.listValue, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
408
+ let u = options.writeUnknownFields;
409
+ if (u !== false)
410
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
411
+ return writer;
394
412
  }
395
- return message;
396
- }
397
-
398
- internalBinaryWrite(message: Value, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
399
- /* google.protobuf.NullValue null_value = 1; */
400
- if (message.kind.oneofKind === 'nullValue')
401
- writer.tag(1, WireType.Varint).int32(message.kind.nullValue);
402
- /* double number_value = 2; */
403
- if (message.kind.oneofKind === 'numberValue')
404
- writer.tag(2, WireType.Bit64).double(message.kind.numberValue);
405
- /* string string_value = 3; */
406
- if (message.kind.oneofKind === 'stringValue')
407
- writer.tag(3, WireType.LengthDelimited).string(message.kind.stringValue);
408
- /* bool bool_value = 4; */
409
- if (message.kind.oneofKind === 'boolValue')
410
- writer.tag(4, WireType.Varint).bool(message.kind.boolValue);
411
- /* google.protobuf.Struct struct_value = 5; */
412
- if (message.kind.oneofKind === 'structValue')
413
- Struct.internalBinaryWrite(message.kind.structValue, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
414
- /* google.protobuf.ListValue list_value = 6; */
415
- if (message.kind.oneofKind === 'listValue')
416
- ListValue.internalBinaryWrite(message.kind.listValue, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
417
- const u = options.writeUnknownFields;
418
- if (u !== false)
419
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
420
- return writer;
421
- }
422
413
  }
423
414
  /**
424
415
  * @generated MessageType for protobuf message google.protobuf.Value
@@ -426,69 +417,64 @@ class Value$Type extends MessageType<Value> {
426
417
  export const Value = new Value$Type();
427
418
  // @generated message type with reflection information, may provide speed optimized methods
428
419
  class ListValue$Type extends MessageType<ListValue> {
429
- constructor() {
430
- super('google.protobuf.ListValue', [
431
- { no: 1, name: 'values', kind: 'message', repeat: 1 /* RepeatType.PACKED */, T: () => Value },
432
- ]);
433
- }
434
-
435
- /**
420
+ constructor() {
421
+ super("google.protobuf.ListValue", [
422
+ { no: 1, name: "values", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Value }
423
+ ]);
424
+ }
425
+ /**
436
426
  * Encode `ListValue` to JSON array.
437
427
  */
438
- internalJsonWrite(message: ListValue, options: JsonWriteOptions): JsonValue {
439
- return message.values.map((v) => Value.toJson(v));
440
- }
441
-
442
- /**
428
+ internalJsonWrite(message: ListValue, options: JsonWriteOptions): JsonValue {
429
+ return message.values.map(v => Value.toJson(v));
430
+ }
431
+ /**
443
432
  * Decode `ListValue` from JSON array.
444
433
  */
445
- internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: ListValue): ListValue {
446
- if (!globalThis.Array.isArray(json))
447
- throw new globalThis.Error('Unable to parse ' + this.typeName + ' from JSON ' + typeofJsonValue(json));
448
- if (!target)
449
- target = this.create();
450
- const values = json.map((v) => Value.fromJson(v));
451
- target.values.push(...values);
452
- return target;
453
- }
454
-
455
- create(value?: PartialMessage<ListValue>): ListValue {
456
- const message = globalThis.Object.create((this.messagePrototype!));
457
- message.values = [];
458
- if (value !== undefined)
459
- reflectionMergePartial<ListValue>(this, message, value);
460
- return message;
461
- }
462
-
463
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListValue): ListValue {
464
- const message = target ?? this.create(), end = reader.pos + length;
465
- while (reader.pos < end) {
466
- const [fieldNo, wireType] = reader.tag();
467
- switch (fieldNo) {
468
- case /* repeated google.protobuf.Value values */ 1:
469
- message.values.push(Value.internalBinaryRead(reader, reader.uint32(), options));
470
- break;
471
- default:
472
- const u = options.readUnknownField;
473
- if (u === 'throw')
474
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
475
- const d = reader.skip(wireType);
476
- if (u !== false)
477
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
478
- }
434
+ internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: ListValue): ListValue {
435
+ if (!globalThis.Array.isArray(json))
436
+ throw new globalThis.Error("Unable to parse " + this.typeName + " from JSON " + typeofJsonValue(json));
437
+ if (!target)
438
+ target = this.create();
439
+ let values = json.map(v => Value.fromJson(v));
440
+ target.values.push(...values);
441
+ return target;
442
+ }
443
+ create(value?: PartialMessage<ListValue>): ListValue {
444
+ const message = globalThis.Object.create((this.messagePrototype!));
445
+ message.values = [];
446
+ if (value !== undefined)
447
+ reflectionMergePartial<ListValue>(this, message, value);
448
+ return message;
449
+ }
450
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListValue): ListValue {
451
+ let message = target ?? this.create(), end = reader.pos + length;
452
+ while (reader.pos < end) {
453
+ let [fieldNo, wireType] = reader.tag();
454
+ switch (fieldNo) {
455
+ case /* repeated google.protobuf.Value values */ 1:
456
+ message.values.push(Value.internalBinaryRead(reader, reader.uint32(), options));
457
+ break;
458
+ default:
459
+ let u = options.readUnknownField;
460
+ if (u === "throw")
461
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
462
+ let d = reader.skip(wireType);
463
+ if (u !== false)
464
+ (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
465
+ }
466
+ }
467
+ return message;
468
+ }
469
+ internalBinaryWrite(message: ListValue, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
470
+ /* repeated google.protobuf.Value values = 1; */
471
+ for (let i = 0; i < message.values.length; i++)
472
+ Value.internalBinaryWrite(message.values[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
473
+ let u = options.writeUnknownFields;
474
+ if (u !== false)
475
+ (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
476
+ return writer;
479
477
  }
480
- return message;
481
- }
482
-
483
- internalBinaryWrite(message: ListValue, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
484
- /* repeated google.protobuf.Value values = 1; */
485
- for (let i = 0; i < message.values.length; i++)
486
- Value.internalBinaryWrite(message.values[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
487
- const u = options.writeUnknownFields;
488
- if (u !== false)
489
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
490
- return writer;
491
- }
492
478
  }
493
479
  /**
494
480
  * @generated MessageType for protobuf message google.protobuf.ListValue