@milaboratories/pl-client 2.7.14 → 2.8.0
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/dist/core/client.d.ts +4 -1
- package/dist/core/client.d.ts.map +1 -1
- package/dist/core/ll_client.d.ts +12 -2
- package/dist/core/ll_client.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4341 -4316
- package/dist/index.mjs.map +1 -1
- package/dist/proto/github.com/googleapis/googleapis/google/rpc/status.d.ts +15 -15
- package/dist/proto/github.com/googleapis/googleapis/google/rpc/status.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.d.ts +4 -4
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.d.ts +59 -59
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.d.ts +72 -72
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.d.ts +152 -152
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.client.d.ts +156 -156
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.client.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.d.ts +790 -773
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api_types.d.ts +163 -163
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api_types.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/base_types.d.ts +22 -22
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/base_types.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/import.d.ts +32 -32
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/import.d.ts.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/resource_types.d.ts +78 -78
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/resource_types.d.ts.map +1 -1
- package/dist/proto/google/protobuf/any.d.ts +52 -52
- package/dist/proto/google/protobuf/any.d.ts.map +1 -1
- package/dist/proto/google/protobuf/duration.d.ts +19 -19
- package/dist/proto/google/protobuf/duration.d.ts.map +1 -1
- package/dist/proto/google/protobuf/empty.d.ts.map +1 -1
- package/dist/proto/google/protobuf/struct.d.ts +56 -56
- package/dist/proto/google/protobuf/struct.d.ts.map +1 -1
- package/dist/proto/google/protobuf/timestamp.d.ts +25 -25
- package/dist/proto/google/protobuf/timestamp.d.ts.map +1 -1
- package/dist/proto/google/protobuf/wrappers.d.ts +72 -72
- package/dist/proto/google/protobuf/wrappers.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/core/client.ts +31 -35
- package/src/core/ll_client.ts +48 -23
- package/src/proto/github.com/googleapis/googleapis/google/rpc/status.ts +72 -75
- package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.ts +21 -22
- package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.ts +276 -291
- package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.ts +54 -59
- package/src/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.ts +470 -491
- package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/api.client.ts +238 -263
- package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/api.ts +11058 -11752
- package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/api_types.ts +1115 -1156
- package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/base_types.ts +126 -132
- package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/import.ts +201 -204
- package/src/proto/github.com/milaboratory/pl/plapi/plapiproto/resource_types.ts +541 -560
- package/src/proto/google/protobuf/any.ts +140 -150
- package/src/proto/google/protobuf/duration.ts +103 -108
- package/src/proto/google/protobuf/empty.ts +39 -42
- package/src/proto/google/protobuf/struct.ts +323 -337
- package/src/proto/google/protobuf/timestamp.ts +124 -132
- package/src/proto/google/protobuf/wrappers.ts +492 -537
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @generated by protobuf-ts 2.9.
|
|
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
|
|
36
|
-
import type { IBinaryWriter } from
|
|
37
|
-
import { WireType } from
|
|
38
|
-
import type { BinaryReadOptions } from
|
|
39
|
-
import type { IBinaryReader } from
|
|
40
|
-
import { UnknownFieldHandler } from
|
|
41
|
-
import type { PartialMessage } from
|
|
42
|
-
import { reflectionMergePartial } from
|
|
43
|
-
import { isJsonObject } from
|
|
44
|
-
import { typeofJsonValue } from
|
|
45
|
-
import type { JsonValue } from
|
|
46
|
-
import type { JsonReadOptions } from
|
|
47
|
-
import type { JsonWriteOptions } from
|
|
48
|
-
import type { JsonObject } from
|
|
49
|
-
import { MessageType } from
|
|
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
|
-
|
|
69
|
-
|
|
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
|
-
|
|
87
|
-
|
|
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
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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
|
-
|
|
110
|
-
|
|
111
|
-
|
|
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
|
-
|
|
118
|
-
|
|
119
|
-
|
|
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
|
-
|
|
126
|
-
|
|
127
|
-
|
|
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
|
-
|
|
134
|
-
|
|
135
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
172
|
-
|
|
173
|
-
|
|
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
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
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
|
-
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
/**
|
|
186
|
+
/**
|
|
189
187
|
* Decode `Struct` from JSON object.
|
|
190
188
|
*/
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
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
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
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
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
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
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
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
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
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
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
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
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
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
|
-
|
|
332
|
-
default: throw new globalThis.Error('Unable to parse ' + this.typeName + ' from JSON ' + typeofJsonValue(json));
|
|
387
|
+
return message;
|
|
333
388
|
}
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
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
|
-
|
|
430
|
-
|
|
431
|
-
|
|
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
|
-
|
|
439
|
-
|
|
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
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
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
|