@stanterprise/protobuf 0.0.7 → 0.0.9

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.
@@ -0,0 +1,987 @@
1
+ /**
2
+ * Generated by the protoc-gen-ts. DO NOT EDIT!
3
+ * compiler version: 3.19.1
4
+ * source: testsystem/v1/entities/test_case.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 class TestCaseSpec extends pb_1.Message {
12
+ #one_of_decls: number[][] = [];
13
+ constructor(data?: any[] | {
14
+ id?: string;
15
+ name?: string;
16
+ description?: string;
17
+ metadata?: Map<string, string>;
18
+ status?: dependency_1.testsystem.v1.common.TestStatus;
19
+ parent_suite_id?: string;
20
+ tags?: string[];
21
+ }) {
22
+ super();
23
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [7], this.#one_of_decls);
24
+ if (!Array.isArray(data) && typeof data == "object") {
25
+ if ("id" in data && data.id != undefined) {
26
+ this.id = data.id;
27
+ }
28
+ if ("name" in data && data.name != undefined) {
29
+ this.name = data.name;
30
+ }
31
+ if ("description" in data && data.description != undefined) {
32
+ this.description = data.description;
33
+ }
34
+ if ("metadata" in data && data.metadata != undefined) {
35
+ this.metadata = data.metadata;
36
+ }
37
+ if ("status" in data && data.status != undefined) {
38
+ this.status = data.status;
39
+ }
40
+ if ("parent_suite_id" in data && data.parent_suite_id != undefined) {
41
+ this.parent_suite_id = data.parent_suite_id;
42
+ }
43
+ if ("tags" in data && data.tags != undefined) {
44
+ this.tags = data.tags;
45
+ }
46
+ }
47
+ if (!this.metadata)
48
+ this.metadata = new Map();
49
+ }
50
+ get id() {
51
+ return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
52
+ }
53
+ set id(value: string) {
54
+ pb_1.Message.setField(this, 1, value);
55
+ }
56
+ get name() {
57
+ return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
58
+ }
59
+ set name(value: string) {
60
+ pb_1.Message.setField(this, 2, value);
61
+ }
62
+ get description() {
63
+ return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
64
+ }
65
+ set description(value: string) {
66
+ pb_1.Message.setField(this, 3, value);
67
+ }
68
+ get metadata() {
69
+ return pb_1.Message.getField(this, 4) as any as Map<string, string>;
70
+ }
71
+ set metadata(value: Map<string, string>) {
72
+ pb_1.Message.setField(this, 4, value as any);
73
+ }
74
+ get status() {
75
+ return pb_1.Message.getFieldWithDefault(this, 5, dependency_1.testsystem.v1.common.TestStatus.UNKNOWN) as dependency_1.testsystem.v1.common.TestStatus;
76
+ }
77
+ set status(value: dependency_1.testsystem.v1.common.TestStatus) {
78
+ pb_1.Message.setField(this, 5, value);
79
+ }
80
+ get parent_suite_id() {
81
+ return pb_1.Message.getFieldWithDefault(this, 6, "") as string;
82
+ }
83
+ set parent_suite_id(value: string) {
84
+ pb_1.Message.setField(this, 6, value);
85
+ }
86
+ get tags() {
87
+ return pb_1.Message.getFieldWithDefault(this, 7, []) as string[];
88
+ }
89
+ set tags(value: string[]) {
90
+ pb_1.Message.setField(this, 7, value);
91
+ }
92
+ static fromObject(data: {
93
+ id?: string;
94
+ name?: string;
95
+ description?: string;
96
+ metadata?: {
97
+ [key: string]: string;
98
+ };
99
+ status?: dependency_1.testsystem.v1.common.TestStatus;
100
+ parent_suite_id?: string;
101
+ tags?: string[];
102
+ }): TestCaseSpec {
103
+ const message = new TestCaseSpec({});
104
+ if (data.id != null) {
105
+ message.id = data.id;
106
+ }
107
+ if (data.name != null) {
108
+ message.name = data.name;
109
+ }
110
+ if (data.description != null) {
111
+ message.description = data.description;
112
+ }
113
+ if (typeof data.metadata == "object") {
114
+ message.metadata = new Map(Object.entries(data.metadata));
115
+ }
116
+ if (data.status != null) {
117
+ message.status = data.status;
118
+ }
119
+ if (data.parent_suite_id != null) {
120
+ message.parent_suite_id = data.parent_suite_id;
121
+ }
122
+ if (data.tags != null) {
123
+ message.tags = data.tags;
124
+ }
125
+ return message;
126
+ }
127
+ toObject() {
128
+ const data: {
129
+ id?: string;
130
+ name?: string;
131
+ description?: string;
132
+ metadata?: {
133
+ [key: string]: string;
134
+ };
135
+ status?: dependency_1.testsystem.v1.common.TestStatus;
136
+ parent_suite_id?: string;
137
+ tags?: string[];
138
+ } = {};
139
+ if (this.id != null) {
140
+ data.id = this.id;
141
+ }
142
+ if (this.name != null) {
143
+ data.name = this.name;
144
+ }
145
+ if (this.description != null) {
146
+ data.description = this.description;
147
+ }
148
+ if (this.metadata != null) {
149
+ data.metadata = (Object.fromEntries)(this.metadata);
150
+ }
151
+ if (this.status != null) {
152
+ data.status = this.status;
153
+ }
154
+ if (this.parent_suite_id != null) {
155
+ data.parent_suite_id = this.parent_suite_id;
156
+ }
157
+ if (this.tags != null) {
158
+ data.tags = this.tags;
159
+ }
160
+ return data;
161
+ }
162
+ serialize(): Uint8Array;
163
+ serialize(w: pb_1.BinaryWriter): void;
164
+ serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
165
+ const writer = w || new pb_1.BinaryWriter();
166
+ if (this.id.length)
167
+ writer.writeString(1, this.id);
168
+ if (this.name.length)
169
+ writer.writeString(2, this.name);
170
+ if (this.description.length)
171
+ writer.writeString(3, this.description);
172
+ for (const [key, value] of this.metadata) {
173
+ writer.writeMessage(4, this.metadata, () => {
174
+ writer.writeString(1, key);
175
+ writer.writeString(2, value);
176
+ });
177
+ }
178
+ if (this.status != dependency_1.testsystem.v1.common.TestStatus.UNKNOWN)
179
+ writer.writeEnum(5, this.status);
180
+ if (this.parent_suite_id.length)
181
+ writer.writeString(6, this.parent_suite_id);
182
+ if (this.tags.length)
183
+ writer.writeRepeatedString(7, this.tags);
184
+ if (!w)
185
+ return writer.getResultBuffer();
186
+ }
187
+ static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TestCaseSpec {
188
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TestCaseSpec();
189
+ while (reader.nextField()) {
190
+ if (reader.isEndGroup())
191
+ break;
192
+ switch (reader.getFieldNumber()) {
193
+ case 1:
194
+ message.id = reader.readString();
195
+ break;
196
+ case 2:
197
+ message.name = reader.readString();
198
+ break;
199
+ case 3:
200
+ message.description = reader.readString();
201
+ break;
202
+ case 4:
203
+ reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.metadata as any, reader, reader.readString, reader.readString));
204
+ break;
205
+ case 5:
206
+ message.status = reader.readEnum();
207
+ break;
208
+ case 6:
209
+ message.parent_suite_id = reader.readString();
210
+ break;
211
+ case 7:
212
+ pb_1.Message.addToRepeatedField(message, 7, reader.readString());
213
+ break;
214
+ default: reader.skipField();
215
+ }
216
+ }
217
+ return message;
218
+ }
219
+ serializeBinary(): Uint8Array {
220
+ return this.serialize();
221
+ }
222
+ static deserializeBinary(bytes: Uint8Array): TestCaseSpec {
223
+ return TestCaseSpec.deserialize(bytes);
224
+ }
225
+ }
226
+ export class TestCaseRun extends pb_1.Message {
227
+ #one_of_decls: number[][] = [];
228
+ constructor(data?: any[] | {
229
+ id?: string;
230
+ test_id?: string;
231
+ run_id?: string;
232
+ test_suite_run_id?: string;
233
+ title?: string;
234
+ status?: dependency_1.testsystem.v1.common.TestStatus;
235
+ start_time?: dependency_2.google.protobuf.Timestamp;
236
+ attachments?: dependency_1.testsystem.v1.common.Attachment[];
237
+ error_message?: string;
238
+ stack_trace?: string;
239
+ metadata?: Map<string, string>;
240
+ errors?: string[];
241
+ actual_tags?: string[];
242
+ }) {
243
+ super();
244
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [8, 12, 13], this.#one_of_decls);
245
+ if (!Array.isArray(data) && typeof data == "object") {
246
+ if ("id" in data && data.id != undefined) {
247
+ this.id = data.id;
248
+ }
249
+ if ("test_id" in data && data.test_id != undefined) {
250
+ this.test_id = data.test_id;
251
+ }
252
+ if ("run_id" in data && data.run_id != undefined) {
253
+ this.run_id = data.run_id;
254
+ }
255
+ if ("test_suite_run_id" in data && data.test_suite_run_id != undefined) {
256
+ this.test_suite_run_id = data.test_suite_run_id;
257
+ }
258
+ if ("title" in data && data.title != undefined) {
259
+ this.title = data.title;
260
+ }
261
+ if ("status" in data && data.status != undefined) {
262
+ this.status = data.status;
263
+ }
264
+ if ("start_time" in data && data.start_time != undefined) {
265
+ this.start_time = data.start_time;
266
+ }
267
+ if ("attachments" in data && data.attachments != undefined) {
268
+ this.attachments = data.attachments;
269
+ }
270
+ if ("error_message" in data && data.error_message != undefined) {
271
+ this.error_message = data.error_message;
272
+ }
273
+ if ("stack_trace" in data && data.stack_trace != undefined) {
274
+ this.stack_trace = data.stack_trace;
275
+ }
276
+ if ("metadata" in data && data.metadata != undefined) {
277
+ this.metadata = data.metadata;
278
+ }
279
+ if ("errors" in data && data.errors != undefined) {
280
+ this.errors = data.errors;
281
+ }
282
+ if ("actual_tags" in data && data.actual_tags != undefined) {
283
+ this.actual_tags = data.actual_tags;
284
+ }
285
+ }
286
+ if (!this.metadata)
287
+ this.metadata = new Map();
288
+ }
289
+ get id() {
290
+ return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
291
+ }
292
+ set id(value: string) {
293
+ pb_1.Message.setField(this, 1, value);
294
+ }
295
+ get test_id() {
296
+ return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
297
+ }
298
+ set test_id(value: string) {
299
+ pb_1.Message.setField(this, 2, value);
300
+ }
301
+ get run_id() {
302
+ return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
303
+ }
304
+ set run_id(value: string) {
305
+ pb_1.Message.setField(this, 3, value);
306
+ }
307
+ get test_suite_run_id() {
308
+ return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
309
+ }
310
+ set test_suite_run_id(value: string) {
311
+ pb_1.Message.setField(this, 4, value);
312
+ }
313
+ get title() {
314
+ return pb_1.Message.getFieldWithDefault(this, 5, "") as string;
315
+ }
316
+ set title(value: string) {
317
+ pb_1.Message.setField(this, 5, value);
318
+ }
319
+ get status() {
320
+ return pb_1.Message.getFieldWithDefault(this, 6, dependency_1.testsystem.v1.common.TestStatus.UNKNOWN) as dependency_1.testsystem.v1.common.TestStatus;
321
+ }
322
+ set status(value: dependency_1.testsystem.v1.common.TestStatus) {
323
+ pb_1.Message.setField(this, 6, value);
324
+ }
325
+ get start_time() {
326
+ return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 7) as dependency_2.google.protobuf.Timestamp;
327
+ }
328
+ set start_time(value: dependency_2.google.protobuf.Timestamp) {
329
+ pb_1.Message.setWrapperField(this, 7, value);
330
+ }
331
+ get has_start_time() {
332
+ return pb_1.Message.getField(this, 7) != null;
333
+ }
334
+ get attachments() {
335
+ return pb_1.Message.getRepeatedWrapperField(this, dependency_1.testsystem.v1.common.Attachment, 8) as dependency_1.testsystem.v1.common.Attachment[];
336
+ }
337
+ set attachments(value: dependency_1.testsystem.v1.common.Attachment[]) {
338
+ pb_1.Message.setRepeatedWrapperField(this, 8, value);
339
+ }
340
+ get error_message() {
341
+ return pb_1.Message.getFieldWithDefault(this, 9, "") as string;
342
+ }
343
+ set error_message(value: string) {
344
+ pb_1.Message.setField(this, 9, value);
345
+ }
346
+ get stack_trace() {
347
+ return pb_1.Message.getFieldWithDefault(this, 10, "") as string;
348
+ }
349
+ set stack_trace(value: string) {
350
+ pb_1.Message.setField(this, 10, value);
351
+ }
352
+ get metadata() {
353
+ return pb_1.Message.getField(this, 11) as any as Map<string, string>;
354
+ }
355
+ set metadata(value: Map<string, string>) {
356
+ pb_1.Message.setField(this, 11, value as any);
357
+ }
358
+ get errors() {
359
+ return pb_1.Message.getFieldWithDefault(this, 12, []) as string[];
360
+ }
361
+ set errors(value: string[]) {
362
+ pb_1.Message.setField(this, 12, value);
363
+ }
364
+ get actual_tags() {
365
+ return pb_1.Message.getFieldWithDefault(this, 13, []) as string[];
366
+ }
367
+ set actual_tags(value: string[]) {
368
+ pb_1.Message.setField(this, 13, value);
369
+ }
370
+ static fromObject(data: {
371
+ id?: string;
372
+ test_id?: string;
373
+ run_id?: string;
374
+ test_suite_run_id?: string;
375
+ title?: string;
376
+ status?: dependency_1.testsystem.v1.common.TestStatus;
377
+ start_time?: ReturnType<typeof dependency_2.google.protobuf.Timestamp.prototype.toObject>;
378
+ attachments?: ReturnType<typeof dependency_1.testsystem.v1.common.Attachment.prototype.toObject>[];
379
+ error_message?: string;
380
+ stack_trace?: string;
381
+ metadata?: {
382
+ [key: string]: string;
383
+ };
384
+ errors?: string[];
385
+ actual_tags?: string[];
386
+ }): TestCaseRun {
387
+ const message = new TestCaseRun({});
388
+ if (data.id != null) {
389
+ message.id = data.id;
390
+ }
391
+ if (data.test_id != null) {
392
+ message.test_id = data.test_id;
393
+ }
394
+ if (data.run_id != null) {
395
+ message.run_id = data.run_id;
396
+ }
397
+ if (data.test_suite_run_id != null) {
398
+ message.test_suite_run_id = data.test_suite_run_id;
399
+ }
400
+ if (data.title != null) {
401
+ message.title = data.title;
402
+ }
403
+ if (data.status != null) {
404
+ message.status = data.status;
405
+ }
406
+ if (data.start_time != null) {
407
+ message.start_time = dependency_2.google.protobuf.Timestamp.fromObject(data.start_time);
408
+ }
409
+ if (data.attachments != null) {
410
+ message.attachments = data.attachments.map(item => dependency_1.testsystem.v1.common.Attachment.fromObject(item));
411
+ }
412
+ if (data.error_message != null) {
413
+ message.error_message = data.error_message;
414
+ }
415
+ if (data.stack_trace != null) {
416
+ message.stack_trace = data.stack_trace;
417
+ }
418
+ if (typeof data.metadata == "object") {
419
+ message.metadata = new Map(Object.entries(data.metadata));
420
+ }
421
+ if (data.errors != null) {
422
+ message.errors = data.errors;
423
+ }
424
+ if (data.actual_tags != null) {
425
+ message.actual_tags = data.actual_tags;
426
+ }
427
+ return message;
428
+ }
429
+ toObject() {
430
+ const data: {
431
+ id?: string;
432
+ test_id?: string;
433
+ run_id?: string;
434
+ test_suite_run_id?: string;
435
+ title?: string;
436
+ status?: dependency_1.testsystem.v1.common.TestStatus;
437
+ start_time?: ReturnType<typeof dependency_2.google.protobuf.Timestamp.prototype.toObject>;
438
+ attachments?: ReturnType<typeof dependency_1.testsystem.v1.common.Attachment.prototype.toObject>[];
439
+ error_message?: string;
440
+ stack_trace?: string;
441
+ metadata?: {
442
+ [key: string]: string;
443
+ };
444
+ errors?: string[];
445
+ actual_tags?: string[];
446
+ } = {};
447
+ if (this.id != null) {
448
+ data.id = this.id;
449
+ }
450
+ if (this.test_id != null) {
451
+ data.test_id = this.test_id;
452
+ }
453
+ if (this.run_id != null) {
454
+ data.run_id = this.run_id;
455
+ }
456
+ if (this.test_suite_run_id != null) {
457
+ data.test_suite_run_id = this.test_suite_run_id;
458
+ }
459
+ if (this.title != null) {
460
+ data.title = this.title;
461
+ }
462
+ if (this.status != null) {
463
+ data.status = this.status;
464
+ }
465
+ if (this.start_time != null) {
466
+ data.start_time = this.start_time.toObject();
467
+ }
468
+ if (this.attachments != null) {
469
+ data.attachments = this.attachments.map((item: dependency_1.testsystem.v1.common.Attachment) => item.toObject());
470
+ }
471
+ if (this.error_message != null) {
472
+ data.error_message = this.error_message;
473
+ }
474
+ if (this.stack_trace != null) {
475
+ data.stack_trace = this.stack_trace;
476
+ }
477
+ if (this.metadata != null) {
478
+ data.metadata = (Object.fromEntries)(this.metadata);
479
+ }
480
+ if (this.errors != null) {
481
+ data.errors = this.errors;
482
+ }
483
+ if (this.actual_tags != null) {
484
+ data.actual_tags = this.actual_tags;
485
+ }
486
+ return data;
487
+ }
488
+ serialize(): Uint8Array;
489
+ serialize(w: pb_1.BinaryWriter): void;
490
+ serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
491
+ const writer = w || new pb_1.BinaryWriter();
492
+ if (this.id.length)
493
+ writer.writeString(1, this.id);
494
+ if (this.test_id.length)
495
+ writer.writeString(2, this.test_id);
496
+ if (this.run_id.length)
497
+ writer.writeString(3, this.run_id);
498
+ if (this.test_suite_run_id.length)
499
+ writer.writeString(4, this.test_suite_run_id);
500
+ if (this.title.length)
501
+ writer.writeString(5, this.title);
502
+ if (this.status != dependency_1.testsystem.v1.common.TestStatus.UNKNOWN)
503
+ writer.writeEnum(6, this.status);
504
+ if (this.has_start_time)
505
+ writer.writeMessage(7, this.start_time, () => this.start_time.serialize(writer));
506
+ if (this.attachments.length)
507
+ writer.writeRepeatedMessage(8, this.attachments, (item: dependency_1.testsystem.v1.common.Attachment) => item.serialize(writer));
508
+ if (this.error_message.length)
509
+ writer.writeString(9, this.error_message);
510
+ if (this.stack_trace.length)
511
+ writer.writeString(10, this.stack_trace);
512
+ for (const [key, value] of this.metadata) {
513
+ writer.writeMessage(11, this.metadata, () => {
514
+ writer.writeString(1, key);
515
+ writer.writeString(2, value);
516
+ });
517
+ }
518
+ if (this.errors.length)
519
+ writer.writeRepeatedString(12, this.errors);
520
+ if (this.actual_tags.length)
521
+ writer.writeRepeatedString(13, this.actual_tags);
522
+ if (!w)
523
+ return writer.getResultBuffer();
524
+ }
525
+ static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TestCaseRun {
526
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TestCaseRun();
527
+ while (reader.nextField()) {
528
+ if (reader.isEndGroup())
529
+ break;
530
+ switch (reader.getFieldNumber()) {
531
+ case 1:
532
+ message.id = reader.readString();
533
+ break;
534
+ case 2:
535
+ message.test_id = reader.readString();
536
+ break;
537
+ case 3:
538
+ message.run_id = reader.readString();
539
+ break;
540
+ case 4:
541
+ message.test_suite_run_id = reader.readString();
542
+ break;
543
+ case 5:
544
+ message.title = reader.readString();
545
+ break;
546
+ case 6:
547
+ message.status = reader.readEnum();
548
+ break;
549
+ case 7:
550
+ reader.readMessage(message.start_time, () => message.start_time = dependency_2.google.protobuf.Timestamp.deserialize(reader));
551
+ break;
552
+ case 8:
553
+ reader.readMessage(message.attachments, () => pb_1.Message.addToRepeatedWrapperField(message, 8, dependency_1.testsystem.v1.common.Attachment.deserialize(reader), dependency_1.testsystem.v1.common.Attachment));
554
+ break;
555
+ case 9:
556
+ message.error_message = reader.readString();
557
+ break;
558
+ case 10:
559
+ message.stack_trace = reader.readString();
560
+ break;
561
+ case 11:
562
+ reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.metadata as any, reader, reader.readString, reader.readString));
563
+ break;
564
+ case 12:
565
+ pb_1.Message.addToRepeatedField(message, 12, reader.readString());
566
+ break;
567
+ case 13:
568
+ pb_1.Message.addToRepeatedField(message, 13, reader.readString());
569
+ break;
570
+ default: reader.skipField();
571
+ }
572
+ }
573
+ return message;
574
+ }
575
+ serializeBinary(): Uint8Array {
576
+ return this.serialize();
577
+ }
578
+ static deserializeBinary(bytes: Uint8Array): TestCaseRun {
579
+ return TestCaseRun.deserialize(bytes);
580
+ }
581
+ }
582
+ export class StepRun extends pb_1.Message {
583
+ #one_of_decls: number[][] = [];
584
+ constructor(data?: any[] | {
585
+ id?: string;
586
+ run_id?: string;
587
+ test_case_run_id?: string;
588
+ title?: string;
589
+ description?: string;
590
+ start_time?: dependency_2.google.protobuf.Timestamp;
591
+ duration?: dependency_3.google.protobuf.Duration;
592
+ type?: string;
593
+ metadata?: Map<string, string>;
594
+ parent_step_id?: string;
595
+ worker_index?: string;
596
+ status?: dependency_1.testsystem.v1.common.TestStatus;
597
+ error?: string;
598
+ errors?: string[];
599
+ location?: string;
600
+ }) {
601
+ super();
602
+ pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [14], this.#one_of_decls);
603
+ if (!Array.isArray(data) && typeof data == "object") {
604
+ if ("id" in data && data.id != undefined) {
605
+ this.id = data.id;
606
+ }
607
+ if ("run_id" in data && data.run_id != undefined) {
608
+ this.run_id = data.run_id;
609
+ }
610
+ if ("test_case_run_id" in data && data.test_case_run_id != undefined) {
611
+ this.test_case_run_id = data.test_case_run_id;
612
+ }
613
+ if ("title" in data && data.title != undefined) {
614
+ this.title = data.title;
615
+ }
616
+ if ("description" in data && data.description != undefined) {
617
+ this.description = data.description;
618
+ }
619
+ if ("start_time" in data && data.start_time != undefined) {
620
+ this.start_time = data.start_time;
621
+ }
622
+ if ("duration" in data && data.duration != undefined) {
623
+ this.duration = data.duration;
624
+ }
625
+ if ("type" in data && data.type != undefined) {
626
+ this.type = data.type;
627
+ }
628
+ if ("metadata" in data && data.metadata != undefined) {
629
+ this.metadata = data.metadata;
630
+ }
631
+ if ("parent_step_id" in data && data.parent_step_id != undefined) {
632
+ this.parent_step_id = data.parent_step_id;
633
+ }
634
+ if ("worker_index" in data && data.worker_index != undefined) {
635
+ this.worker_index = data.worker_index;
636
+ }
637
+ if ("status" in data && data.status != undefined) {
638
+ this.status = data.status;
639
+ }
640
+ if ("error" in data && data.error != undefined) {
641
+ this.error = data.error;
642
+ }
643
+ if ("errors" in data && data.errors != undefined) {
644
+ this.errors = data.errors;
645
+ }
646
+ if ("location" in data && data.location != undefined) {
647
+ this.location = data.location;
648
+ }
649
+ }
650
+ if (!this.metadata)
651
+ this.metadata = new Map();
652
+ }
653
+ get id() {
654
+ return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
655
+ }
656
+ set id(value: string) {
657
+ pb_1.Message.setField(this, 1, value);
658
+ }
659
+ get run_id() {
660
+ return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
661
+ }
662
+ set run_id(value: string) {
663
+ pb_1.Message.setField(this, 2, value);
664
+ }
665
+ get test_case_run_id() {
666
+ return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
667
+ }
668
+ set test_case_run_id(value: string) {
669
+ pb_1.Message.setField(this, 3, value);
670
+ }
671
+ get title() {
672
+ return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
673
+ }
674
+ set title(value: string) {
675
+ pb_1.Message.setField(this, 4, value);
676
+ }
677
+ get description() {
678
+ return pb_1.Message.getFieldWithDefault(this, 5, "") as string;
679
+ }
680
+ set description(value: string) {
681
+ pb_1.Message.setField(this, 5, value);
682
+ }
683
+ get start_time() {
684
+ return pb_1.Message.getWrapperField(this, dependency_2.google.protobuf.Timestamp, 6) as dependency_2.google.protobuf.Timestamp;
685
+ }
686
+ set start_time(value: dependency_2.google.protobuf.Timestamp) {
687
+ pb_1.Message.setWrapperField(this, 6, value);
688
+ }
689
+ get has_start_time() {
690
+ return pb_1.Message.getField(this, 6) != null;
691
+ }
692
+ get duration() {
693
+ return pb_1.Message.getWrapperField(this, dependency_3.google.protobuf.Duration, 7) as dependency_3.google.protobuf.Duration;
694
+ }
695
+ set duration(value: dependency_3.google.protobuf.Duration) {
696
+ pb_1.Message.setWrapperField(this, 7, value);
697
+ }
698
+ get has_duration() {
699
+ return pb_1.Message.getField(this, 7) != null;
700
+ }
701
+ get type() {
702
+ return pb_1.Message.getFieldWithDefault(this, 8, "") as string;
703
+ }
704
+ set type(value: string) {
705
+ pb_1.Message.setField(this, 8, value);
706
+ }
707
+ get metadata() {
708
+ return pb_1.Message.getField(this, 9) as any as Map<string, string>;
709
+ }
710
+ set metadata(value: Map<string, string>) {
711
+ pb_1.Message.setField(this, 9, value as any);
712
+ }
713
+ get parent_step_id() {
714
+ return pb_1.Message.getFieldWithDefault(this, 10, "") as string;
715
+ }
716
+ set parent_step_id(value: string) {
717
+ pb_1.Message.setField(this, 10, value);
718
+ }
719
+ get worker_index() {
720
+ return pb_1.Message.getFieldWithDefault(this, 11, "") as string;
721
+ }
722
+ set worker_index(value: string) {
723
+ pb_1.Message.setField(this, 11, value);
724
+ }
725
+ get status() {
726
+ return pb_1.Message.getFieldWithDefault(this, 12, dependency_1.testsystem.v1.common.TestStatus.UNKNOWN) as dependency_1.testsystem.v1.common.TestStatus;
727
+ }
728
+ set status(value: dependency_1.testsystem.v1.common.TestStatus) {
729
+ pb_1.Message.setField(this, 12, value);
730
+ }
731
+ get error() {
732
+ return pb_1.Message.getFieldWithDefault(this, 13, "") as string;
733
+ }
734
+ set error(value: string) {
735
+ pb_1.Message.setField(this, 13, value);
736
+ }
737
+ get errors() {
738
+ return pb_1.Message.getFieldWithDefault(this, 14, []) as string[];
739
+ }
740
+ set errors(value: string[]) {
741
+ pb_1.Message.setField(this, 14, value);
742
+ }
743
+ get location() {
744
+ return pb_1.Message.getFieldWithDefault(this, 15, "") as string;
745
+ }
746
+ set location(value: string) {
747
+ pb_1.Message.setField(this, 15, value);
748
+ }
749
+ static fromObject(data: {
750
+ id?: string;
751
+ run_id?: string;
752
+ test_case_run_id?: string;
753
+ title?: string;
754
+ description?: string;
755
+ start_time?: ReturnType<typeof dependency_2.google.protobuf.Timestamp.prototype.toObject>;
756
+ duration?: ReturnType<typeof dependency_3.google.protobuf.Duration.prototype.toObject>;
757
+ type?: string;
758
+ metadata?: {
759
+ [key: string]: string;
760
+ };
761
+ parent_step_id?: string;
762
+ worker_index?: string;
763
+ status?: dependency_1.testsystem.v1.common.TestStatus;
764
+ error?: string;
765
+ errors?: string[];
766
+ location?: string;
767
+ }): StepRun {
768
+ const message = new StepRun({});
769
+ if (data.id != null) {
770
+ message.id = data.id;
771
+ }
772
+ if (data.run_id != null) {
773
+ message.run_id = data.run_id;
774
+ }
775
+ if (data.test_case_run_id != null) {
776
+ message.test_case_run_id = data.test_case_run_id;
777
+ }
778
+ if (data.title != null) {
779
+ message.title = data.title;
780
+ }
781
+ if (data.description != null) {
782
+ message.description = data.description;
783
+ }
784
+ if (data.start_time != null) {
785
+ message.start_time = dependency_2.google.protobuf.Timestamp.fromObject(data.start_time);
786
+ }
787
+ if (data.duration != null) {
788
+ message.duration = dependency_3.google.protobuf.Duration.fromObject(data.duration);
789
+ }
790
+ if (data.type != null) {
791
+ message.type = data.type;
792
+ }
793
+ if (typeof data.metadata == "object") {
794
+ message.metadata = new Map(Object.entries(data.metadata));
795
+ }
796
+ if (data.parent_step_id != null) {
797
+ message.parent_step_id = data.parent_step_id;
798
+ }
799
+ if (data.worker_index != null) {
800
+ message.worker_index = data.worker_index;
801
+ }
802
+ if (data.status != null) {
803
+ message.status = data.status;
804
+ }
805
+ if (data.error != null) {
806
+ message.error = data.error;
807
+ }
808
+ if (data.errors != null) {
809
+ message.errors = data.errors;
810
+ }
811
+ if (data.location != null) {
812
+ message.location = data.location;
813
+ }
814
+ return message;
815
+ }
816
+ toObject() {
817
+ const data: {
818
+ id?: string;
819
+ run_id?: string;
820
+ test_case_run_id?: string;
821
+ title?: string;
822
+ description?: string;
823
+ start_time?: ReturnType<typeof dependency_2.google.protobuf.Timestamp.prototype.toObject>;
824
+ duration?: ReturnType<typeof dependency_3.google.protobuf.Duration.prototype.toObject>;
825
+ type?: string;
826
+ metadata?: {
827
+ [key: string]: string;
828
+ };
829
+ parent_step_id?: string;
830
+ worker_index?: string;
831
+ status?: dependency_1.testsystem.v1.common.TestStatus;
832
+ error?: string;
833
+ errors?: string[];
834
+ location?: string;
835
+ } = {};
836
+ if (this.id != null) {
837
+ data.id = this.id;
838
+ }
839
+ if (this.run_id != null) {
840
+ data.run_id = this.run_id;
841
+ }
842
+ if (this.test_case_run_id != null) {
843
+ data.test_case_run_id = this.test_case_run_id;
844
+ }
845
+ if (this.title != null) {
846
+ data.title = this.title;
847
+ }
848
+ if (this.description != null) {
849
+ data.description = this.description;
850
+ }
851
+ if (this.start_time != null) {
852
+ data.start_time = this.start_time.toObject();
853
+ }
854
+ if (this.duration != null) {
855
+ data.duration = this.duration.toObject();
856
+ }
857
+ if (this.type != null) {
858
+ data.type = this.type;
859
+ }
860
+ if (this.metadata != null) {
861
+ data.metadata = (Object.fromEntries)(this.metadata);
862
+ }
863
+ if (this.parent_step_id != null) {
864
+ data.parent_step_id = this.parent_step_id;
865
+ }
866
+ if (this.worker_index != null) {
867
+ data.worker_index = this.worker_index;
868
+ }
869
+ if (this.status != null) {
870
+ data.status = this.status;
871
+ }
872
+ if (this.error != null) {
873
+ data.error = this.error;
874
+ }
875
+ if (this.errors != null) {
876
+ data.errors = this.errors;
877
+ }
878
+ if (this.location != null) {
879
+ data.location = this.location;
880
+ }
881
+ return data;
882
+ }
883
+ serialize(): Uint8Array;
884
+ serialize(w: pb_1.BinaryWriter): void;
885
+ serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
886
+ const writer = w || new pb_1.BinaryWriter();
887
+ if (this.id.length)
888
+ writer.writeString(1, this.id);
889
+ if (this.run_id.length)
890
+ writer.writeString(2, this.run_id);
891
+ if (this.test_case_run_id.length)
892
+ writer.writeString(3, this.test_case_run_id);
893
+ if (this.title.length)
894
+ writer.writeString(4, this.title);
895
+ if (this.description.length)
896
+ writer.writeString(5, this.description);
897
+ if (this.has_start_time)
898
+ writer.writeMessage(6, this.start_time, () => this.start_time.serialize(writer));
899
+ if (this.has_duration)
900
+ writer.writeMessage(7, this.duration, () => this.duration.serialize(writer));
901
+ if (this.type.length)
902
+ writer.writeString(8, this.type);
903
+ for (const [key, value] of this.metadata) {
904
+ writer.writeMessage(9, this.metadata, () => {
905
+ writer.writeString(1, key);
906
+ writer.writeString(2, value);
907
+ });
908
+ }
909
+ if (this.parent_step_id.length)
910
+ writer.writeString(10, this.parent_step_id);
911
+ if (this.worker_index.length)
912
+ writer.writeString(11, this.worker_index);
913
+ if (this.status != dependency_1.testsystem.v1.common.TestStatus.UNKNOWN)
914
+ writer.writeEnum(12, this.status);
915
+ if (this.error.length)
916
+ writer.writeString(13, this.error);
917
+ if (this.errors.length)
918
+ writer.writeRepeatedString(14, this.errors);
919
+ if (this.location.length)
920
+ writer.writeString(15, this.location);
921
+ if (!w)
922
+ return writer.getResultBuffer();
923
+ }
924
+ static deserialize(bytes: Uint8Array | pb_1.BinaryReader): StepRun {
925
+ const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new StepRun();
926
+ while (reader.nextField()) {
927
+ if (reader.isEndGroup())
928
+ break;
929
+ switch (reader.getFieldNumber()) {
930
+ case 1:
931
+ message.id = reader.readString();
932
+ break;
933
+ case 2:
934
+ message.run_id = reader.readString();
935
+ break;
936
+ case 3:
937
+ message.test_case_run_id = reader.readString();
938
+ break;
939
+ case 4:
940
+ message.title = reader.readString();
941
+ break;
942
+ case 5:
943
+ message.description = reader.readString();
944
+ break;
945
+ case 6:
946
+ reader.readMessage(message.start_time, () => message.start_time = dependency_2.google.protobuf.Timestamp.deserialize(reader));
947
+ break;
948
+ case 7:
949
+ reader.readMessage(message.duration, () => message.duration = dependency_3.google.protobuf.Duration.deserialize(reader));
950
+ break;
951
+ case 8:
952
+ message.type = reader.readString();
953
+ break;
954
+ case 9:
955
+ reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.metadata as any, reader, reader.readString, reader.readString));
956
+ break;
957
+ case 10:
958
+ message.parent_step_id = reader.readString();
959
+ break;
960
+ case 11:
961
+ message.worker_index = reader.readString();
962
+ break;
963
+ case 12:
964
+ message.status = reader.readEnum();
965
+ break;
966
+ case 13:
967
+ message.error = reader.readString();
968
+ break;
969
+ case 14:
970
+ pb_1.Message.addToRepeatedField(message, 14, reader.readString());
971
+ break;
972
+ case 15:
973
+ message.location = reader.readString();
974
+ break;
975
+ default: reader.skipField();
976
+ }
977
+ }
978
+ return message;
979
+ }
980
+ serializeBinary(): Uint8Array {
981
+ return this.serialize();
982
+ }
983
+ static deserializeBinary(bytes: Uint8Array): StepRun {
984
+ return StepRun.deserialize(bytes);
985
+ }
986
+ }
987
+ }