@stanterprise/protobuf 0.0.9 → 0.0.11

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