@stanterprise/protobuf 0.0.7 → 0.0.8
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 +1572 -319
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1568 -319
- package/dist/index.mjs.map +1 -1
- package/dist/lib/index.d.ts +5 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/testsystem/v1/entities/entities.d.ts +213 -29
- package/dist/lib/testsystem/v1/entities/entities.d.ts.map +1 -1
- package/dist/lib/testsystem/v1/events/events.d.ts +215 -72
- package/dist/lib/testsystem/v1/events/events.d.ts.map +1 -1
- package/dist/lib/testsystem/v1/observer/observer.d.ts +103 -15
- package/dist/lib/testsystem/v1/observer/observer.d.ts.map +1 -1
- package/lib/index.ts +6 -0
- package/lib/testsystem/v1/entities/entities.ts +845 -87
- package/lib/testsystem/v1/events/events.ts +810 -303
- package/lib/testsystem/v1/observer/observer.ts +125 -21
- package/package.json +1 -1
|
@@ -3,19 +3,26 @@
|
|
|
3
3
|
* compiler version: 3.19.1
|
|
4
4
|
* source: testsystem/v1/entities/entities.proto
|
|
5
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";
|
|
6
8
|
import * as pb_1 from "google-protobuf";
|
|
7
9
|
export namespace testsystem.v1.entities {
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
export enum SuiteType {
|
|
11
|
+
ROOT = 0,
|
|
12
|
+
PROJECT = 1,
|
|
13
|
+
SUBSUITE = 2
|
|
14
|
+
}
|
|
15
|
+
export class TestCase extends pb_1.Message {
|
|
16
|
+
#one_of_decls: number[][] = [];
|
|
17
|
+
constructor(data?: any[] | {
|
|
11
18
|
id?: string;
|
|
12
19
|
name?: string;
|
|
13
20
|
description?: string;
|
|
14
|
-
steps?:
|
|
21
|
+
steps?: Step[];
|
|
15
22
|
metadata?: Map<string, string>;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
})
|
|
23
|
+
status?: dependency_1.testsystem.v1.common.TestStatus;
|
|
24
|
+
parent_suite?: TestSuite;
|
|
25
|
+
}) {
|
|
19
26
|
super();
|
|
20
27
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4], this.#one_of_decls);
|
|
21
28
|
if (!Array.isArray(data) && typeof data == "object") {
|
|
@@ -34,8 +41,11 @@ export namespace testsystem.v1.entities {
|
|
|
34
41
|
if ("metadata" in data && data.metadata != undefined) {
|
|
35
42
|
this.metadata = data.metadata;
|
|
36
43
|
}
|
|
37
|
-
if ("
|
|
38
|
-
this.
|
|
44
|
+
if ("status" in data && data.status != undefined) {
|
|
45
|
+
this.status = data.status;
|
|
46
|
+
}
|
|
47
|
+
if ("parent_suite" in data && data.parent_suite != undefined) {
|
|
48
|
+
this.parent_suite = data.parent_suite;
|
|
39
49
|
}
|
|
40
50
|
}
|
|
41
51
|
if (!this.metadata)
|
|
@@ -60,10 +70,10 @@ export namespace testsystem.v1.entities {
|
|
|
60
70
|
pb_1.Message.setField(this, 3, value);
|
|
61
71
|
}
|
|
62
72
|
get steps() {
|
|
63
|
-
return pb_1.Message.
|
|
73
|
+
return pb_1.Message.getRepeatedWrapperField(this, Step, 4) as Step[];
|
|
64
74
|
}
|
|
65
|
-
set steps(value:
|
|
66
|
-
pb_1.Message.
|
|
75
|
+
set steps(value: Step[]) {
|
|
76
|
+
pb_1.Message.setRepeatedWrapperField(this, 4, value);
|
|
67
77
|
}
|
|
68
78
|
get metadata() {
|
|
69
79
|
return pb_1.Message.getField(this, 5) as any as Map<string, string>;
|
|
@@ -71,35 +81,33 @@ export namespace testsystem.v1.entities {
|
|
|
71
81
|
set metadata(value: Map<string, string>) {
|
|
72
82
|
pb_1.Message.setField(this, 5, value as any);
|
|
73
83
|
}
|
|
74
|
-
get
|
|
75
|
-
return pb_1.Message.getFieldWithDefault(this, 6,
|
|
84
|
+
get status() {
|
|
85
|
+
return pb_1.Message.getFieldWithDefault(this, 6, dependency_1.testsystem.v1.common.TestStatus.UNKNOWN) as dependency_1.testsystem.v1.common.TestStatus;
|
|
76
86
|
}
|
|
77
|
-
set
|
|
78
|
-
pb_1.Message.
|
|
87
|
+
set status(value: dependency_1.testsystem.v1.common.TestStatus) {
|
|
88
|
+
pb_1.Message.setField(this, 6, value);
|
|
79
89
|
}
|
|
80
|
-
get
|
|
81
|
-
return pb_1.Message.
|
|
90
|
+
get parent_suite() {
|
|
91
|
+
return pb_1.Message.getWrapperField(this, TestSuite, 7) as TestSuite;
|
|
82
92
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
6: "is_active"
|
|
89
|
-
};
|
|
90
|
-
return cases[pb_1.Message.computeOneofCase(this, [6])];
|
|
93
|
+
set parent_suite(value: TestSuite) {
|
|
94
|
+
pb_1.Message.setWrapperField(this, 7, value);
|
|
95
|
+
}
|
|
96
|
+
get has_parent_suite() {
|
|
97
|
+
return pb_1.Message.getField(this, 7) != null;
|
|
91
98
|
}
|
|
92
99
|
static fromObject(data: {
|
|
93
100
|
id?: string;
|
|
94
101
|
name?: string;
|
|
95
102
|
description?: string;
|
|
96
|
-
steps?:
|
|
103
|
+
steps?: ReturnType<typeof Step.prototype.toObject>[];
|
|
97
104
|
metadata?: {
|
|
98
105
|
[key: string]: string;
|
|
99
106
|
};
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
107
|
+
status?: dependency_1.testsystem.v1.common.TestStatus;
|
|
108
|
+
parent_suite?: ReturnType<typeof TestSuite.prototype.toObject>;
|
|
109
|
+
}): TestCase {
|
|
110
|
+
const message = new TestCase({});
|
|
103
111
|
if (data.id != null) {
|
|
104
112
|
message.id = data.id;
|
|
105
113
|
}
|
|
@@ -110,13 +118,16 @@ export namespace testsystem.v1.entities {
|
|
|
110
118
|
message.description = data.description;
|
|
111
119
|
}
|
|
112
120
|
if (data.steps != null) {
|
|
113
|
-
message.steps = data.steps;
|
|
121
|
+
message.steps = data.steps.map(item => Step.fromObject(item));
|
|
114
122
|
}
|
|
115
123
|
if (typeof data.metadata == "object") {
|
|
116
124
|
message.metadata = new Map(Object.entries(data.metadata));
|
|
117
125
|
}
|
|
118
|
-
if (data.
|
|
119
|
-
message.
|
|
126
|
+
if (data.status != null) {
|
|
127
|
+
message.status = data.status;
|
|
128
|
+
}
|
|
129
|
+
if (data.parent_suite != null) {
|
|
130
|
+
message.parent_suite = TestSuite.fromObject(data.parent_suite);
|
|
120
131
|
}
|
|
121
132
|
return message;
|
|
122
133
|
}
|
|
@@ -125,11 +136,12 @@ export namespace testsystem.v1.entities {
|
|
|
125
136
|
id?: string;
|
|
126
137
|
name?: string;
|
|
127
138
|
description?: string;
|
|
128
|
-
steps?:
|
|
139
|
+
steps?: ReturnType<typeof Step.prototype.toObject>[];
|
|
129
140
|
metadata?: {
|
|
130
141
|
[key: string]: string;
|
|
131
142
|
};
|
|
132
|
-
|
|
143
|
+
status?: dependency_1.testsystem.v1.common.TestStatus;
|
|
144
|
+
parent_suite?: ReturnType<typeof TestSuite.prototype.toObject>;
|
|
133
145
|
} = {};
|
|
134
146
|
if (this.id != null) {
|
|
135
147
|
data.id = this.id;
|
|
@@ -141,13 +153,16 @@ export namespace testsystem.v1.entities {
|
|
|
141
153
|
data.description = this.description;
|
|
142
154
|
}
|
|
143
155
|
if (this.steps != null) {
|
|
144
|
-
data.steps = this.steps;
|
|
156
|
+
data.steps = this.steps.map((item: Step) => item.toObject());
|
|
145
157
|
}
|
|
146
158
|
if (this.metadata != null) {
|
|
147
159
|
data.metadata = (Object.fromEntries)(this.metadata);
|
|
148
160
|
}
|
|
149
|
-
if (this.
|
|
150
|
-
data.
|
|
161
|
+
if (this.status != null) {
|
|
162
|
+
data.status = this.status;
|
|
163
|
+
}
|
|
164
|
+
if (this.parent_suite != null) {
|
|
165
|
+
data.parent_suite = this.parent_suite.toObject();
|
|
151
166
|
}
|
|
152
167
|
return data;
|
|
153
168
|
}
|
|
@@ -162,20 +177,22 @@ export namespace testsystem.v1.entities {
|
|
|
162
177
|
if (this.description.length)
|
|
163
178
|
writer.writeString(3, this.description);
|
|
164
179
|
if (this.steps.length)
|
|
165
|
-
writer.
|
|
180
|
+
writer.writeRepeatedMessage(4, this.steps, (item: Step) => item.serialize(writer));
|
|
166
181
|
for (const [key, value] of this.metadata) {
|
|
167
182
|
writer.writeMessage(5, this.metadata, () => {
|
|
168
183
|
writer.writeString(1, key);
|
|
169
184
|
writer.writeString(2, value);
|
|
170
185
|
});
|
|
171
186
|
}
|
|
172
|
-
if (this.
|
|
173
|
-
writer.
|
|
187
|
+
if (this.status != dependency_1.testsystem.v1.common.TestStatus.UNKNOWN)
|
|
188
|
+
writer.writeEnum(6, this.status);
|
|
189
|
+
if (this.has_parent_suite)
|
|
190
|
+
writer.writeMessage(7, this.parent_suite, () => this.parent_suite.serialize(writer));
|
|
174
191
|
if (!w)
|
|
175
192
|
return writer.getResultBuffer();
|
|
176
193
|
}
|
|
177
|
-
static deserialize(bytes: Uint8Array | pb_1.BinaryReader):
|
|
178
|
-
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new
|
|
194
|
+
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TestCase {
|
|
195
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TestCase();
|
|
179
196
|
while (reader.nextField()) {
|
|
180
197
|
if (reader.isEndGroup())
|
|
181
198
|
break;
|
|
@@ -190,13 +207,16 @@ export namespace testsystem.v1.entities {
|
|
|
190
207
|
message.description = reader.readString();
|
|
191
208
|
break;
|
|
192
209
|
case 4:
|
|
193
|
-
pb_1.Message.
|
|
210
|
+
reader.readMessage(message.steps, () => pb_1.Message.addToRepeatedWrapperField(message, 4, Step.deserialize(reader), Step));
|
|
194
211
|
break;
|
|
195
212
|
case 5:
|
|
196
213
|
reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.metadata as any, reader, reader.readString, reader.readString));
|
|
197
214
|
break;
|
|
198
215
|
case 6:
|
|
199
|
-
message.
|
|
216
|
+
message.status = reader.readEnum();
|
|
217
|
+
break;
|
|
218
|
+
case 7:
|
|
219
|
+
reader.readMessage(message.parent_suite, () => message.parent_suite = TestSuite.deserialize(reader));
|
|
200
220
|
break;
|
|
201
221
|
default: reader.skipField();
|
|
202
222
|
}
|
|
@@ -206,8 +226,8 @@ export namespace testsystem.v1.entities {
|
|
|
206
226
|
serializeBinary(): Uint8Array {
|
|
207
227
|
return this.serialize();
|
|
208
228
|
}
|
|
209
|
-
static deserializeBinary(bytes: Uint8Array):
|
|
210
|
-
return
|
|
229
|
+
static deserializeBinary(bytes: Uint8Array): TestCase {
|
|
230
|
+
return TestCase.deserialize(bytes);
|
|
211
231
|
}
|
|
212
232
|
}
|
|
213
233
|
export class TestSuite extends pb_1.Message {
|
|
@@ -215,13 +235,16 @@ export namespace testsystem.v1.entities {
|
|
|
215
235
|
constructor(data?: any[] | {
|
|
216
236
|
id?: string;
|
|
217
237
|
name?: string;
|
|
218
|
-
|
|
238
|
+
tests?: TestCase[];
|
|
239
|
+
sub_suites?: TestSuite[];
|
|
219
240
|
description?: string;
|
|
241
|
+
location?: string;
|
|
220
242
|
metadata?: Map<string, string>;
|
|
221
|
-
|
|
243
|
+
type?: SuiteType;
|
|
244
|
+
parent_suite?: TestSuite;
|
|
222
245
|
}) {
|
|
223
246
|
super();
|
|
224
|
-
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3,
|
|
247
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 4], this.#one_of_decls);
|
|
225
248
|
if (!Array.isArray(data) && typeof data == "object") {
|
|
226
249
|
if ("id" in data && data.id != undefined) {
|
|
227
250
|
this.id = data.id;
|
|
@@ -229,17 +252,26 @@ export namespace testsystem.v1.entities {
|
|
|
229
252
|
if ("name" in data && data.name != undefined) {
|
|
230
253
|
this.name = data.name;
|
|
231
254
|
}
|
|
232
|
-
if ("
|
|
233
|
-
this.
|
|
255
|
+
if ("tests" in data && data.tests != undefined) {
|
|
256
|
+
this.tests = data.tests;
|
|
257
|
+
}
|
|
258
|
+
if ("sub_suites" in data && data.sub_suites != undefined) {
|
|
259
|
+
this.sub_suites = data.sub_suites;
|
|
234
260
|
}
|
|
235
261
|
if ("description" in data && data.description != undefined) {
|
|
236
262
|
this.description = data.description;
|
|
237
263
|
}
|
|
264
|
+
if ("location" in data && data.location != undefined) {
|
|
265
|
+
this.location = data.location;
|
|
266
|
+
}
|
|
238
267
|
if ("metadata" in data && data.metadata != undefined) {
|
|
239
268
|
this.metadata = data.metadata;
|
|
240
269
|
}
|
|
241
|
-
if ("
|
|
242
|
-
this.
|
|
270
|
+
if ("type" in data && data.type != undefined) {
|
|
271
|
+
this.type = data.type;
|
|
272
|
+
}
|
|
273
|
+
if ("parent_suite" in data && data.parent_suite != undefined) {
|
|
274
|
+
this.parent_suite = data.parent_suite;
|
|
243
275
|
}
|
|
244
276
|
}
|
|
245
277
|
if (!this.metadata)
|
|
@@ -257,39 +289,63 @@ export namespace testsystem.v1.entities {
|
|
|
257
289
|
set name(value: string) {
|
|
258
290
|
pb_1.Message.setField(this, 2, value);
|
|
259
291
|
}
|
|
260
|
-
get
|
|
261
|
-
return pb_1.Message.getRepeatedWrapperField(this,
|
|
292
|
+
get tests() {
|
|
293
|
+
return pb_1.Message.getRepeatedWrapperField(this, TestCase, 3) as TestCase[];
|
|
262
294
|
}
|
|
263
|
-
set
|
|
295
|
+
set tests(value: TestCase[]) {
|
|
264
296
|
pb_1.Message.setRepeatedWrapperField(this, 3, value);
|
|
265
297
|
}
|
|
298
|
+
get sub_suites() {
|
|
299
|
+
return pb_1.Message.getRepeatedWrapperField(this, TestSuite, 4) as TestSuite[];
|
|
300
|
+
}
|
|
301
|
+
set sub_suites(value: TestSuite[]) {
|
|
302
|
+
pb_1.Message.setRepeatedWrapperField(this, 4, value);
|
|
303
|
+
}
|
|
266
304
|
get description() {
|
|
267
|
-
return pb_1.Message.getFieldWithDefault(this,
|
|
305
|
+
return pb_1.Message.getFieldWithDefault(this, 5, "") as string;
|
|
268
306
|
}
|
|
269
307
|
set description(value: string) {
|
|
270
|
-
pb_1.Message.setField(this,
|
|
308
|
+
pb_1.Message.setField(this, 5, value);
|
|
309
|
+
}
|
|
310
|
+
get location() {
|
|
311
|
+
return pb_1.Message.getFieldWithDefault(this, 6, "") as string;
|
|
312
|
+
}
|
|
313
|
+
set location(value: string) {
|
|
314
|
+
pb_1.Message.setField(this, 6, value);
|
|
271
315
|
}
|
|
272
316
|
get metadata() {
|
|
273
|
-
return pb_1.Message.getField(this,
|
|
317
|
+
return pb_1.Message.getField(this, 7) as any as Map<string, string>;
|
|
274
318
|
}
|
|
275
319
|
set metadata(value: Map<string, string>) {
|
|
276
|
-
pb_1.Message.setField(this,
|
|
320
|
+
pb_1.Message.setField(this, 7, value as any);
|
|
277
321
|
}
|
|
278
|
-
get
|
|
279
|
-
return pb_1.Message.
|
|
322
|
+
get type() {
|
|
323
|
+
return pb_1.Message.getFieldWithDefault(this, 8, SuiteType.ROOT) as SuiteType;
|
|
280
324
|
}
|
|
281
|
-
set
|
|
282
|
-
pb_1.Message.
|
|
325
|
+
set type(value: SuiteType) {
|
|
326
|
+
pb_1.Message.setField(this, 8, value);
|
|
327
|
+
}
|
|
328
|
+
get parent_suite() {
|
|
329
|
+
return pb_1.Message.getWrapperField(this, TestSuite, 9) as TestSuite;
|
|
330
|
+
}
|
|
331
|
+
set parent_suite(value: TestSuite) {
|
|
332
|
+
pb_1.Message.setWrapperField(this, 9, value);
|
|
333
|
+
}
|
|
334
|
+
get has_parent_suite() {
|
|
335
|
+
return pb_1.Message.getField(this, 9) != null;
|
|
283
336
|
}
|
|
284
337
|
static fromObject(data: {
|
|
285
338
|
id?: string;
|
|
286
339
|
name?: string;
|
|
287
|
-
|
|
340
|
+
tests?: ReturnType<typeof TestCase.prototype.toObject>[];
|
|
341
|
+
sub_suites?: ReturnType<typeof TestSuite.prototype.toObject>[];
|
|
288
342
|
description?: string;
|
|
343
|
+
location?: string;
|
|
289
344
|
metadata?: {
|
|
290
345
|
[key: string]: string;
|
|
291
346
|
};
|
|
292
|
-
|
|
347
|
+
type?: SuiteType;
|
|
348
|
+
parent_suite?: ReturnType<typeof TestSuite.prototype.toObject>;
|
|
293
349
|
}): TestSuite {
|
|
294
350
|
const message = new TestSuite({});
|
|
295
351
|
if (data.id != null) {
|
|
@@ -298,17 +354,26 @@ export namespace testsystem.v1.entities {
|
|
|
298
354
|
if (data.name != null) {
|
|
299
355
|
message.name = data.name;
|
|
300
356
|
}
|
|
301
|
-
if (data.
|
|
302
|
-
message.
|
|
357
|
+
if (data.tests != null) {
|
|
358
|
+
message.tests = data.tests.map(item => TestCase.fromObject(item));
|
|
359
|
+
}
|
|
360
|
+
if (data.sub_suites != null) {
|
|
361
|
+
message.sub_suites = data.sub_suites.map(item => TestSuite.fromObject(item));
|
|
303
362
|
}
|
|
304
363
|
if (data.description != null) {
|
|
305
364
|
message.description = data.description;
|
|
306
365
|
}
|
|
366
|
+
if (data.location != null) {
|
|
367
|
+
message.location = data.location;
|
|
368
|
+
}
|
|
307
369
|
if (typeof data.metadata == "object") {
|
|
308
370
|
message.metadata = new Map(Object.entries(data.metadata));
|
|
309
371
|
}
|
|
310
|
-
if (data.
|
|
311
|
-
message.
|
|
372
|
+
if (data.type != null) {
|
|
373
|
+
message.type = data.type;
|
|
374
|
+
}
|
|
375
|
+
if (data.parent_suite != null) {
|
|
376
|
+
message.parent_suite = TestSuite.fromObject(data.parent_suite);
|
|
312
377
|
}
|
|
313
378
|
return message;
|
|
314
379
|
}
|
|
@@ -316,12 +381,15 @@ export namespace testsystem.v1.entities {
|
|
|
316
381
|
const data: {
|
|
317
382
|
id?: string;
|
|
318
383
|
name?: string;
|
|
319
|
-
|
|
384
|
+
tests?: ReturnType<typeof TestCase.prototype.toObject>[];
|
|
385
|
+
sub_suites?: ReturnType<typeof TestSuite.prototype.toObject>[];
|
|
320
386
|
description?: string;
|
|
387
|
+
location?: string;
|
|
321
388
|
metadata?: {
|
|
322
389
|
[key: string]: string;
|
|
323
390
|
};
|
|
324
|
-
|
|
391
|
+
type?: SuiteType;
|
|
392
|
+
parent_suite?: ReturnType<typeof TestSuite.prototype.toObject>;
|
|
325
393
|
} = {};
|
|
326
394
|
if (this.id != null) {
|
|
327
395
|
data.id = this.id;
|
|
@@ -329,17 +397,26 @@ export namespace testsystem.v1.entities {
|
|
|
329
397
|
if (this.name != null) {
|
|
330
398
|
data.name = this.name;
|
|
331
399
|
}
|
|
332
|
-
if (this.
|
|
333
|
-
data.
|
|
400
|
+
if (this.tests != null) {
|
|
401
|
+
data.tests = this.tests.map((item: TestCase) => item.toObject());
|
|
402
|
+
}
|
|
403
|
+
if (this.sub_suites != null) {
|
|
404
|
+
data.sub_suites = this.sub_suites.map((item: TestSuite) => item.toObject());
|
|
334
405
|
}
|
|
335
406
|
if (this.description != null) {
|
|
336
407
|
data.description = this.description;
|
|
337
408
|
}
|
|
409
|
+
if (this.location != null) {
|
|
410
|
+
data.location = this.location;
|
|
411
|
+
}
|
|
338
412
|
if (this.metadata != null) {
|
|
339
413
|
data.metadata = (Object.fromEntries)(this.metadata);
|
|
340
414
|
}
|
|
341
|
-
if (this.
|
|
342
|
-
data.
|
|
415
|
+
if (this.type != null) {
|
|
416
|
+
data.type = this.type;
|
|
417
|
+
}
|
|
418
|
+
if (this.parent_suite != null) {
|
|
419
|
+
data.parent_suite = this.parent_suite.toObject();
|
|
343
420
|
}
|
|
344
421
|
return data;
|
|
345
422
|
}
|
|
@@ -351,18 +428,24 @@ export namespace testsystem.v1.entities {
|
|
|
351
428
|
writer.writeString(1, this.id);
|
|
352
429
|
if (this.name.length)
|
|
353
430
|
writer.writeString(2, this.name);
|
|
354
|
-
if (this.
|
|
355
|
-
writer.writeRepeatedMessage(3, this.
|
|
431
|
+
if (this.tests.length)
|
|
432
|
+
writer.writeRepeatedMessage(3, this.tests, (item: TestCase) => item.serialize(writer));
|
|
433
|
+
if (this.sub_suites.length)
|
|
434
|
+
writer.writeRepeatedMessage(4, this.sub_suites, (item: TestSuite) => item.serialize(writer));
|
|
356
435
|
if (this.description.length)
|
|
357
|
-
writer.writeString(
|
|
436
|
+
writer.writeString(5, this.description);
|
|
437
|
+
if (this.location.length)
|
|
438
|
+
writer.writeString(6, this.location);
|
|
358
439
|
for (const [key, value] of this.metadata) {
|
|
359
|
-
writer.writeMessage(
|
|
440
|
+
writer.writeMessage(7, this.metadata, () => {
|
|
360
441
|
writer.writeString(1, key);
|
|
361
442
|
writer.writeString(2, value);
|
|
362
443
|
});
|
|
363
444
|
}
|
|
364
|
-
if (this.
|
|
365
|
-
writer.
|
|
445
|
+
if (this.type != SuiteType.ROOT)
|
|
446
|
+
writer.writeEnum(8, this.type);
|
|
447
|
+
if (this.has_parent_suite)
|
|
448
|
+
writer.writeMessage(9, this.parent_suite, () => this.parent_suite.serialize(writer));
|
|
366
449
|
if (!w)
|
|
367
450
|
return writer.getResultBuffer();
|
|
368
451
|
}
|
|
@@ -379,16 +462,25 @@ export namespace testsystem.v1.entities {
|
|
|
379
462
|
message.name = reader.readString();
|
|
380
463
|
break;
|
|
381
464
|
case 3:
|
|
382
|
-
reader.readMessage(message.
|
|
465
|
+
reader.readMessage(message.tests, () => pb_1.Message.addToRepeatedWrapperField(message, 3, TestCase.deserialize(reader), TestCase));
|
|
383
466
|
break;
|
|
384
467
|
case 4:
|
|
385
|
-
message.
|
|
468
|
+
reader.readMessage(message.sub_suites, () => pb_1.Message.addToRepeatedWrapperField(message, 4, TestSuite.deserialize(reader), TestSuite));
|
|
386
469
|
break;
|
|
387
470
|
case 5:
|
|
388
|
-
|
|
471
|
+
message.description = reader.readString();
|
|
389
472
|
break;
|
|
390
473
|
case 6:
|
|
391
|
-
|
|
474
|
+
message.location = reader.readString();
|
|
475
|
+
break;
|
|
476
|
+
case 7:
|
|
477
|
+
reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.metadata as any, reader, reader.readString, reader.readString));
|
|
478
|
+
break;
|
|
479
|
+
case 8:
|
|
480
|
+
message.type = reader.readEnum();
|
|
481
|
+
break;
|
|
482
|
+
case 9:
|
|
483
|
+
reader.readMessage(message.parent_suite, () => message.parent_suite = TestSuite.deserialize(reader));
|
|
392
484
|
break;
|
|
393
485
|
default: reader.skipField();
|
|
394
486
|
}
|
|
@@ -402,4 +494,670 @@ export namespace testsystem.v1.entities {
|
|
|
402
494
|
return TestSuite.deserialize(bytes);
|
|
403
495
|
}
|
|
404
496
|
}
|
|
497
|
+
export class Step extends pb_1.Message {
|
|
498
|
+
#one_of_decls: number[][] = [];
|
|
499
|
+
constructor(data?: any[] | {
|
|
500
|
+
id?: string;
|
|
501
|
+
test_id?: string;
|
|
502
|
+
title?: string;
|
|
503
|
+
description?: string;
|
|
504
|
+
start_time?: dependency_2.google.protobuf.Timestamp;
|
|
505
|
+
type?: string;
|
|
506
|
+
duration?: number;
|
|
507
|
+
metadata?: Map<string, string>;
|
|
508
|
+
parent_step_id?: string;
|
|
509
|
+
sub_steps?: Step[];
|
|
510
|
+
worker_index?: string;
|
|
511
|
+
status?: dependency_1.testsystem.v1.common.TestStatus;
|
|
512
|
+
error?: string;
|
|
513
|
+
location?: string;
|
|
514
|
+
}) {
|
|
515
|
+
super();
|
|
516
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [10], this.#one_of_decls);
|
|
517
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
518
|
+
if ("id" in data && data.id != undefined) {
|
|
519
|
+
this.id = data.id;
|
|
520
|
+
}
|
|
521
|
+
if ("test_id" in data && data.test_id != undefined) {
|
|
522
|
+
this.test_id = data.test_id;
|
|
523
|
+
}
|
|
524
|
+
if ("title" in data && data.title != undefined) {
|
|
525
|
+
this.title = data.title;
|
|
526
|
+
}
|
|
527
|
+
if ("description" in data && data.description != undefined) {
|
|
528
|
+
this.description = data.description;
|
|
529
|
+
}
|
|
530
|
+
if ("start_time" in data && data.start_time != undefined) {
|
|
531
|
+
this.start_time = data.start_time;
|
|
532
|
+
}
|
|
533
|
+
if ("type" in data && data.type != undefined) {
|
|
534
|
+
this.type = data.type;
|
|
535
|
+
}
|
|
536
|
+
if ("duration" in data && data.duration != undefined) {
|
|
537
|
+
this.duration = data.duration;
|
|
538
|
+
}
|
|
539
|
+
if ("metadata" in data && data.metadata != undefined) {
|
|
540
|
+
this.metadata = data.metadata;
|
|
541
|
+
}
|
|
542
|
+
if ("parent_step_id" in data && data.parent_step_id != undefined) {
|
|
543
|
+
this.parent_step_id = data.parent_step_id;
|
|
544
|
+
}
|
|
545
|
+
if ("sub_steps" in data && data.sub_steps != undefined) {
|
|
546
|
+
this.sub_steps = data.sub_steps;
|
|
547
|
+
}
|
|
548
|
+
if ("worker_index" in data && data.worker_index != undefined) {
|
|
549
|
+
this.worker_index = data.worker_index;
|
|
550
|
+
}
|
|
551
|
+
if ("status" in data && data.status != undefined) {
|
|
552
|
+
this.status = data.status;
|
|
553
|
+
}
|
|
554
|
+
if ("error" in data && data.error != undefined) {
|
|
555
|
+
this.error = data.error;
|
|
556
|
+
}
|
|
557
|
+
if ("location" in data && data.location != undefined) {
|
|
558
|
+
this.location = data.location;
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
if (!this.metadata)
|
|
562
|
+
this.metadata = new Map();
|
|
563
|
+
}
|
|
564
|
+
get id() {
|
|
565
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
566
|
+
}
|
|
567
|
+
set id(value: string) {
|
|
568
|
+
pb_1.Message.setField(this, 1, value);
|
|
569
|
+
}
|
|
570
|
+
get test_id() {
|
|
571
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
|
|
572
|
+
}
|
|
573
|
+
set test_id(value: string) {
|
|
574
|
+
pb_1.Message.setField(this, 2, value);
|
|
575
|
+
}
|
|
576
|
+
get title() {
|
|
577
|
+
return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
|
|
578
|
+
}
|
|
579
|
+
set title(value: string) {
|
|
580
|
+
pb_1.Message.setField(this, 3, value);
|
|
581
|
+
}
|
|
582
|
+
get description() {
|
|
583
|
+
return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
|
|
584
|
+
}
|
|
585
|
+
set description(value: string) {
|
|
586
|
+
pb_1.Message.setField(this, 4, value);
|
|
587
|
+
}
|
|
588
|
+
get start_time() {
|
|
589
|
+
return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 5) as dependency_2.google.protobuf.Timestamp;
|
|
590
|
+
}
|
|
591
|
+
set start_time(value: dependency_2.google.protobuf.Timestamp) {
|
|
592
|
+
pb_1.Message.setWrapperField(this, 5, value);
|
|
593
|
+
}
|
|
594
|
+
get has_start_time() {
|
|
595
|
+
return pb_1.Message.getField(this, 5) != null;
|
|
596
|
+
}
|
|
597
|
+
get type() {
|
|
598
|
+
return pb_1.Message.getFieldWithDefault(this, 6, "") as string;
|
|
599
|
+
}
|
|
600
|
+
set type(value: string) {
|
|
601
|
+
pb_1.Message.setField(this, 6, value);
|
|
602
|
+
}
|
|
603
|
+
get duration() {
|
|
604
|
+
return pb_1.Message.getFieldWithDefault(this, 7, 0) as number;
|
|
605
|
+
}
|
|
606
|
+
set duration(value: number) {
|
|
607
|
+
pb_1.Message.setField(this, 7, value);
|
|
608
|
+
}
|
|
609
|
+
get metadata() {
|
|
610
|
+
return pb_1.Message.getField(this, 8) as any as Map<string, string>;
|
|
611
|
+
}
|
|
612
|
+
set metadata(value: Map<string, string>) {
|
|
613
|
+
pb_1.Message.setField(this, 8, value as any);
|
|
614
|
+
}
|
|
615
|
+
get parent_step_id() {
|
|
616
|
+
return pb_1.Message.getFieldWithDefault(this, 9, "") as string;
|
|
617
|
+
}
|
|
618
|
+
set parent_step_id(value: string) {
|
|
619
|
+
pb_1.Message.setField(this, 9, value);
|
|
620
|
+
}
|
|
621
|
+
get sub_steps() {
|
|
622
|
+
return pb_1.Message.getRepeatedWrapperField(this, Step, 10) as Step[];
|
|
623
|
+
}
|
|
624
|
+
set sub_steps(value: Step[]) {
|
|
625
|
+
pb_1.Message.setRepeatedWrapperField(this, 10, value);
|
|
626
|
+
}
|
|
627
|
+
get worker_index() {
|
|
628
|
+
return pb_1.Message.getFieldWithDefault(this, 11, "") as string;
|
|
629
|
+
}
|
|
630
|
+
set worker_index(value: string) {
|
|
631
|
+
pb_1.Message.setField(this, 11, value);
|
|
632
|
+
}
|
|
633
|
+
get status() {
|
|
634
|
+
return pb_1.Message.getFieldWithDefault(this, 12, dependency_1.testsystem.v1.common.TestStatus.UNKNOWN) as dependency_1.testsystem.v1.common.TestStatus;
|
|
635
|
+
}
|
|
636
|
+
set status(value: dependency_1.testsystem.v1.common.TestStatus) {
|
|
637
|
+
pb_1.Message.setField(this, 12, value);
|
|
638
|
+
}
|
|
639
|
+
get error() {
|
|
640
|
+
return pb_1.Message.getFieldWithDefault(this, 13, "") as string;
|
|
641
|
+
}
|
|
642
|
+
set error(value: string) {
|
|
643
|
+
pb_1.Message.setField(this, 13, value);
|
|
644
|
+
}
|
|
645
|
+
get location() {
|
|
646
|
+
return pb_1.Message.getFieldWithDefault(this, 14, "") as string;
|
|
647
|
+
}
|
|
648
|
+
set location(value: string) {
|
|
649
|
+
pb_1.Message.setField(this, 14, value);
|
|
650
|
+
}
|
|
651
|
+
static fromObject(data: {
|
|
652
|
+
id?: string;
|
|
653
|
+
test_id?: string;
|
|
654
|
+
title?: string;
|
|
655
|
+
description?: string;
|
|
656
|
+
start_time?: ReturnType<typeof dependency_2.google.protobuf.Timestamp.prototype.toObject>;
|
|
657
|
+
type?: string;
|
|
658
|
+
duration?: number;
|
|
659
|
+
metadata?: {
|
|
660
|
+
[key: string]: string;
|
|
661
|
+
};
|
|
662
|
+
parent_step_id?: string;
|
|
663
|
+
sub_steps?: ReturnType<typeof Step.prototype.toObject>[];
|
|
664
|
+
worker_index?: string;
|
|
665
|
+
status?: dependency_1.testsystem.v1.common.TestStatus;
|
|
666
|
+
error?: string;
|
|
667
|
+
location?: string;
|
|
668
|
+
}): Step {
|
|
669
|
+
const message = new Step({});
|
|
670
|
+
if (data.id != null) {
|
|
671
|
+
message.id = data.id;
|
|
672
|
+
}
|
|
673
|
+
if (data.test_id != null) {
|
|
674
|
+
message.test_id = data.test_id;
|
|
675
|
+
}
|
|
676
|
+
if (data.title != null) {
|
|
677
|
+
message.title = data.title;
|
|
678
|
+
}
|
|
679
|
+
if (data.description != null) {
|
|
680
|
+
message.description = data.description;
|
|
681
|
+
}
|
|
682
|
+
if (data.start_time != null) {
|
|
683
|
+
message.start_time = dependency_2.google.protobuf.Timestamp.fromObject(data.start_time);
|
|
684
|
+
}
|
|
685
|
+
if (data.type != null) {
|
|
686
|
+
message.type = data.type;
|
|
687
|
+
}
|
|
688
|
+
if (data.duration != null) {
|
|
689
|
+
message.duration = data.duration;
|
|
690
|
+
}
|
|
691
|
+
if (typeof data.metadata == "object") {
|
|
692
|
+
message.metadata = new Map(Object.entries(data.metadata));
|
|
693
|
+
}
|
|
694
|
+
if (data.parent_step_id != null) {
|
|
695
|
+
message.parent_step_id = data.parent_step_id;
|
|
696
|
+
}
|
|
697
|
+
if (data.sub_steps != null) {
|
|
698
|
+
message.sub_steps = data.sub_steps.map(item => Step.fromObject(item));
|
|
699
|
+
}
|
|
700
|
+
if (data.worker_index != null) {
|
|
701
|
+
message.worker_index = data.worker_index;
|
|
702
|
+
}
|
|
703
|
+
if (data.status != null) {
|
|
704
|
+
message.status = data.status;
|
|
705
|
+
}
|
|
706
|
+
if (data.error != null) {
|
|
707
|
+
message.error = data.error;
|
|
708
|
+
}
|
|
709
|
+
if (data.location != null) {
|
|
710
|
+
message.location = data.location;
|
|
711
|
+
}
|
|
712
|
+
return message;
|
|
713
|
+
}
|
|
714
|
+
toObject() {
|
|
715
|
+
const data: {
|
|
716
|
+
id?: string;
|
|
717
|
+
test_id?: string;
|
|
718
|
+
title?: string;
|
|
719
|
+
description?: string;
|
|
720
|
+
start_time?: ReturnType<typeof dependency_2.google.protobuf.Timestamp.prototype.toObject>;
|
|
721
|
+
type?: string;
|
|
722
|
+
duration?: number;
|
|
723
|
+
metadata?: {
|
|
724
|
+
[key: string]: string;
|
|
725
|
+
};
|
|
726
|
+
parent_step_id?: string;
|
|
727
|
+
sub_steps?: ReturnType<typeof Step.prototype.toObject>[];
|
|
728
|
+
worker_index?: string;
|
|
729
|
+
status?: dependency_1.testsystem.v1.common.TestStatus;
|
|
730
|
+
error?: string;
|
|
731
|
+
location?: string;
|
|
732
|
+
} = {};
|
|
733
|
+
if (this.id != null) {
|
|
734
|
+
data.id = this.id;
|
|
735
|
+
}
|
|
736
|
+
if (this.test_id != null) {
|
|
737
|
+
data.test_id = this.test_id;
|
|
738
|
+
}
|
|
739
|
+
if (this.title != null) {
|
|
740
|
+
data.title = this.title;
|
|
741
|
+
}
|
|
742
|
+
if (this.description != null) {
|
|
743
|
+
data.description = this.description;
|
|
744
|
+
}
|
|
745
|
+
if (this.start_time != null) {
|
|
746
|
+
data.start_time = this.start_time.toObject();
|
|
747
|
+
}
|
|
748
|
+
if (this.type != null) {
|
|
749
|
+
data.type = this.type;
|
|
750
|
+
}
|
|
751
|
+
if (this.duration != null) {
|
|
752
|
+
data.duration = this.duration;
|
|
753
|
+
}
|
|
754
|
+
if (this.metadata != null) {
|
|
755
|
+
data.metadata = (Object.fromEntries)(this.metadata);
|
|
756
|
+
}
|
|
757
|
+
if (this.parent_step_id != null) {
|
|
758
|
+
data.parent_step_id = this.parent_step_id;
|
|
759
|
+
}
|
|
760
|
+
if (this.sub_steps != null) {
|
|
761
|
+
data.sub_steps = this.sub_steps.map((item: Step) => item.toObject());
|
|
762
|
+
}
|
|
763
|
+
if (this.worker_index != null) {
|
|
764
|
+
data.worker_index = this.worker_index;
|
|
765
|
+
}
|
|
766
|
+
if (this.status != null) {
|
|
767
|
+
data.status = this.status;
|
|
768
|
+
}
|
|
769
|
+
if (this.error != null) {
|
|
770
|
+
data.error = this.error;
|
|
771
|
+
}
|
|
772
|
+
if (this.location != null) {
|
|
773
|
+
data.location = this.location;
|
|
774
|
+
}
|
|
775
|
+
return data;
|
|
776
|
+
}
|
|
777
|
+
serialize(): Uint8Array;
|
|
778
|
+
serialize(w: pb_1.BinaryWriter): void;
|
|
779
|
+
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
|
780
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
781
|
+
if (this.id.length)
|
|
782
|
+
writer.writeString(1, this.id);
|
|
783
|
+
if (this.test_id.length)
|
|
784
|
+
writer.writeString(2, this.test_id);
|
|
785
|
+
if (this.title.length)
|
|
786
|
+
writer.writeString(3, this.title);
|
|
787
|
+
if (this.description.length)
|
|
788
|
+
writer.writeString(4, this.description);
|
|
789
|
+
if (this.has_start_time)
|
|
790
|
+
writer.writeMessage(5, this.start_time, () => this.start_time.serialize(writer));
|
|
791
|
+
if (this.type.length)
|
|
792
|
+
writer.writeString(6, this.type);
|
|
793
|
+
if (this.duration != 0)
|
|
794
|
+
writer.writeInt64(7, this.duration);
|
|
795
|
+
for (const [key, value] of this.metadata) {
|
|
796
|
+
writer.writeMessage(8, this.metadata, () => {
|
|
797
|
+
writer.writeString(1, key);
|
|
798
|
+
writer.writeString(2, value);
|
|
799
|
+
});
|
|
800
|
+
}
|
|
801
|
+
if (this.parent_step_id.length)
|
|
802
|
+
writer.writeString(9, this.parent_step_id);
|
|
803
|
+
if (this.sub_steps.length)
|
|
804
|
+
writer.writeRepeatedMessage(10, this.sub_steps, (item: Step) => item.serialize(writer));
|
|
805
|
+
if (this.worker_index.length)
|
|
806
|
+
writer.writeString(11, this.worker_index);
|
|
807
|
+
if (this.status != dependency_1.testsystem.v1.common.TestStatus.UNKNOWN)
|
|
808
|
+
writer.writeEnum(12, this.status);
|
|
809
|
+
if (this.error.length)
|
|
810
|
+
writer.writeString(13, this.error);
|
|
811
|
+
if (this.location.length)
|
|
812
|
+
writer.writeString(14, this.location);
|
|
813
|
+
if (!w)
|
|
814
|
+
return writer.getResultBuffer();
|
|
815
|
+
}
|
|
816
|
+
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Step {
|
|
817
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Step();
|
|
818
|
+
while (reader.nextField()) {
|
|
819
|
+
if (reader.isEndGroup())
|
|
820
|
+
break;
|
|
821
|
+
switch (reader.getFieldNumber()) {
|
|
822
|
+
case 1:
|
|
823
|
+
message.id = reader.readString();
|
|
824
|
+
break;
|
|
825
|
+
case 2:
|
|
826
|
+
message.test_id = reader.readString();
|
|
827
|
+
break;
|
|
828
|
+
case 3:
|
|
829
|
+
message.title = reader.readString();
|
|
830
|
+
break;
|
|
831
|
+
case 4:
|
|
832
|
+
message.description = reader.readString();
|
|
833
|
+
break;
|
|
834
|
+
case 5:
|
|
835
|
+
reader.readMessage(message.start_time, () => message.start_time = dependency_2.google.protobuf.Timestamp.deserialize(reader));
|
|
836
|
+
break;
|
|
837
|
+
case 6:
|
|
838
|
+
message.type = reader.readString();
|
|
839
|
+
break;
|
|
840
|
+
case 7:
|
|
841
|
+
message.duration = reader.readInt64();
|
|
842
|
+
break;
|
|
843
|
+
case 8:
|
|
844
|
+
reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.metadata as any, reader, reader.readString, reader.readString));
|
|
845
|
+
break;
|
|
846
|
+
case 9:
|
|
847
|
+
message.parent_step_id = reader.readString();
|
|
848
|
+
break;
|
|
849
|
+
case 10:
|
|
850
|
+
reader.readMessage(message.sub_steps, () => pb_1.Message.addToRepeatedWrapperField(message, 10, Step.deserialize(reader), Step));
|
|
851
|
+
break;
|
|
852
|
+
case 11:
|
|
853
|
+
message.worker_index = reader.readString();
|
|
854
|
+
break;
|
|
855
|
+
case 12:
|
|
856
|
+
message.status = reader.readEnum();
|
|
857
|
+
break;
|
|
858
|
+
case 13:
|
|
859
|
+
message.error = reader.readString();
|
|
860
|
+
break;
|
|
861
|
+
case 14:
|
|
862
|
+
message.location = reader.readString();
|
|
863
|
+
break;
|
|
864
|
+
default: reader.skipField();
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
return message;
|
|
868
|
+
}
|
|
869
|
+
serializeBinary(): Uint8Array {
|
|
870
|
+
return this.serialize();
|
|
871
|
+
}
|
|
872
|
+
static deserializeBinary(bytes: Uint8Array): Step {
|
|
873
|
+
return Step.deserialize(bytes);
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
export class TestResult extends pb_1.Message {
|
|
877
|
+
#one_of_decls: number[][] = [];
|
|
878
|
+
constructor(data?: any[] | {
|
|
879
|
+
id?: string;
|
|
880
|
+
test_id?: string;
|
|
881
|
+
title?: string;
|
|
882
|
+
status?: dependency_1.testsystem.v1.common.TestStatus;
|
|
883
|
+
start_time?: dependency_2.google.protobuf.Timestamp;
|
|
884
|
+
attachments?: dependency_1.testsystem.v1.common.Attachment[];
|
|
885
|
+
error_message?: string;
|
|
886
|
+
stack_trace?: string;
|
|
887
|
+
metadata?: Map<string, string>;
|
|
888
|
+
errors?: string[];
|
|
889
|
+
}) {
|
|
890
|
+
super();
|
|
891
|
+
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [6, 11], this.#one_of_decls);
|
|
892
|
+
if (!Array.isArray(data) && typeof data == "object") {
|
|
893
|
+
if ("id" in data && data.id != undefined) {
|
|
894
|
+
this.id = data.id;
|
|
895
|
+
}
|
|
896
|
+
if ("test_id" in data && data.test_id != undefined) {
|
|
897
|
+
this.test_id = data.test_id;
|
|
898
|
+
}
|
|
899
|
+
if ("title" in data && data.title != undefined) {
|
|
900
|
+
this.title = data.title;
|
|
901
|
+
}
|
|
902
|
+
if ("status" in data && data.status != undefined) {
|
|
903
|
+
this.status = data.status;
|
|
904
|
+
}
|
|
905
|
+
if ("start_time" in data && data.start_time != undefined) {
|
|
906
|
+
this.start_time = data.start_time;
|
|
907
|
+
}
|
|
908
|
+
if ("attachments" in data && data.attachments != undefined) {
|
|
909
|
+
this.attachments = data.attachments;
|
|
910
|
+
}
|
|
911
|
+
if ("error_message" in data && data.error_message != undefined) {
|
|
912
|
+
this.error_message = data.error_message;
|
|
913
|
+
}
|
|
914
|
+
if ("stack_trace" in data && data.stack_trace != undefined) {
|
|
915
|
+
this.stack_trace = data.stack_trace;
|
|
916
|
+
}
|
|
917
|
+
if ("metadata" in data && data.metadata != undefined) {
|
|
918
|
+
this.metadata = data.metadata;
|
|
919
|
+
}
|
|
920
|
+
if ("errors" in data && data.errors != undefined) {
|
|
921
|
+
this.errors = data.errors;
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
if (!this.metadata)
|
|
925
|
+
this.metadata = new Map();
|
|
926
|
+
}
|
|
927
|
+
get id() {
|
|
928
|
+
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
|
|
929
|
+
}
|
|
930
|
+
set id(value: string) {
|
|
931
|
+
pb_1.Message.setField(this, 1, value);
|
|
932
|
+
}
|
|
933
|
+
get test_id() {
|
|
934
|
+
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
|
|
935
|
+
}
|
|
936
|
+
set test_id(value: string) {
|
|
937
|
+
pb_1.Message.setField(this, 2, value);
|
|
938
|
+
}
|
|
939
|
+
get title() {
|
|
940
|
+
return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
|
|
941
|
+
}
|
|
942
|
+
set title(value: string) {
|
|
943
|
+
pb_1.Message.setField(this, 3, value);
|
|
944
|
+
}
|
|
945
|
+
get status() {
|
|
946
|
+
return pb_1.Message.getFieldWithDefault(this, 4, dependency_1.testsystem.v1.common.TestStatus.UNKNOWN) as dependency_1.testsystem.v1.common.TestStatus;
|
|
947
|
+
}
|
|
948
|
+
set status(value: dependency_1.testsystem.v1.common.TestStatus) {
|
|
949
|
+
pb_1.Message.setField(this, 4, value);
|
|
950
|
+
}
|
|
951
|
+
get start_time() {
|
|
952
|
+
return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 5) as dependency_2.google.protobuf.Timestamp;
|
|
953
|
+
}
|
|
954
|
+
set start_time(value: dependency_2.google.protobuf.Timestamp) {
|
|
955
|
+
pb_1.Message.setWrapperField(this, 5, value);
|
|
956
|
+
}
|
|
957
|
+
get has_start_time() {
|
|
958
|
+
return pb_1.Message.getField(this, 5) != null;
|
|
959
|
+
}
|
|
960
|
+
get attachments() {
|
|
961
|
+
return pb_1.Message.getRepeatedWrapperField(this, dependency_1.testsystem.v1.common.Attachment, 6) as dependency_1.testsystem.v1.common.Attachment[];
|
|
962
|
+
}
|
|
963
|
+
set attachments(value: dependency_1.testsystem.v1.common.Attachment[]) {
|
|
964
|
+
pb_1.Message.setRepeatedWrapperField(this, 6, value);
|
|
965
|
+
}
|
|
966
|
+
get error_message() {
|
|
967
|
+
return pb_1.Message.getFieldWithDefault(this, 7, "") as string;
|
|
968
|
+
}
|
|
969
|
+
set error_message(value: string) {
|
|
970
|
+
pb_1.Message.setField(this, 7, value);
|
|
971
|
+
}
|
|
972
|
+
get stack_trace() {
|
|
973
|
+
return pb_1.Message.getFieldWithDefault(this, 8, "") as string;
|
|
974
|
+
}
|
|
975
|
+
set stack_trace(value: string) {
|
|
976
|
+
pb_1.Message.setField(this, 8, value);
|
|
977
|
+
}
|
|
978
|
+
get metadata() {
|
|
979
|
+
return pb_1.Message.getField(this, 9) as any as Map<string, string>;
|
|
980
|
+
}
|
|
981
|
+
set metadata(value: Map<string, string>) {
|
|
982
|
+
pb_1.Message.setField(this, 9, value as any);
|
|
983
|
+
}
|
|
984
|
+
get errors() {
|
|
985
|
+
return pb_1.Message.getFieldWithDefault(this, 11, []) as string[];
|
|
986
|
+
}
|
|
987
|
+
set errors(value: string[]) {
|
|
988
|
+
pb_1.Message.setField(this, 11, value);
|
|
989
|
+
}
|
|
990
|
+
static fromObject(data: {
|
|
991
|
+
id?: string;
|
|
992
|
+
test_id?: string;
|
|
993
|
+
title?: string;
|
|
994
|
+
status?: dependency_1.testsystem.v1.common.TestStatus;
|
|
995
|
+
start_time?: ReturnType<typeof dependency_2.google.protobuf.Timestamp.prototype.toObject>;
|
|
996
|
+
attachments?: ReturnType<typeof dependency_1.testsystem.v1.common.Attachment.prototype.toObject>[];
|
|
997
|
+
error_message?: string;
|
|
998
|
+
stack_trace?: string;
|
|
999
|
+
metadata?: {
|
|
1000
|
+
[key: string]: string;
|
|
1001
|
+
};
|
|
1002
|
+
errors?: string[];
|
|
1003
|
+
}): TestResult {
|
|
1004
|
+
const message = new TestResult({});
|
|
1005
|
+
if (data.id != null) {
|
|
1006
|
+
message.id = data.id;
|
|
1007
|
+
}
|
|
1008
|
+
if (data.test_id != null) {
|
|
1009
|
+
message.test_id = data.test_id;
|
|
1010
|
+
}
|
|
1011
|
+
if (data.title != null) {
|
|
1012
|
+
message.title = data.title;
|
|
1013
|
+
}
|
|
1014
|
+
if (data.status != null) {
|
|
1015
|
+
message.status = data.status;
|
|
1016
|
+
}
|
|
1017
|
+
if (data.start_time != null) {
|
|
1018
|
+
message.start_time = dependency_2.google.protobuf.Timestamp.fromObject(data.start_time);
|
|
1019
|
+
}
|
|
1020
|
+
if (data.attachments != null) {
|
|
1021
|
+
message.attachments = data.attachments.map(item => dependency_1.testsystem.v1.common.Attachment.fromObject(item));
|
|
1022
|
+
}
|
|
1023
|
+
if (data.error_message != null) {
|
|
1024
|
+
message.error_message = data.error_message;
|
|
1025
|
+
}
|
|
1026
|
+
if (data.stack_trace != null) {
|
|
1027
|
+
message.stack_trace = data.stack_trace;
|
|
1028
|
+
}
|
|
1029
|
+
if (typeof data.metadata == "object") {
|
|
1030
|
+
message.metadata = new Map(Object.entries(data.metadata));
|
|
1031
|
+
}
|
|
1032
|
+
if (data.errors != null) {
|
|
1033
|
+
message.errors = data.errors;
|
|
1034
|
+
}
|
|
1035
|
+
return message;
|
|
1036
|
+
}
|
|
1037
|
+
toObject() {
|
|
1038
|
+
const data: {
|
|
1039
|
+
id?: string;
|
|
1040
|
+
test_id?: string;
|
|
1041
|
+
title?: string;
|
|
1042
|
+
status?: dependency_1.testsystem.v1.common.TestStatus;
|
|
1043
|
+
start_time?: ReturnType<typeof dependency_2.google.protobuf.Timestamp.prototype.toObject>;
|
|
1044
|
+
attachments?: ReturnType<typeof dependency_1.testsystem.v1.common.Attachment.prototype.toObject>[];
|
|
1045
|
+
error_message?: string;
|
|
1046
|
+
stack_trace?: string;
|
|
1047
|
+
metadata?: {
|
|
1048
|
+
[key: string]: string;
|
|
1049
|
+
};
|
|
1050
|
+
errors?: string[];
|
|
1051
|
+
} = {};
|
|
1052
|
+
if (this.id != null) {
|
|
1053
|
+
data.id = this.id;
|
|
1054
|
+
}
|
|
1055
|
+
if (this.test_id != null) {
|
|
1056
|
+
data.test_id = this.test_id;
|
|
1057
|
+
}
|
|
1058
|
+
if (this.title != null) {
|
|
1059
|
+
data.title = this.title;
|
|
1060
|
+
}
|
|
1061
|
+
if (this.status != null) {
|
|
1062
|
+
data.status = this.status;
|
|
1063
|
+
}
|
|
1064
|
+
if (this.start_time != null) {
|
|
1065
|
+
data.start_time = this.start_time.toObject();
|
|
1066
|
+
}
|
|
1067
|
+
if (this.attachments != null) {
|
|
1068
|
+
data.attachments = this.attachments.map((item: dependency_1.testsystem.v1.common.Attachment) => item.toObject());
|
|
1069
|
+
}
|
|
1070
|
+
if (this.error_message != null) {
|
|
1071
|
+
data.error_message = this.error_message;
|
|
1072
|
+
}
|
|
1073
|
+
if (this.stack_trace != null) {
|
|
1074
|
+
data.stack_trace = this.stack_trace;
|
|
1075
|
+
}
|
|
1076
|
+
if (this.metadata != null) {
|
|
1077
|
+
data.metadata = (Object.fromEntries)(this.metadata);
|
|
1078
|
+
}
|
|
1079
|
+
if (this.errors != null) {
|
|
1080
|
+
data.errors = this.errors;
|
|
1081
|
+
}
|
|
1082
|
+
return data;
|
|
1083
|
+
}
|
|
1084
|
+
serialize(): Uint8Array;
|
|
1085
|
+
serialize(w: pb_1.BinaryWriter): void;
|
|
1086
|
+
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
|
1087
|
+
const writer = w || new pb_1.BinaryWriter();
|
|
1088
|
+
if (this.id.length)
|
|
1089
|
+
writer.writeString(1, this.id);
|
|
1090
|
+
if (this.test_id.length)
|
|
1091
|
+
writer.writeString(2, this.test_id);
|
|
1092
|
+
if (this.title.length)
|
|
1093
|
+
writer.writeString(3, this.title);
|
|
1094
|
+
if (this.status != dependency_1.testsystem.v1.common.TestStatus.UNKNOWN)
|
|
1095
|
+
writer.writeEnum(4, this.status);
|
|
1096
|
+
if (this.has_start_time)
|
|
1097
|
+
writer.writeMessage(5, this.start_time, () => this.start_time.serialize(writer));
|
|
1098
|
+
if (this.attachments.length)
|
|
1099
|
+
writer.writeRepeatedMessage(6, this.attachments, (item: dependency_1.testsystem.v1.common.Attachment) => item.serialize(writer));
|
|
1100
|
+
if (this.error_message.length)
|
|
1101
|
+
writer.writeString(7, this.error_message);
|
|
1102
|
+
if (this.stack_trace.length)
|
|
1103
|
+
writer.writeString(8, this.stack_trace);
|
|
1104
|
+
for (const [key, value] of this.metadata) {
|
|
1105
|
+
writer.writeMessage(9, this.metadata, () => {
|
|
1106
|
+
writer.writeString(1, key);
|
|
1107
|
+
writer.writeString(2, value);
|
|
1108
|
+
});
|
|
1109
|
+
}
|
|
1110
|
+
if (this.errors.length)
|
|
1111
|
+
writer.writeRepeatedString(11, this.errors);
|
|
1112
|
+
if (!w)
|
|
1113
|
+
return writer.getResultBuffer();
|
|
1114
|
+
}
|
|
1115
|
+
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TestResult {
|
|
1116
|
+
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TestResult();
|
|
1117
|
+
while (reader.nextField()) {
|
|
1118
|
+
if (reader.isEndGroup())
|
|
1119
|
+
break;
|
|
1120
|
+
switch (reader.getFieldNumber()) {
|
|
1121
|
+
case 1:
|
|
1122
|
+
message.id = reader.readString();
|
|
1123
|
+
break;
|
|
1124
|
+
case 2:
|
|
1125
|
+
message.test_id = reader.readString();
|
|
1126
|
+
break;
|
|
1127
|
+
case 3:
|
|
1128
|
+
message.title = reader.readString();
|
|
1129
|
+
break;
|
|
1130
|
+
case 4:
|
|
1131
|
+
message.status = reader.readEnum();
|
|
1132
|
+
break;
|
|
1133
|
+
case 5:
|
|
1134
|
+
reader.readMessage(message.start_time, () => message.start_time = dependency_2.google.protobuf.Timestamp.deserialize(reader));
|
|
1135
|
+
break;
|
|
1136
|
+
case 6:
|
|
1137
|
+
reader.readMessage(message.attachments, () => pb_1.Message.addToRepeatedWrapperField(message, 6, dependency_1.testsystem.v1.common.Attachment.deserialize(reader), dependency_1.testsystem.v1.common.Attachment));
|
|
1138
|
+
break;
|
|
1139
|
+
case 7:
|
|
1140
|
+
message.error_message = reader.readString();
|
|
1141
|
+
break;
|
|
1142
|
+
case 8:
|
|
1143
|
+
message.stack_trace = reader.readString();
|
|
1144
|
+
break;
|
|
1145
|
+
case 9:
|
|
1146
|
+
reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.metadata as any, reader, reader.readString, reader.readString));
|
|
1147
|
+
break;
|
|
1148
|
+
case 11:
|
|
1149
|
+
pb_1.Message.addToRepeatedField(message, 11, reader.readString());
|
|
1150
|
+
break;
|
|
1151
|
+
default: reader.skipField();
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
return message;
|
|
1155
|
+
}
|
|
1156
|
+
serializeBinary(): Uint8Array {
|
|
1157
|
+
return this.serialize();
|
|
1158
|
+
}
|
|
1159
|
+
static deserializeBinary(bytes: Uint8Array): TestResult {
|
|
1160
|
+
return TestResult.deserialize(bytes);
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
405
1163
|
}
|