@stanterprise/protobuf 0.0.8 → 0.0.10
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/index.js +1298 -627
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1301 -626
- package/dist/index.mjs.map +1 -1
- package/dist/lib/google/protobuf/duration.d.ts +33 -0
- package/dist/lib/google/protobuf/duration.d.ts.map +1 -0
- package/dist/lib/index.d.ts +13 -14
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/testsystem/v1/common/common.d.ts +3 -1
- package/dist/lib/testsystem/v1/common/common.d.ts.map +1 -1
- package/dist/lib/testsystem/v1/entities/{entities.d.ts → test_case.d.ts} +128 -150
- package/dist/lib/testsystem/v1/entities/test_case.d.ts.map +1 -0
- package/dist/lib/testsystem/v1/entities/test_suite.d.ts +176 -0
- package/dist/lib/testsystem/v1/entities/test_suite.d.ts.map +1 -0
- package/dist/lib/testsystem/v1/events/events.d.ts +42 -31
- package/dist/lib/testsystem/v1/events/events.d.ts.map +1 -1
- package/lib/google/protobuf/duration.ts +98 -0
- package/lib/index.ts +39 -43
- package/lib/testsystem/v1/common/common.ts +3 -1
- package/lib/testsystem/v1/entities/{entities.ts → test_case.ts} +502 -560
- package/lib/testsystem/v1/entities/test_suite.ts +685 -0
- package/lib/testsystem/v1/events/events.ts +90 -43
- package/package.json +1 -1
- package/dist/lib/testsystem/v1/entities/entities.d.ts.map +0 -1
|
@@ -0,0 +1,685 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by the protoc-gen-ts. DO NOT EDIT!
|
|
3
|
+
* compiler version: 3.19.1
|
|
4
|
+
* source: testsystem/v1/entities/test_suite.proto
|
|
5
|
+
* git: https://github.com/thesayyn/protoc-gen-ts */
|
|
6
|
+
import * as dependency_1 from "./../common/common";
|
|
7
|
+
import * as dependency_2 from "./../../../google/protobuf/timestamp";
|
|
8
|
+
import * as dependency_3 from "./../../../google/protobuf/duration";
|
|
9
|
+
import * as pb_1 from "google-protobuf";
|
|
10
|
+
export namespace testsystem.v1.entities {
|
|
11
|
+
export enum SuiteType {
|
|
12
|
+
ROOT = 0,
|
|
13
|
+
PROJECT = 1,
|
|
14
|
+
SUBSUITE = 2
|
|
15
|
+
}
|
|
16
|
+
export class TestSuiteRun extends pb_1.Message {
|
|
17
|
+
#one_of_decls: number[][] = [];
|
|
18
|
+
constructor(data?: any[] | {
|
|
19
|
+
id?: string;
|
|
20
|
+
name?: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
start_time?: dependency_2.google.protobuf.Timestamp;
|
|
23
|
+
end_time?: dependency_2.google.protobuf.Timestamp;
|
|
24
|
+
duration?: dependency_3.google.protobuf.Duration;
|
|
25
|
+
status?: dependency_1.testsystem.v1.common.TestStatus;
|
|
26
|
+
metadata?: Map<string, string>;
|
|
27
|
+
test_suite_spec_id?: string;
|
|
28
|
+
initiated_by?: string;
|
|
29
|
+
project_name?: string;
|
|
30
|
+
}) {
|
|
31
|
+
super();
|
|
32
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
33
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
34
|
+
if ("id" in data && data.id != undefined) {
|
|
35
|
+
this.id = data.id;
|
|
36
|
+
}
|
|
37
|
+
if ("name" in data && data.name != undefined) {
|
|
38
|
+
this.name = data.name;
|
|
39
|
+
}
|
|
40
|
+
if ("description" in data && data.description != undefined) {
|
|
41
|
+
this.description = data.description;
|
|
42
|
+
}
|
|
43
|
+
if ("start_time" in data && data.start_time != undefined) {
|
|
44
|
+
this.start_time = data.start_time;
|
|
45
|
+
}
|
|
46
|
+
if ("end_time" in data && data.end_time != undefined) {
|
|
47
|
+
this.end_time = data.end_time;
|
|
48
|
+
}
|
|
49
|
+
if ("duration" in data && data.duration != undefined) {
|
|
50
|
+
this.duration = data.duration;
|
|
51
|
+
}
|
|
52
|
+
if ("status" in data && data.status != undefined) {
|
|
53
|
+
this.status = data.status;
|
|
54
|
+
}
|
|
55
|
+
if ("metadata" in data && data.metadata != undefined) {
|
|
56
|
+
this.metadata = data.metadata;
|
|
57
|
+
}
|
|
58
|
+
if ("test_suite_spec_id" in data && data.test_suite_spec_id != undefined) {
|
|
59
|
+
this.test_suite_spec_id = data.test_suite_spec_id;
|
|
60
|
+
}
|
|
61
|
+
if ("initiated_by" in data && data.initiated_by != undefined) {
|
|
62
|
+
this.initiated_by = data.initiated_by;
|
|
63
|
+
}
|
|
64
|
+
if ("project_name" in data && data.project_name != undefined) {
|
|
65
|
+
this.project_name = data.project_name;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (!this.metadata)
|
|
69
|
+
this.metadata = new Map();
|
|
70
|
+
}
|
|
71
|
+
get id() {
|
|
72
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
73
|
+
}
|
|
74
|
+
set id(value: string) {
|
|
75
|
+
pb_1.Message.setField(this, 1, value);
|
|
76
|
+
}
|
|
77
|
+
get name() {
|
|
78
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
|
|
79
|
+
}
|
|
80
|
+
set name(value: string) {
|
|
81
|
+
pb_1.Message.setField(this, 2, value);
|
|
82
|
+
}
|
|
83
|
+
get description() {
|
|
84
|
+
return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
|
|
85
|
+
}
|
|
86
|
+
set description(value: string) {
|
|
87
|
+
pb_1.Message.setField(this, 3, value);
|
|
88
|
+
}
|
|
89
|
+
get start_time() {
|
|
90
|
+
return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 4) as dependency_2.google.protobuf.Timestamp;
|
|
91
|
+
}
|
|
92
|
+
set start_time(value: dependency_2.google.protobuf.Timestamp) {
|
|
93
|
+
pb_1.Message.setWrapperField(this, 4, value);
|
|
94
|
+
}
|
|
95
|
+
get has_start_time() {
|
|
96
|
+
return pb_1.Message.getField(this, 4) != null;
|
|
97
|
+
}
|
|
98
|
+
get end_time() {
|
|
99
|
+
return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 5) as dependency_2.google.protobuf.Timestamp;
|
|
100
|
+
}
|
|
101
|
+
set end_time(value: dependency_2.google.protobuf.Timestamp) {
|
|
102
|
+
pb_1.Message.setWrapperField(this, 5, value);
|
|
103
|
+
}
|
|
104
|
+
get has_end_time() {
|
|
105
|
+
return pb_1.Message.getField(this, 5) != null;
|
|
106
|
+
}
|
|
107
|
+
get duration() {
|
|
108
|
+
return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Duration, 6) as dependency_3.google.protobuf.Duration;
|
|
109
|
+
}
|
|
110
|
+
set duration(value: dependency_3.google.protobuf.Duration) {
|
|
111
|
+
pb_1.Message.setWrapperField(this, 6, value);
|
|
112
|
+
}
|
|
113
|
+
get has_duration() {
|
|
114
|
+
return pb_1.Message.getField(this, 6) != null;
|
|
115
|
+
}
|
|
116
|
+
get status() {
|
|
117
|
+
return pb_1.Message.getFieldWithDefault(this, 7, dependency_1.testsystem.v1.common.TestStatus.UNKNOWN) as dependency_1.testsystem.v1.common.TestStatus;
|
|
118
|
+
}
|
|
119
|
+
set status(value: dependency_1.testsystem.v1.common.TestStatus) {
|
|
120
|
+
pb_1.Message.setField(this, 7, value);
|
|
121
|
+
}
|
|
122
|
+
get metadata() {
|
|
123
|
+
return pb_1.Message.getField(this, 8) as any as Map<string, string>;
|
|
124
|
+
}
|
|
125
|
+
set metadata(value: Map<string, string>) {
|
|
126
|
+
pb_1.Message.setField(this, 8, value as any);
|
|
127
|
+
}
|
|
128
|
+
get test_suite_spec_id() {
|
|
129
|
+
return pb_1.Message.getFieldWithDefault(this, 9, "") as string;
|
|
130
|
+
}
|
|
131
|
+
set test_suite_spec_id(value: string) {
|
|
132
|
+
pb_1.Message.setField(this, 9, value);
|
|
133
|
+
}
|
|
134
|
+
get initiated_by() {
|
|
135
|
+
return pb_1.Message.getFieldWithDefault(this, 10, "") as string;
|
|
136
|
+
}
|
|
137
|
+
set initiated_by(value: string) {
|
|
138
|
+
pb_1.Message.setField(this, 10, value);
|
|
139
|
+
}
|
|
140
|
+
get project_name() {
|
|
141
|
+
return pb_1.Message.getFieldWithDefault(this, 11, "") as string;
|
|
142
|
+
}
|
|
143
|
+
set project_name(value: string) {
|
|
144
|
+
pb_1.Message.setField(this, 11, value);
|
|
145
|
+
}
|
|
146
|
+
static fromObject(data: {
|
|
147
|
+
id?: string;
|
|
148
|
+
name?: string;
|
|
149
|
+
description?: string;
|
|
150
|
+
start_time?: ReturnType<typeof dependency_2.google.protobuf.Timestamp.prototype.toObject>;
|
|
151
|
+
end_time?: ReturnType<typeof dependency_2.google.protobuf.Timestamp.prototype.toObject>;
|
|
152
|
+
duration?: ReturnType<typeof dependency_3.google.protobuf.Duration.prototype.toObject>;
|
|
153
|
+
status?: dependency_1.testsystem.v1.common.TestStatus;
|
|
154
|
+
metadata?: {
|
|
155
|
+
[key: string]: string;
|
|
156
|
+
};
|
|
157
|
+
test_suite_spec_id?: string;
|
|
158
|
+
initiated_by?: string;
|
|
159
|
+
project_name?: string;
|
|
160
|
+
}): TestSuiteRun {
|
|
161
|
+
const message = new TestSuiteRun({});
|
|
162
|
+
if (data.id != null) {
|
|
163
|
+
message.id = data.id;
|
|
164
|
+
}
|
|
165
|
+
if (data.name != null) {
|
|
166
|
+
message.name = data.name;
|
|
167
|
+
}
|
|
168
|
+
if (data.description != null) {
|
|
169
|
+
message.description = data.description;
|
|
170
|
+
}
|
|
171
|
+
if (data.start_time != null) {
|
|
172
|
+
message.start_time = dependency_2.google.protobuf.Timestamp.fromObject(data.start_time);
|
|
173
|
+
}
|
|
174
|
+
if (data.end_time != null) {
|
|
175
|
+
message.end_time = dependency_2.google.protobuf.Timestamp.fromObject(data.end_time);
|
|
176
|
+
}
|
|
177
|
+
if (data.duration != null) {
|
|
178
|
+
message.duration = dependency_3.google.protobuf.Duration.fromObject(data.duration);
|
|
179
|
+
}
|
|
180
|
+
if (data.status != null) {
|
|
181
|
+
message.status = data.status;
|
|
182
|
+
}
|
|
183
|
+
if (typeof data.metadata == "object") {
|
|
184
|
+
message.metadata = new Map(Object.entries(data.metadata));
|
|
185
|
+
}
|
|
186
|
+
if (data.test_suite_spec_id != null) {
|
|
187
|
+
message.test_suite_spec_id = data.test_suite_spec_id;
|
|
188
|
+
}
|
|
189
|
+
if (data.initiated_by != null) {
|
|
190
|
+
message.initiated_by = data.initiated_by;
|
|
191
|
+
}
|
|
192
|
+
if (data.project_name != null) {
|
|
193
|
+
message.project_name = data.project_name;
|
|
194
|
+
}
|
|
195
|
+
return message;
|
|
196
|
+
}
|
|
197
|
+
toObject() {
|
|
198
|
+
const data: {
|
|
199
|
+
id?: string;
|
|
200
|
+
name?: string;
|
|
201
|
+
description?: string;
|
|
202
|
+
start_time?: ReturnType<typeof dependency_2.google.protobuf.Timestamp.prototype.toObject>;
|
|
203
|
+
end_time?: ReturnType<typeof dependency_2.google.protobuf.Timestamp.prototype.toObject>;
|
|
204
|
+
duration?: ReturnType<typeof dependency_3.google.protobuf.Duration.prototype.toObject>;
|
|
205
|
+
status?: dependency_1.testsystem.v1.common.TestStatus;
|
|
206
|
+
metadata?: {
|
|
207
|
+
[key: string]: string;
|
|
208
|
+
};
|
|
209
|
+
test_suite_spec_id?: string;
|
|
210
|
+
initiated_by?: string;
|
|
211
|
+
project_name?: string;
|
|
212
|
+
} = {};
|
|
213
|
+
if (this.id != null) {
|
|
214
|
+
data.id = this.id;
|
|
215
|
+
}
|
|
216
|
+
if (this.name != null) {
|
|
217
|
+
data.name = this.name;
|
|
218
|
+
}
|
|
219
|
+
if (this.description != null) {
|
|
220
|
+
data.description = this.description;
|
|
221
|
+
}
|
|
222
|
+
if (this.start_time != null) {
|
|
223
|
+
data.start_time = this.start_time.toObject();
|
|
224
|
+
}
|
|
225
|
+
if (this.end_time != null) {
|
|
226
|
+
data.end_time = this.end_time.toObject();
|
|
227
|
+
}
|
|
228
|
+
if (this.duration != null) {
|
|
229
|
+
data.duration = this.duration.toObject();
|
|
230
|
+
}
|
|
231
|
+
if (this.status != null) {
|
|
232
|
+
data.status = this.status;
|
|
233
|
+
}
|
|
234
|
+
if (this.metadata != null) {
|
|
235
|
+
data.metadata = (Object.fromEntries)(this.metadata);
|
|
236
|
+
}
|
|
237
|
+
if (this.test_suite_spec_id != null) {
|
|
238
|
+
data.test_suite_spec_id = this.test_suite_spec_id;
|
|
239
|
+
}
|
|
240
|
+
if (this.initiated_by != null) {
|
|
241
|
+
data.initiated_by = this.initiated_by;
|
|
242
|
+
}
|
|
243
|
+
if (this.project_name != null) {
|
|
244
|
+
data.project_name = this.project_name;
|
|
245
|
+
}
|
|
246
|
+
return data;
|
|
247
|
+
}
|
|
248
|
+
serialize(): Uint8Array;
|
|
249
|
+
serialize(w: pb_1.BinaryWriter): void;
|
|
250
|
+
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
|
251
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
252
|
+
if (this.id.length)
|
|
253
|
+
writer.writeString(1, this.id);
|
|
254
|
+
if (this.name.length)
|
|
255
|
+
writer.writeString(2, this.name);
|
|
256
|
+
if (this.description.length)
|
|
257
|
+
writer.writeString(3, this.description);
|
|
258
|
+
if (this.has_start_time)
|
|
259
|
+
writer.writeMessage(4, this.start_time, () => this.start_time.serialize(writer));
|
|
260
|
+
if (this.has_end_time)
|
|
261
|
+
writer.writeMessage(5, this.end_time, () => this.end_time.serialize(writer));
|
|
262
|
+
if (this.has_duration)
|
|
263
|
+
writer.writeMessage(6, this.duration, () => this.duration.serialize(writer));
|
|
264
|
+
if (this.status != dependency_1.testsystem.v1.common.TestStatus.UNKNOWN)
|
|
265
|
+
writer.writeEnum(7, this.status);
|
|
266
|
+
for (const [key, value] of this.metadata) {
|
|
267
|
+
writer.writeMessage(8, this.metadata, () => {
|
|
268
|
+
writer.writeString(1, key);
|
|
269
|
+
writer.writeString(2, value);
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
if (this.test_suite_spec_id.length)
|
|
273
|
+
writer.writeString(9, this.test_suite_spec_id);
|
|
274
|
+
if (this.initiated_by.length)
|
|
275
|
+
writer.writeString(10, this.initiated_by);
|
|
276
|
+
if (this.project_name.length)
|
|
277
|
+
writer.writeString(11, this.project_name);
|
|
278
|
+
if (!w)
|
|
279
|
+
return writer.getResultBuffer();
|
|
280
|
+
}
|
|
281
|
+
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TestSuiteRun {
|
|
282
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TestSuiteRun();
|
|
283
|
+
while (reader.nextField()) {
|
|
284
|
+
if (reader.isEndGroup())
|
|
285
|
+
break;
|
|
286
|
+
switch (reader.getFieldNumber()) {
|
|
287
|
+
case 1:
|
|
288
|
+
message.id = reader.readString();
|
|
289
|
+
break;
|
|
290
|
+
case 2:
|
|
291
|
+
message.name = reader.readString();
|
|
292
|
+
break;
|
|
293
|
+
case 3:
|
|
294
|
+
message.description = reader.readString();
|
|
295
|
+
break;
|
|
296
|
+
case 4:
|
|
297
|
+
reader.readMessage(message.start_time, () => message.start_time = dependency_2.google.protobuf.Timestamp.deserialize(reader));
|
|
298
|
+
break;
|
|
299
|
+
case 5:
|
|
300
|
+
reader.readMessage(message.end_time, () => message.end_time = dependency_2.google.protobuf.Timestamp.deserialize(reader));
|
|
301
|
+
break;
|
|
302
|
+
case 6:
|
|
303
|
+
reader.readMessage(message.duration, () => message.duration = dependency_3.google.protobuf.Duration.deserialize(reader));
|
|
304
|
+
break;
|
|
305
|
+
case 7:
|
|
306
|
+
message.status = reader.readEnum();
|
|
307
|
+
break;
|
|
308
|
+
case 8:
|
|
309
|
+
reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.metadata as any, reader, reader.readString, reader.readString));
|
|
310
|
+
break;
|
|
311
|
+
case 9:
|
|
312
|
+
message.test_suite_spec_id = reader.readString();
|
|
313
|
+
break;
|
|
314
|
+
case 10:
|
|
315
|
+
message.initiated_by = reader.readString();
|
|
316
|
+
break;
|
|
317
|
+
case 11:
|
|
318
|
+
message.project_name = reader.readString();
|
|
319
|
+
break;
|
|
320
|
+
default: reader.skipField();
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
return message;
|
|
324
|
+
}
|
|
325
|
+
serializeBinary(): Uint8Array {
|
|
326
|
+
return this.serialize();
|
|
327
|
+
}
|
|
328
|
+
static deserializeBinary(bytes: Uint8Array): TestSuiteRun {
|
|
329
|
+
return TestSuiteRun.deserialize(bytes);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
export class TestSuiteSpec extends pb_1.Message {
|
|
333
|
+
#one_of_decls: number[][] = [];
|
|
334
|
+
constructor(data?: any[] | {
|
|
335
|
+
id?: string;
|
|
336
|
+
name?: string;
|
|
337
|
+
run_id?: string;
|
|
338
|
+
test_spec_ids?: string[];
|
|
339
|
+
sub_suite_ids?: string[];
|
|
340
|
+
description?: string;
|
|
341
|
+
location?: string;
|
|
342
|
+
metadata?: Map<string, string>;
|
|
343
|
+
type?: SuiteType;
|
|
344
|
+
parent_suite_id?: string;
|
|
345
|
+
author?: string;
|
|
346
|
+
owner?: string;
|
|
347
|
+
project?: string;
|
|
348
|
+
}) {
|
|
349
|
+
super();
|
|
350
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4, 5], this.#one_of_decls);
|
|
351
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
352
|
+
if ("id" in data && data.id != undefined) {
|
|
353
|
+
this.id = data.id;
|
|
354
|
+
}
|
|
355
|
+
if ("name" in data && data.name != undefined) {
|
|
356
|
+
this.name = data.name;
|
|
357
|
+
}
|
|
358
|
+
if ("run_id" in data && data.run_id != undefined) {
|
|
359
|
+
this.run_id = data.run_id;
|
|
360
|
+
}
|
|
361
|
+
if ("test_spec_ids" in data && data.test_spec_ids != undefined) {
|
|
362
|
+
this.test_spec_ids = data.test_spec_ids;
|
|
363
|
+
}
|
|
364
|
+
if ("sub_suite_ids" in data && data.sub_suite_ids != undefined) {
|
|
365
|
+
this.sub_suite_ids = data.sub_suite_ids;
|
|
366
|
+
}
|
|
367
|
+
if ("description" in data && data.description != undefined) {
|
|
368
|
+
this.description = data.description;
|
|
369
|
+
}
|
|
370
|
+
if ("location" in data && data.location != undefined) {
|
|
371
|
+
this.location = data.location;
|
|
372
|
+
}
|
|
373
|
+
if ("metadata" in data && data.metadata != undefined) {
|
|
374
|
+
this.metadata = data.metadata;
|
|
375
|
+
}
|
|
376
|
+
if ("type" in data && data.type != undefined) {
|
|
377
|
+
this.type = data.type;
|
|
378
|
+
}
|
|
379
|
+
if ("parent_suite_id" in data && data.parent_suite_id != undefined) {
|
|
380
|
+
this.parent_suite_id = data.parent_suite_id;
|
|
381
|
+
}
|
|
382
|
+
if ("author" in data && data.author != undefined) {
|
|
383
|
+
this.author = data.author;
|
|
384
|
+
}
|
|
385
|
+
if ("owner" in data && data.owner != undefined) {
|
|
386
|
+
this.owner = data.owner;
|
|
387
|
+
}
|
|
388
|
+
if ("project" in data && data.project != undefined) {
|
|
389
|
+
this.project = data.project;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
if (!this.metadata)
|
|
393
|
+
this.metadata = new Map();
|
|
394
|
+
}
|
|
395
|
+
get id() {
|
|
396
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
397
|
+
}
|
|
398
|
+
set id(value: string) {
|
|
399
|
+
pb_1.Message.setField(this, 1, value);
|
|
400
|
+
}
|
|
401
|
+
get name() {
|
|
402
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
|
|
403
|
+
}
|
|
404
|
+
set name(value: string) {
|
|
405
|
+
pb_1.Message.setField(this, 2, value);
|
|
406
|
+
}
|
|
407
|
+
get run_id() {
|
|
408
|
+
return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
|
|
409
|
+
}
|
|
410
|
+
set run_id(value: string) {
|
|
411
|
+
pb_1.Message.setField(this, 3, value);
|
|
412
|
+
}
|
|
413
|
+
get test_spec_ids() {
|
|
414
|
+
return pb_1.Message.getFieldWithDefault(this, 4, []) as string[];
|
|
415
|
+
}
|
|
416
|
+
set test_spec_ids(value: string[]) {
|
|
417
|
+
pb_1.Message.setField(this, 4, value);
|
|
418
|
+
}
|
|
419
|
+
get sub_suite_ids() {
|
|
420
|
+
return pb_1.Message.getFieldWithDefault(this, 5, []) as string[];
|
|
421
|
+
}
|
|
422
|
+
set sub_suite_ids(value: string[]) {
|
|
423
|
+
pb_1.Message.setField(this, 5, value);
|
|
424
|
+
}
|
|
425
|
+
get description() {
|
|
426
|
+
return pb_1.Message.getFieldWithDefault(this, 6, "") as string;
|
|
427
|
+
}
|
|
428
|
+
set description(value: string) {
|
|
429
|
+
pb_1.Message.setField(this, 6, value);
|
|
430
|
+
}
|
|
431
|
+
get location() {
|
|
432
|
+
return pb_1.Message.getFieldWithDefault(this, 7, "") as string;
|
|
433
|
+
}
|
|
434
|
+
set location(value: string) {
|
|
435
|
+
pb_1.Message.setField(this, 7, value);
|
|
436
|
+
}
|
|
437
|
+
get metadata() {
|
|
438
|
+
return pb_1.Message.getField(this, 8) as any as Map<string, string>;
|
|
439
|
+
}
|
|
440
|
+
set metadata(value: Map<string, string>) {
|
|
441
|
+
pb_1.Message.setField(this, 8, value as any);
|
|
442
|
+
}
|
|
443
|
+
get type() {
|
|
444
|
+
return pb_1.Message.getFieldWithDefault(this, 9, SuiteType.ROOT) as SuiteType;
|
|
445
|
+
}
|
|
446
|
+
set type(value: SuiteType) {
|
|
447
|
+
pb_1.Message.setField(this, 9, value);
|
|
448
|
+
}
|
|
449
|
+
get parent_suite_id() {
|
|
450
|
+
return pb_1.Message.getFieldWithDefault(this, 10, "") as string;
|
|
451
|
+
}
|
|
452
|
+
set parent_suite_id(value: string) {
|
|
453
|
+
pb_1.Message.setField(this, 10, value);
|
|
454
|
+
}
|
|
455
|
+
get author() {
|
|
456
|
+
return pb_1.Message.getFieldWithDefault(this, 11, "") as string;
|
|
457
|
+
}
|
|
458
|
+
set author(value: string) {
|
|
459
|
+
pb_1.Message.setField(this, 11, value);
|
|
460
|
+
}
|
|
461
|
+
get owner() {
|
|
462
|
+
return pb_1.Message.getFieldWithDefault(this, 12, "") as string;
|
|
463
|
+
}
|
|
464
|
+
set owner(value: string) {
|
|
465
|
+
pb_1.Message.setField(this, 12, value);
|
|
466
|
+
}
|
|
467
|
+
get project() {
|
|
468
|
+
return pb_1.Message.getFieldWithDefault(this, 13, "") as string;
|
|
469
|
+
}
|
|
470
|
+
set project(value: string) {
|
|
471
|
+
pb_1.Message.setField(this, 13, value);
|
|
472
|
+
}
|
|
473
|
+
static fromObject(data: {
|
|
474
|
+
id?: string;
|
|
475
|
+
name?: string;
|
|
476
|
+
run_id?: string;
|
|
477
|
+
test_spec_ids?: string[];
|
|
478
|
+
sub_suite_ids?: string[];
|
|
479
|
+
description?: string;
|
|
480
|
+
location?: string;
|
|
481
|
+
metadata?: {
|
|
482
|
+
[key: string]: string;
|
|
483
|
+
};
|
|
484
|
+
type?: SuiteType;
|
|
485
|
+
parent_suite_id?: string;
|
|
486
|
+
author?: string;
|
|
487
|
+
owner?: string;
|
|
488
|
+
project?: string;
|
|
489
|
+
}): TestSuiteSpec {
|
|
490
|
+
const message = new TestSuiteSpec({});
|
|
491
|
+
if (data.id != null) {
|
|
492
|
+
message.id = data.id;
|
|
493
|
+
}
|
|
494
|
+
if (data.name != null) {
|
|
495
|
+
message.name = data.name;
|
|
496
|
+
}
|
|
497
|
+
if (data.run_id != null) {
|
|
498
|
+
message.run_id = data.run_id;
|
|
499
|
+
}
|
|
500
|
+
if (data.test_spec_ids != null) {
|
|
501
|
+
message.test_spec_ids = data.test_spec_ids;
|
|
502
|
+
}
|
|
503
|
+
if (data.sub_suite_ids != null) {
|
|
504
|
+
message.sub_suite_ids = data.sub_suite_ids;
|
|
505
|
+
}
|
|
506
|
+
if (data.description != null) {
|
|
507
|
+
message.description = data.description;
|
|
508
|
+
}
|
|
509
|
+
if (data.location != null) {
|
|
510
|
+
message.location = data.location;
|
|
511
|
+
}
|
|
512
|
+
if (typeof data.metadata == "object") {
|
|
513
|
+
message.metadata = new Map(Object.entries(data.metadata));
|
|
514
|
+
}
|
|
515
|
+
if (data.type != null) {
|
|
516
|
+
message.type = data.type;
|
|
517
|
+
}
|
|
518
|
+
if (data.parent_suite_id != null) {
|
|
519
|
+
message.parent_suite_id = data.parent_suite_id;
|
|
520
|
+
}
|
|
521
|
+
if (data.author != null) {
|
|
522
|
+
message.author = data.author;
|
|
523
|
+
}
|
|
524
|
+
if (data.owner != null) {
|
|
525
|
+
message.owner = data.owner;
|
|
526
|
+
}
|
|
527
|
+
if (data.project != null) {
|
|
528
|
+
message.project = data.project;
|
|
529
|
+
}
|
|
530
|
+
return message;
|
|
531
|
+
}
|
|
532
|
+
toObject() {
|
|
533
|
+
const data: {
|
|
534
|
+
id?: string;
|
|
535
|
+
name?: string;
|
|
536
|
+
run_id?: string;
|
|
537
|
+
test_spec_ids?: string[];
|
|
538
|
+
sub_suite_ids?: string[];
|
|
539
|
+
description?: string;
|
|
540
|
+
location?: string;
|
|
541
|
+
metadata?: {
|
|
542
|
+
[key: string]: string;
|
|
543
|
+
};
|
|
544
|
+
type?: SuiteType;
|
|
545
|
+
parent_suite_id?: string;
|
|
546
|
+
author?: string;
|
|
547
|
+
owner?: string;
|
|
548
|
+
project?: string;
|
|
549
|
+
} = {};
|
|
550
|
+
if (this.id != null) {
|
|
551
|
+
data.id = this.id;
|
|
552
|
+
}
|
|
553
|
+
if (this.name != null) {
|
|
554
|
+
data.name = this.name;
|
|
555
|
+
}
|
|
556
|
+
if (this.run_id != null) {
|
|
557
|
+
data.run_id = this.run_id;
|
|
558
|
+
}
|
|
559
|
+
if (this.test_spec_ids != null) {
|
|
560
|
+
data.test_spec_ids = this.test_spec_ids;
|
|
561
|
+
}
|
|
562
|
+
if (this.sub_suite_ids != null) {
|
|
563
|
+
data.sub_suite_ids = this.sub_suite_ids;
|
|
564
|
+
}
|
|
565
|
+
if (this.description != null) {
|
|
566
|
+
data.description = this.description;
|
|
567
|
+
}
|
|
568
|
+
if (this.location != null) {
|
|
569
|
+
data.location = this.location;
|
|
570
|
+
}
|
|
571
|
+
if (this.metadata != null) {
|
|
572
|
+
data.metadata = (Object.fromEntries)(this.metadata);
|
|
573
|
+
}
|
|
574
|
+
if (this.type != null) {
|
|
575
|
+
data.type = this.type;
|
|
576
|
+
}
|
|
577
|
+
if (this.parent_suite_id != null) {
|
|
578
|
+
data.parent_suite_id = this.parent_suite_id;
|
|
579
|
+
}
|
|
580
|
+
if (this.author != null) {
|
|
581
|
+
data.author = this.author;
|
|
582
|
+
}
|
|
583
|
+
if (this.owner != null) {
|
|
584
|
+
data.owner = this.owner;
|
|
585
|
+
}
|
|
586
|
+
if (this.project != null) {
|
|
587
|
+
data.project = this.project;
|
|
588
|
+
}
|
|
589
|
+
return data;
|
|
590
|
+
}
|
|
591
|
+
serialize(): Uint8Array;
|
|
592
|
+
serialize(w: pb_1.BinaryWriter): void;
|
|
593
|
+
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
|
594
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
595
|
+
if (this.id.length)
|
|
596
|
+
writer.writeString(1, this.id);
|
|
597
|
+
if (this.name.length)
|
|
598
|
+
writer.writeString(2, this.name);
|
|
599
|
+
if (this.run_id.length)
|
|
600
|
+
writer.writeString(3, this.run_id);
|
|
601
|
+
if (this.test_spec_ids.length)
|
|
602
|
+
writer.writeRepeatedString(4, this.test_spec_ids);
|
|
603
|
+
if (this.sub_suite_ids.length)
|
|
604
|
+
writer.writeRepeatedString(5, this.sub_suite_ids);
|
|
605
|
+
if (this.description.length)
|
|
606
|
+
writer.writeString(6, this.description);
|
|
607
|
+
if (this.location.length)
|
|
608
|
+
writer.writeString(7, this.location);
|
|
609
|
+
for (const [key, value] of this.metadata) {
|
|
610
|
+
writer.writeMessage(8, this.metadata, () => {
|
|
611
|
+
writer.writeString(1, key);
|
|
612
|
+
writer.writeString(2, value);
|
|
613
|
+
});
|
|
614
|
+
}
|
|
615
|
+
if (this.type != SuiteType.ROOT)
|
|
616
|
+
writer.writeEnum(9, this.type);
|
|
617
|
+
if (this.parent_suite_id.length)
|
|
618
|
+
writer.writeString(10, this.parent_suite_id);
|
|
619
|
+
if (this.author.length)
|
|
620
|
+
writer.writeString(11, this.author);
|
|
621
|
+
if (this.owner.length)
|
|
622
|
+
writer.writeString(12, this.owner);
|
|
623
|
+
if (this.project.length)
|
|
624
|
+
writer.writeString(13, this.project);
|
|
625
|
+
if (!w)
|
|
626
|
+
return writer.getResultBuffer();
|
|
627
|
+
}
|
|
628
|
+
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TestSuiteSpec {
|
|
629
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TestSuiteSpec();
|
|
630
|
+
while (reader.nextField()) {
|
|
631
|
+
if (reader.isEndGroup())
|
|
632
|
+
break;
|
|
633
|
+
switch (reader.getFieldNumber()) {
|
|
634
|
+
case 1:
|
|
635
|
+
message.id = reader.readString();
|
|
636
|
+
break;
|
|
637
|
+
case 2:
|
|
638
|
+
message.name = reader.readString();
|
|
639
|
+
break;
|
|
640
|
+
case 3:
|
|
641
|
+
message.run_id = reader.readString();
|
|
642
|
+
break;
|
|
643
|
+
case 4:
|
|
644
|
+
pb_1.Message.addToRepeatedField(message, 4, reader.readString());
|
|
645
|
+
break;
|
|
646
|
+
case 5:
|
|
647
|
+
pb_1.Message.addToRepeatedField(message, 5, reader.readString());
|
|
648
|
+
break;
|
|
649
|
+
case 6:
|
|
650
|
+
message.description = reader.readString();
|
|
651
|
+
break;
|
|
652
|
+
case 7:
|
|
653
|
+
message.location = reader.readString();
|
|
654
|
+
break;
|
|
655
|
+
case 8:
|
|
656
|
+
reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.metadata as any, reader, reader.readString, reader.readString));
|
|
657
|
+
break;
|
|
658
|
+
case 9:
|
|
659
|
+
message.type = reader.readEnum();
|
|
660
|
+
break;
|
|
661
|
+
case 10:
|
|
662
|
+
message.parent_suite_id = reader.readString();
|
|
663
|
+
break;
|
|
664
|
+
case 11:
|
|
665
|
+
message.author = reader.readString();
|
|
666
|
+
break;
|
|
667
|
+
case 12:
|
|
668
|
+
message.owner = reader.readString();
|
|
669
|
+
break;
|
|
670
|
+
case 13:
|
|
671
|
+
message.project = reader.readString();
|
|
672
|
+
break;
|
|
673
|
+
default: reader.skipField();
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
return message;
|
|
677
|
+
}
|
|
678
|
+
serializeBinary(): Uint8Array {
|
|
679
|
+
return this.serialize();
|
|
680
|
+
}
|
|
681
|
+
static deserializeBinary(bytes: Uint8Array): TestSuiteSpec {
|
|
682
|
+
return TestSuiteSpec.deserialize(bytes);
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
}
|