Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Side by Side Diff: generated/googleapis_beta/lib/toolresults/v1beta3.dart

Issue 1797933002: Api-roll 33: 2016-03-14 (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Added resources/*/CHANGELOG.md, addresssed comments Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // This is a generated file (see the discoveryapis_generator project).
2
3 library googleapis_beta.toolresults.v1beta3;
4
5 import 'dart:core' as core;
6 import 'dart:async' as async;
7 import 'dart:convert' as convert;
8
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
10 import 'package:crypto/crypto.dart' as crypto;
11 import 'package:http/http.dart' as http;
12
13 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show
14 ApiRequestError, DetailedApiRequestError;
15
16 const core.String USER_AGENT = 'dart-api-client toolresults/v1beta3';
17
18 /** Read and publish results from Cloud Test Lab. */
19 class ToolresultsApi {
20 /** View and manage your data across Google Cloud Platform services */
21 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf orm";
22
23
24 final commons.ApiRequester _requester;
25
26 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester);
27
28 ToolresultsApi(http.Client client, {core.String rootUrl: "https://www.googleap is.com/", core.String servicePath: "toolresults/v1beta3/projects/"}) :
29 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT);
30 }
31
32
33 class ProjectsResourceApi {
34 final commons.ApiRequester _requester;
35
36 ProjectsHistoriesResourceApi get histories => new ProjectsHistoriesResourceApi (_requester);
37
38 ProjectsResourceApi(commons.ApiRequester client) :
39 _requester = client;
40
41 /**
42 * Gets the Tool Results settings for a project.
43 *
44 * May return any of the following canonical error codes:
45 *
46 * - PERMISSION_DENIED - if the user is not authorized to read from project
47 *
48 * Request parameters:
49 *
50 * [projectId] - A Project id.
51 *
52 * Required.
53 *
54 * Completes with a [ProjectSettings].
55 *
56 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
57 * error.
58 *
59 * If the used [http.Client] completes with an error when making a REST call,
60 * this method will complete with the same error.
61 */
62 async.Future<ProjectSettings> getSettings(core.String projectId) {
63 var _url = null;
64 var _queryParams = new core.Map();
65 var _uploadMedia = null;
66 var _uploadOptions = null;
67 var _downloadOptions = commons.DownloadOptions.Metadata;
68 var _body = null;
69
70 if (projectId == null) {
71 throw new core.ArgumentError("Parameter projectId is required.");
72 }
73
74 _url = commons.Escaper.ecapeVariable('$projectId') + '/settings';
75
76 var _response = _requester.request(_url,
77 "GET",
78 body: _body,
79 queryParams: _queryParams,
80 uploadOptions: _uploadOptions,
81 uploadMedia: _uploadMedia,
82 downloadOptions: _downloadOptions);
83 return _response.then((data) => new ProjectSettings.fromJson(data));
84 }
85
86 /**
87 * Creates resources for settings which have not yet been set.
88 *
89 * Currently, this creates a single resource: a Google Cloud Storage bucket,
90 * to be used as the default bucket for this project. The bucket is created in
91 * the name of the user calling. Except in rare cases, calling this method in
92 * parallel from multiple clients will only create a single bucket. In order
93 * to avoid unnecessary storage charges, the bucket is configured to
94 * automatically delete objects older than 90 days.
95 *
96 * The bucket is created with the project-private ACL: All project team
97 * members are given permissions to the bucket and objects created within it
98 * according to their roles. Project owners have owners rights, and so on. The
99 * default ACL on objects created in the bucket is project-private as well.
100 * See Google Cloud Storage documentation for more details.
101 *
102 * If there is already a default bucket set and the project can access the
103 * bucket, this call does nothing. However, if the project doesn't have the
104 * permission to access the bucket or the bucket is deteleted, a new bucket
105 * will be created.
106 *
107 * May return any canonical error codes, including the following:
108 *
109 * - PERMISSION_DENIED - if the user is not authorized to write to project -
110 * Any error code raised by Google Cloud Storage
111 *
112 * Request parameters:
113 *
114 * [projectId] - A Project id.
115 *
116 * Required.
117 *
118 * Completes with a [ProjectSettings].
119 *
120 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
121 * error.
122 *
123 * If the used [http.Client] completes with an error when making a REST call,
124 * this method will complete with the same error.
125 */
126 async.Future<ProjectSettings> initializeSettings(core.String projectId) {
127 var _url = null;
128 var _queryParams = new core.Map();
129 var _uploadMedia = null;
130 var _uploadOptions = null;
131 var _downloadOptions = commons.DownloadOptions.Metadata;
132 var _body = null;
133
134 if (projectId == null) {
135 throw new core.ArgumentError("Parameter projectId is required.");
136 }
137
138 _url = commons.Escaper.ecapeVariable('$projectId') + ':initializeSettings';
139
140 var _response = _requester.request(_url,
141 "POST",
142 body: _body,
143 queryParams: _queryParams,
144 uploadOptions: _uploadOptions,
145 uploadMedia: _uploadMedia,
146 downloadOptions: _downloadOptions);
147 return _response.then((data) => new ProjectSettings.fromJson(data));
148 }
149
150 }
151
152
153 class ProjectsHistoriesResourceApi {
154 final commons.ApiRequester _requester;
155
156 ProjectsHistoriesExecutionsResourceApi get executions => new ProjectsHistories ExecutionsResourceApi(_requester);
157
158 ProjectsHistoriesResourceApi(commons.ApiRequester client) :
159 _requester = client;
160
161 /**
162 * Creates a History.
163 *
164 * The returned History will have the id set.
165 *
166 * May return any of the following canonical error codes:
167 *
168 * - PERMISSION_DENIED - if the user is not authorized to write to project -
169 * INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the
170 * containing project does not exist
171 *
172 * [request] - The metadata request object.
173 *
174 * Request parameters:
175 *
176 * [projectId] - A Project id.
177 *
178 * Required.
179 *
180 * [requestId] - A unique request ID for server to detect duplicated requests.
181 * For example, a UUID.
182 *
183 * Optional, but strongly recommended.
184 *
185 * Completes with a [History].
186 *
187 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
188 * error.
189 *
190 * If the used [http.Client] completes with an error when making a REST call,
191 * this method will complete with the same error.
192 */
193 async.Future<History> create(History request, core.String projectId, {core.Str ing requestId}) {
194 var _url = null;
195 var _queryParams = new core.Map();
196 var _uploadMedia = null;
197 var _uploadOptions = null;
198 var _downloadOptions = commons.DownloadOptions.Metadata;
199 var _body = null;
200
201 if (request != null) {
202 _body = convert.JSON.encode((request).toJson());
203 }
204 if (projectId == null) {
205 throw new core.ArgumentError("Parameter projectId is required.");
206 }
207 if (requestId != null) {
208 _queryParams["requestId"] = [requestId];
209 }
210
211 _url = commons.Escaper.ecapeVariable('$projectId') + '/histories';
212
213 var _response = _requester.request(_url,
214 "POST",
215 body: _body,
216 queryParams: _queryParams,
217 uploadOptions: _uploadOptions,
218 uploadMedia: _uploadMedia,
219 downloadOptions: _downloadOptions);
220 return _response.then((data) => new History.fromJson(data));
221 }
222
223 /**
224 * Gets a History.
225 *
226 * May return any of the following canonical error codes:
227 *
228 * - PERMISSION_DENIED - if the user is not authorized to read project -
229 * INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the History
230 * does not exist
231 *
232 * Request parameters:
233 *
234 * [projectId] - A Project id.
235 *
236 * Required.
237 *
238 * [historyId] - A History id.
239 *
240 * Required.
241 *
242 * Completes with a [History].
243 *
244 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
245 * error.
246 *
247 * If the used [http.Client] completes with an error when making a REST call,
248 * this method will complete with the same error.
249 */
250 async.Future<History> get(core.String projectId, core.String historyId) {
251 var _url = null;
252 var _queryParams = new core.Map();
253 var _uploadMedia = null;
254 var _uploadOptions = null;
255 var _downloadOptions = commons.DownloadOptions.Metadata;
256 var _body = null;
257
258 if (projectId == null) {
259 throw new core.ArgumentError("Parameter projectId is required.");
260 }
261 if (historyId == null) {
262 throw new core.ArgumentError("Parameter historyId is required.");
263 }
264
265 _url = commons.Escaper.ecapeVariable('$projectId') + '/histories/' + commons .Escaper.ecapeVariable('$historyId');
266
267 var _response = _requester.request(_url,
268 "GET",
269 body: _body,
270 queryParams: _queryParams,
271 uploadOptions: _uploadOptions,
272 uploadMedia: _uploadMedia,
273 downloadOptions: _downloadOptions);
274 return _response.then((data) => new History.fromJson(data));
275 }
276
277 /**
278 * Lists Histories for a given Project.
279 *
280 * The histories are sorted by modification time in descending order. The
281 * history_id key will be used to order the history with the same modification
282 * time.
283 *
284 * May return any of the following canonical error codes:
285 *
286 * - PERMISSION_DENIED - if the user is not authorized to read project -
287 * INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the History
288 * does not exist
289 *
290 * Request parameters:
291 *
292 * [projectId] - A Project id.
293 *
294 * Required.
295 *
296 * [filterByName] - If set, only return histories with the given name.
297 *
298 * Optional.
299 *
300 * [pageSize] - The maximum number of Histories to fetch.
301 *
302 * Default value: 20. The server will use this default if the field is not set
303 * or has a value of 0. Any value greater than 100 will be treated as 100.
304 *
305 * Optional.
306 *
307 * [pageToken] - A continuation token to resume the query at the next item.
308 *
309 * Optional.
310 *
311 * Completes with a [ListHistoriesResponse].
312 *
313 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
314 * error.
315 *
316 * If the used [http.Client] completes with an error when making a REST call,
317 * this method will complete with the same error.
318 */
319 async.Future<ListHistoriesResponse> list(core.String projectId, {core.String f ilterByName, core.int pageSize, core.String pageToken}) {
320 var _url = null;
321 var _queryParams = new core.Map();
322 var _uploadMedia = null;
323 var _uploadOptions = null;
324 var _downloadOptions = commons.DownloadOptions.Metadata;
325 var _body = null;
326
327 if (projectId == null) {
328 throw new core.ArgumentError("Parameter projectId is required.");
329 }
330 if (filterByName != null) {
331 _queryParams["filterByName"] = [filterByName];
332 }
333 if (pageSize != null) {
334 _queryParams["pageSize"] = ["${pageSize}"];
335 }
336 if (pageToken != null) {
337 _queryParams["pageToken"] = [pageToken];
338 }
339
340 _url = commons.Escaper.ecapeVariable('$projectId') + '/histories';
341
342 var _response = _requester.request(_url,
343 "GET",
344 body: _body,
345 queryParams: _queryParams,
346 uploadOptions: _uploadOptions,
347 uploadMedia: _uploadMedia,
348 downloadOptions: _downloadOptions);
349 return _response.then((data) => new ListHistoriesResponse.fromJson(data));
350 }
351
352 }
353
354
355 class ProjectsHistoriesExecutionsResourceApi {
356 final commons.ApiRequester _requester;
357
358 ProjectsHistoriesExecutionsStepsResourceApi get steps => new ProjectsHistories ExecutionsStepsResourceApi(_requester);
359
360 ProjectsHistoriesExecutionsResourceApi(commons.ApiRequester client) :
361 _requester = client;
362
363 /**
364 * Creates an Execution.
365 *
366 * The returned Execution will have the id set.
367 *
368 * May return any of the following canonical error codes:
369 *
370 * - PERMISSION_DENIED - if the user is not authorized to write to project -
371 * INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the
372 * containing History does not exist
373 *
374 * [request] - The metadata request object.
375 *
376 * Request parameters:
377 *
378 * [projectId] - A Project id.
379 *
380 * Required.
381 *
382 * [historyId] - A History id.
383 *
384 * Required.
385 *
386 * [requestId] - A unique request ID for server to detect duplicated requests.
387 * For example, a UUID.
388 *
389 * Optional, but strongly recommended.
390 *
391 * Completes with a [Execution].
392 *
393 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
394 * error.
395 *
396 * If the used [http.Client] completes with an error when making a REST call,
397 * this method will complete with the same error.
398 */
399 async.Future<Execution> create(Execution request, core.String projectId, core. String historyId, {core.String requestId}) {
400 var _url = null;
401 var _queryParams = new core.Map();
402 var _uploadMedia = null;
403 var _uploadOptions = null;
404 var _downloadOptions = commons.DownloadOptions.Metadata;
405 var _body = null;
406
407 if (request != null) {
408 _body = convert.JSON.encode((request).toJson());
409 }
410 if (projectId == null) {
411 throw new core.ArgumentError("Parameter projectId is required.");
412 }
413 if (historyId == null) {
414 throw new core.ArgumentError("Parameter historyId is required.");
415 }
416 if (requestId != null) {
417 _queryParams["requestId"] = [requestId];
418 }
419
420 _url = commons.Escaper.ecapeVariable('$projectId') + '/histories/' + commons .Escaper.ecapeVariable('$historyId') + '/executions';
421
422 var _response = _requester.request(_url,
423 "POST",
424 body: _body,
425 queryParams: _queryParams,
426 uploadOptions: _uploadOptions,
427 uploadMedia: _uploadMedia,
428 downloadOptions: _downloadOptions);
429 return _response.then((data) => new Execution.fromJson(data));
430 }
431
432 /**
433 * Gets an Execution.
434 *
435 * May return any of the following canonical error codes:
436 *
437 * - PERMISSION_DENIED - if the user is not authorized to write to project -
438 * INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the
439 * Execution does not exist
440 *
441 * Request parameters:
442 *
443 * [projectId] - A Project id.
444 *
445 * Required.
446 *
447 * [historyId] - A History id.
448 *
449 * Required.
450 *
451 * [executionId] - An Execution id.
452 *
453 * Required.
454 *
455 * Completes with a [Execution].
456 *
457 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
458 * error.
459 *
460 * If the used [http.Client] completes with an error when making a REST call,
461 * this method will complete with the same error.
462 */
463 async.Future<Execution> get(core.String projectId, core.String historyId, core .String executionId) {
464 var _url = null;
465 var _queryParams = new core.Map();
466 var _uploadMedia = null;
467 var _uploadOptions = null;
468 var _downloadOptions = commons.DownloadOptions.Metadata;
469 var _body = null;
470
471 if (projectId == null) {
472 throw new core.ArgumentError("Parameter projectId is required.");
473 }
474 if (historyId == null) {
475 throw new core.ArgumentError("Parameter historyId is required.");
476 }
477 if (executionId == null) {
478 throw new core.ArgumentError("Parameter executionId is required.");
479 }
480
481 _url = commons.Escaper.ecapeVariable('$projectId') + '/histories/' + commons .Escaper.ecapeVariable('$historyId') + '/executions/' + commons.Escaper.ecapeVar iable('$executionId');
482
483 var _response = _requester.request(_url,
484 "GET",
485 body: _body,
486 queryParams: _queryParams,
487 uploadOptions: _uploadOptions,
488 uploadMedia: _uploadMedia,
489 downloadOptions: _downloadOptions);
490 return _response.then((data) => new Execution.fromJson(data));
491 }
492
493 /**
494 * Lists Histories for a given Project.
495 *
496 * The executions are sorted by creation_time in descending order. The
497 * execution_id key will be used to order the executions with the same
498 * creation_time.
499 *
500 * May return any of the following canonical error codes:
501 *
502 * - PERMISSION_DENIED - if the user is not authorized to read project -
503 * INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the
504 * containing History does not exist
505 *
506 * Request parameters:
507 *
508 * [projectId] - A Project id.
509 *
510 * Required.
511 *
512 * [historyId] - A History id.
513 *
514 * Required.
515 *
516 * [pageSize] - The maximum number of Executions to fetch.
517 *
518 * Default value: 25. The server will use this default if the field is not set
519 * or has a value of 0.
520 *
521 * Optional.
522 *
523 * [pageToken] - A continuation token to resume the query at the next item.
524 *
525 * Optional.
526 *
527 * Completes with a [ListExecutionsResponse].
528 *
529 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
530 * error.
531 *
532 * If the used [http.Client] completes with an error when making a REST call,
533 * this method will complete with the same error.
534 */
535 async.Future<ListExecutionsResponse> list(core.String projectId, core.String h istoryId, {core.int pageSize, core.String pageToken}) {
536 var _url = null;
537 var _queryParams = new core.Map();
538 var _uploadMedia = null;
539 var _uploadOptions = null;
540 var _downloadOptions = commons.DownloadOptions.Metadata;
541 var _body = null;
542
543 if (projectId == null) {
544 throw new core.ArgumentError("Parameter projectId is required.");
545 }
546 if (historyId == null) {
547 throw new core.ArgumentError("Parameter historyId is required.");
548 }
549 if (pageSize != null) {
550 _queryParams["pageSize"] = ["${pageSize}"];
551 }
552 if (pageToken != null) {
553 _queryParams["pageToken"] = [pageToken];
554 }
555
556 _url = commons.Escaper.ecapeVariable('$projectId') + '/histories/' + commons .Escaper.ecapeVariable('$historyId') + '/executions';
557
558 var _response = _requester.request(_url,
559 "GET",
560 body: _body,
561 queryParams: _queryParams,
562 uploadOptions: _uploadOptions,
563 uploadMedia: _uploadMedia,
564 downloadOptions: _downloadOptions);
565 return _response.then((data) => new ListExecutionsResponse.fromJson(data));
566 }
567
568 /**
569 * Updates an existing Execution with the supplied partial entity.
570 *
571 * May return any of the following canonical error codes:
572 *
573 * - PERMISSION_DENIED - if the user is not authorized to write to project -
574 * INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if
575 * the requested state transition is illegal - NOT_FOUND - if the containing
576 * History does not exist
577 *
578 * [request] - The metadata request object.
579 *
580 * Request parameters:
581 *
582 * [projectId] - A Project id. Required.
583 *
584 * [historyId] - Required.
585 *
586 * [executionId] - Required.
587 *
588 * [requestId] - A unique request ID for server to detect duplicated requests.
589 * For example, a UUID.
590 *
591 * Optional, but strongly recommended.
592 *
593 * Completes with a [Execution].
594 *
595 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
596 * error.
597 *
598 * If the used [http.Client] completes with an error when making a REST call,
599 * this method will complete with the same error.
600 */
601 async.Future<Execution> patch(Execution request, core.String projectId, core.S tring historyId, core.String executionId, {core.String requestId}) {
602 var _url = null;
603 var _queryParams = new core.Map();
604 var _uploadMedia = null;
605 var _uploadOptions = null;
606 var _downloadOptions = commons.DownloadOptions.Metadata;
607 var _body = null;
608
609 if (request != null) {
610 _body = convert.JSON.encode((request).toJson());
611 }
612 if (projectId == null) {
613 throw new core.ArgumentError("Parameter projectId is required.");
614 }
615 if (historyId == null) {
616 throw new core.ArgumentError("Parameter historyId is required.");
617 }
618 if (executionId == null) {
619 throw new core.ArgumentError("Parameter executionId is required.");
620 }
621 if (requestId != null) {
622 _queryParams["requestId"] = [requestId];
623 }
624
625 _url = commons.Escaper.ecapeVariable('$projectId') + '/histories/' + commons .Escaper.ecapeVariable('$historyId') + '/executions/' + commons.Escaper.ecapeVar iable('$executionId');
626
627 var _response = _requester.request(_url,
628 "PATCH",
629 body: _body,
630 queryParams: _queryParams,
631 uploadOptions: _uploadOptions,
632 uploadMedia: _uploadMedia,
633 downloadOptions: _downloadOptions);
634 return _response.then((data) => new Execution.fromJson(data));
635 }
636
637 }
638
639
640 class ProjectsHistoriesExecutionsStepsResourceApi {
641 final commons.ApiRequester _requester;
642
643 ProjectsHistoriesExecutionsStepsThumbnailsResourceApi get thumbnails => new Pr ojectsHistoriesExecutionsStepsThumbnailsResourceApi(_requester);
644
645 ProjectsHistoriesExecutionsStepsResourceApi(commons.ApiRequester client) :
646 _requester = client;
647
648 /**
649 * Creates a Step.
650 *
651 * The returned Step will have the id set.
652 *
653 * May return any of the following canonical error codes:
654 *
655 * - PERMISSION_DENIED - if the user is not authorized to write to project -
656 * INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if
657 * the step is too large (more than 10Mib) - NOT_FOUND - if the containing
658 * Execution does not exist
659 *
660 * [request] - The metadata request object.
661 *
662 * Request parameters:
663 *
664 * [projectId] - A Project id.
665 *
666 * Required.
667 *
668 * [historyId] - A History id.
669 *
670 * Required.
671 *
672 * [executionId] - A Execution id.
673 *
674 * Required.
675 *
676 * [requestId] - A unique request ID for server to detect duplicated requests.
677 * For example, a UUID.
678 *
679 * Optional, but strongly recommended.
680 *
681 * Completes with a [Step].
682 *
683 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
684 * error.
685 *
686 * If the used [http.Client] completes with an error when making a REST call,
687 * this method will complete with the same error.
688 */
689 async.Future<Step> create(Step request, core.String projectId, core.String his toryId, core.String executionId, {core.String requestId}) {
690 var _url = null;
691 var _queryParams = new core.Map();
692 var _uploadMedia = null;
693 var _uploadOptions = null;
694 var _downloadOptions = commons.DownloadOptions.Metadata;
695 var _body = null;
696
697 if (request != null) {
698 _body = convert.JSON.encode((request).toJson());
699 }
700 if (projectId == null) {
701 throw new core.ArgumentError("Parameter projectId is required.");
702 }
703 if (historyId == null) {
704 throw new core.ArgumentError("Parameter historyId is required.");
705 }
706 if (executionId == null) {
707 throw new core.ArgumentError("Parameter executionId is required.");
708 }
709 if (requestId != null) {
710 _queryParams["requestId"] = [requestId];
711 }
712
713 _url = commons.Escaper.ecapeVariable('$projectId') + '/histories/' + commons .Escaper.ecapeVariable('$historyId') + '/executions/' + commons.Escaper.ecapeVar iable('$executionId') + '/steps';
714
715 var _response = _requester.request(_url,
716 "POST",
717 body: _body,
718 queryParams: _queryParams,
719 uploadOptions: _uploadOptions,
720 uploadMedia: _uploadMedia,
721 downloadOptions: _downloadOptions);
722 return _response.then((data) => new Step.fromJson(data));
723 }
724
725 /**
726 * Gets a Step.
727 *
728 * May return any of the following canonical error codes:
729 *
730 * - PERMISSION_DENIED - if the user is not authorized to read project -
731 * INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the Step
732 * does not exist
733 *
734 * Request parameters:
735 *
736 * [projectId] - A Project id.
737 *
738 * Required.
739 *
740 * [historyId] - A History id.
741 *
742 * Required.
743 *
744 * [executionId] - A Execution id.
745 *
746 * Required.
747 *
748 * [stepId] - A Step id.
749 *
750 * Required.
751 *
752 * Completes with a [Step].
753 *
754 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
755 * error.
756 *
757 * If the used [http.Client] completes with an error when making a REST call,
758 * this method will complete with the same error.
759 */
760 async.Future<Step> get(core.String projectId, core.String historyId, core.Stri ng executionId, core.String stepId) {
761 var _url = null;
762 var _queryParams = new core.Map();
763 var _uploadMedia = null;
764 var _uploadOptions = null;
765 var _downloadOptions = commons.DownloadOptions.Metadata;
766 var _body = null;
767
768 if (projectId == null) {
769 throw new core.ArgumentError("Parameter projectId is required.");
770 }
771 if (historyId == null) {
772 throw new core.ArgumentError("Parameter historyId is required.");
773 }
774 if (executionId == null) {
775 throw new core.ArgumentError("Parameter executionId is required.");
776 }
777 if (stepId == null) {
778 throw new core.ArgumentError("Parameter stepId is required.");
779 }
780
781 _url = commons.Escaper.ecapeVariable('$projectId') + '/histories/' + commons .Escaper.ecapeVariable('$historyId') + '/executions/' + commons.Escaper.ecapeVar iable('$executionId') + '/steps/' + commons.Escaper.ecapeVariable('$stepId');
782
783 var _response = _requester.request(_url,
784 "GET",
785 body: _body,
786 queryParams: _queryParams,
787 uploadOptions: _uploadOptions,
788 uploadMedia: _uploadMedia,
789 downloadOptions: _downloadOptions);
790 return _response.then((data) => new Step.fromJson(data));
791 }
792
793 /**
794 * Lists Steps for a given Execution.
795 *
796 * The steps are sorted by creation_time in descending order. The step_id key
797 * will be used to order the steps with the same creation_time.
798 *
799 * May return any of the following canonical error codes:
800 *
801 * - PERMISSION_DENIED - if the user is not authorized to read project -
802 * INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if
803 * an argument in the request happens to be invalid; e.g. if an attempt is
804 * made to list the children of a nonexistent Step - NOT_FOUND - if the
805 * containing Execution does not exist
806 *
807 * Request parameters:
808 *
809 * [projectId] - A Project id.
810 *
811 * Required.
812 *
813 * [historyId] - A History id.
814 *
815 * Required.
816 *
817 * [executionId] - A Execution id.
818 *
819 * Required.
820 *
821 * [pageSize] - The maximum number of Steps to fetch.
822 *
823 * Default value: 25. The server will use this default if the field is not set
824 * or has a value of 0.
825 *
826 * Optional.
827 *
828 * [pageToken] - A continuation token to resume the query at the next item.
829 *
830 * Optional.
831 *
832 * Completes with a [ListStepsResponse].
833 *
834 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
835 * error.
836 *
837 * If the used [http.Client] completes with an error when making a REST call,
838 * this method will complete with the same error.
839 */
840 async.Future<ListStepsResponse> list(core.String projectId, core.String histor yId, core.String executionId, {core.int pageSize, core.String pageToken}) {
841 var _url = null;
842 var _queryParams = new core.Map();
843 var _uploadMedia = null;
844 var _uploadOptions = null;
845 var _downloadOptions = commons.DownloadOptions.Metadata;
846 var _body = null;
847
848 if (projectId == null) {
849 throw new core.ArgumentError("Parameter projectId is required.");
850 }
851 if (historyId == null) {
852 throw new core.ArgumentError("Parameter historyId is required.");
853 }
854 if (executionId == null) {
855 throw new core.ArgumentError("Parameter executionId is required.");
856 }
857 if (pageSize != null) {
858 _queryParams["pageSize"] = ["${pageSize}"];
859 }
860 if (pageToken != null) {
861 _queryParams["pageToken"] = [pageToken];
862 }
863
864 _url = commons.Escaper.ecapeVariable('$projectId') + '/histories/' + commons .Escaper.ecapeVariable('$historyId') + '/executions/' + commons.Escaper.ecapeVar iable('$executionId') + '/steps';
865
866 var _response = _requester.request(_url,
867 "GET",
868 body: _body,
869 queryParams: _queryParams,
870 uploadOptions: _uploadOptions,
871 uploadMedia: _uploadMedia,
872 downloadOptions: _downloadOptions);
873 return _response.then((data) => new ListStepsResponse.fromJson(data));
874 }
875
876 /**
877 * Updates an existing Step with the supplied partial entity.
878 *
879 * May return any of the following canonical error codes:
880 *
881 * - PERMISSION_DENIED - if the user is not authorized to write project -
882 * INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if
883 * the requested state transition is illegal (e.g try to upload a duplicate
884 * xml file), if the updated step is too large (more than 10Mib) - NOT_FOUND -
885 * if the containing Execution does not exist
886 *
887 * [request] - The metadata request object.
888 *
889 * Request parameters:
890 *
891 * [projectId] - A Project id.
892 *
893 * Required.
894 *
895 * [historyId] - A History id.
896 *
897 * Required.
898 *
899 * [executionId] - A Execution id.
900 *
901 * Required.
902 *
903 * [stepId] - A Step id.
904 *
905 * Required.
906 *
907 * [requestId] - A unique request ID for server to detect duplicated requests.
908 * For example, a UUID.
909 *
910 * Optional, but strongly recommended.
911 *
912 * Completes with a [Step].
913 *
914 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
915 * error.
916 *
917 * If the used [http.Client] completes with an error when making a REST call,
918 * this method will complete with the same error.
919 */
920 async.Future<Step> patch(Step request, core.String projectId, core.String hist oryId, core.String executionId, core.String stepId, {core.String requestId}) {
921 var _url = null;
922 var _queryParams = new core.Map();
923 var _uploadMedia = null;
924 var _uploadOptions = null;
925 var _downloadOptions = commons.DownloadOptions.Metadata;
926 var _body = null;
927
928 if (request != null) {
929 _body = convert.JSON.encode((request).toJson());
930 }
931 if (projectId == null) {
932 throw new core.ArgumentError("Parameter projectId is required.");
933 }
934 if (historyId == null) {
935 throw new core.ArgumentError("Parameter historyId is required.");
936 }
937 if (executionId == null) {
938 throw new core.ArgumentError("Parameter executionId is required.");
939 }
940 if (stepId == null) {
941 throw new core.ArgumentError("Parameter stepId is required.");
942 }
943 if (requestId != null) {
944 _queryParams["requestId"] = [requestId];
945 }
946
947 _url = commons.Escaper.ecapeVariable('$projectId') + '/histories/' + commons .Escaper.ecapeVariable('$historyId') + '/executions/' + commons.Escaper.ecapeVar iable('$executionId') + '/steps/' + commons.Escaper.ecapeVariable('$stepId');
948
949 var _response = _requester.request(_url,
950 "PATCH",
951 body: _body,
952 queryParams: _queryParams,
953 uploadOptions: _uploadOptions,
954 uploadMedia: _uploadMedia,
955 downloadOptions: _downloadOptions);
956 return _response.then((data) => new Step.fromJson(data));
957 }
958
959 /**
960 * Publish xml files to an existing Step.
961 *
962 * May return any of the following canonical error codes:
963 *
964 * - PERMISSION_DENIED - if the user is not authorized to write project -
965 * INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if
966 * the requested state transition is illegal, e.g try to upload a duplicate
967 * xml file or a file too large. - NOT_FOUND - if the containing Execution
968 * does not exist
969 *
970 * [request] - The metadata request object.
971 *
972 * Request parameters:
973 *
974 * [projectId] - A Project id.
975 *
976 * Required.
977 *
978 * [historyId] - A History id.
979 *
980 * Required.
981 *
982 * [executionId] - A Execution id.
983 *
984 * Required.
985 *
986 * [stepId] - A Step id. Note: This step must include a TestExecutionStep.
987 *
988 * Required.
989 *
990 * Completes with a [Step].
991 *
992 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
993 * error.
994 *
995 * If the used [http.Client] completes with an error when making a REST call,
996 * this method will complete with the same error.
997 */
998 async.Future<Step> publishXunitXmlFiles(PublishXunitXmlFilesRequest request, c ore.String projectId, core.String historyId, core.String executionId, core.Strin g stepId) {
999 var _url = null;
1000 var _queryParams = new core.Map();
1001 var _uploadMedia = null;
1002 var _uploadOptions = null;
1003 var _downloadOptions = commons.DownloadOptions.Metadata;
1004 var _body = null;
1005
1006 if (request != null) {
1007 _body = convert.JSON.encode((request).toJson());
1008 }
1009 if (projectId == null) {
1010 throw new core.ArgumentError("Parameter projectId is required.");
1011 }
1012 if (historyId == null) {
1013 throw new core.ArgumentError("Parameter historyId is required.");
1014 }
1015 if (executionId == null) {
1016 throw new core.ArgumentError("Parameter executionId is required.");
1017 }
1018 if (stepId == null) {
1019 throw new core.ArgumentError("Parameter stepId is required.");
1020 }
1021
1022 _url = commons.Escaper.ecapeVariable('$projectId') + '/histories/' + commons .Escaper.ecapeVariable('$historyId') + '/executions/' + commons.Escaper.ecapeVar iable('$executionId') + '/steps/' + commons.Escaper.ecapeVariable('$stepId') + ' :publishXunitXmlFiles';
1023
1024 var _response = _requester.request(_url,
1025 "POST",
1026 body: _body,
1027 queryParams: _queryParams,
1028 uploadOptions: _uploadOptions,
1029 uploadMedia: _uploadMedia,
1030 downloadOptions: _downloadOptions);
1031 return _response.then((data) => new Step.fromJson(data));
1032 }
1033
1034 }
1035
1036
1037 class ProjectsHistoriesExecutionsStepsThumbnailsResourceApi {
1038 final commons.ApiRequester _requester;
1039
1040 ProjectsHistoriesExecutionsStepsThumbnailsResourceApi(commons.ApiRequester cli ent) :
1041 _requester = client;
1042
1043 /**
1044 * Lists thumbnails of images attached to a step.
1045 *
1046 * May return any of the following canonical error codes: - PERMISSION_DENIED
1047 * - if the user is not authorized to read from the project, or from any of
1048 * the images - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND -
1049 * if the step does not exist, or if any of the images do not exist
1050 *
1051 * Request parameters:
1052 *
1053 * [projectId] - A Project id.
1054 *
1055 * Required.
1056 *
1057 * [historyId] - A History id.
1058 *
1059 * Required.
1060 *
1061 * [executionId] - An Execution id.
1062 *
1063 * Required.
1064 *
1065 * [stepId] - A Step id.
1066 *
1067 * Required.
1068 *
1069 * [pageSize] - The maximum number of thumbnails to fetch.
1070 *
1071 * Default value: 50. The server will use this default if the field is not set
1072 * or has a value of 0.
1073 *
1074 * Optional.
1075 *
1076 * [pageToken] - A continuation token to resume the query at the next item.
1077 *
1078 * Optional.
1079 *
1080 * Completes with a [ListStepThumbnailsResponse].
1081 *
1082 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
1083 * error.
1084 *
1085 * If the used [http.Client] completes with an error when making a REST call,
1086 * this method will complete with the same error.
1087 */
1088 async.Future<ListStepThumbnailsResponse> list(core.String projectId, core.Stri ng historyId, core.String executionId, core.String stepId, {core.int pageSize, c ore.String pageToken}) {
1089 var _url = null;
1090 var _queryParams = new core.Map();
1091 var _uploadMedia = null;
1092 var _uploadOptions = null;
1093 var _downloadOptions = commons.DownloadOptions.Metadata;
1094 var _body = null;
1095
1096 if (projectId == null) {
1097 throw new core.ArgumentError("Parameter projectId is required.");
1098 }
1099 if (historyId == null) {
1100 throw new core.ArgumentError("Parameter historyId is required.");
1101 }
1102 if (executionId == null) {
1103 throw new core.ArgumentError("Parameter executionId is required.");
1104 }
1105 if (stepId == null) {
1106 throw new core.ArgumentError("Parameter stepId is required.");
1107 }
1108 if (pageSize != null) {
1109 _queryParams["pageSize"] = ["${pageSize}"];
1110 }
1111 if (pageToken != null) {
1112 _queryParams["pageToken"] = [pageToken];
1113 }
1114
1115 _url = commons.Escaper.ecapeVariable('$projectId') + '/histories/' + commons .Escaper.ecapeVariable('$historyId') + '/executions/' + commons.Escaper.ecapeVar iable('$executionId') + '/steps/' + commons.Escaper.ecapeVariable('$stepId') + ' /thumbnails';
1116
1117 var _response = _requester.request(_url,
1118 "GET",
1119 body: _body,
1120 queryParams: _queryParams,
1121 uploadOptions: _uploadOptions,
1122 uploadMedia: _uploadMedia,
1123 downloadOptions: _downloadOptions);
1124 return _response.then((data) => new ListStepThumbnailsResponse.fromJson(data ));
1125 }
1126
1127 }
1128
1129
1130
1131 /**
1132 * `Any` contains an arbitrary serialized message along with a URL that
1133 * describes the type of the serialized message.
1134 *
1135 * Protobuf library provides support to pack/unpack Any values in the form of
1136 * utility functions or additional generated methods of the Any type.
1137 *
1138 * Example 1: Pack and unpack a message in C++.
1139 *
1140 * Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ...
1141 * }
1142 *
1143 * Example 2: Pack and unpack a message in Java.
1144 *
1145 * Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo =
1146 * any.unpack(Foo.class); }
1147 *
1148 * The pack methods provided by protobuf library will by default use
1149 * 'type.googleapis.com/full.type.name' as the type URL and the unpack methods
1150 * only use the fully qualified type name after the last '/' in the type URL,
1151 * for example "foo.bar.com/x/y.z" will yield type name "y.z".
1152 *
1153 *
1154 *
1155 * JSON ==== The JSON representation of an `Any` value uses the regular
1156 * representation of the deserialized, embedded message, with an additional
1157 * field `@type` which contains the type URL. Example:
1158 *
1159 * package google.profile; message Person { string first_name = 1; string
1160 * last_name = 2; }
1161 *
1162 * { "@type": "type.googleapis.com/google.profile.Person", "firstName": ,
1163 * "lastName": }
1164 *
1165 * If the embedded message type is well-known and has a custom JSON
1166 * representation, that representation will be embedded adding a field `value`
1167 * which holds the custom JSON in addition to the `@type` field. Example (for
1168 * message [google.protobuf.Duration][]):
1169 *
1170 * { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s"
1171 * }
1172 */
1173 class Any {
1174 /**
1175 * A URL/resource name whose content describes the type of the serialized
1176 * message.
1177 *
1178 * For URLs which use the schema `http`, `https`, or no schema, the following
1179 * restrictions and interpretations apply:
1180 *
1181 * * If no schema is provided, `https` is assumed. * The last segment of the
1182 * URL's path must represent the fully qualified name of the type (as in
1183 * `path/google.protobuf.Duration`). * An HTTP GET on the URL must yield a
1184 * [google.protobuf.Type][] value in binary format, or produce an error. *
1185 * Applications are allowed to cache lookup results based on the URL, or have
1186 * them precompiled into a binary to avoid any lookup. Therefore, binary
1187 * compatibility needs to be preserved on changes to types. (Use versioned
1188 * type names to manage breaking changes.)
1189 *
1190 * Schemas other than `http`, `https` (or the empty schema) might be used with
1191 * implementation specific semantics.
1192 */
1193 core.String typeUrl;
1194 /** Must be valid serialized data of the above specified type. */
1195 core.String value;
1196 core.List<core.int> get valueAsBytes {
1197 return crypto.CryptoUtils.base64StringToBytes(value);
1198 }
1199
1200 void set valueAsBytes(core.List<core.int> _bytes) {
1201 value = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true);
1202 }
1203
1204 Any();
1205
1206 Any.fromJson(core.Map _json) {
1207 if (_json.containsKey("typeUrl")) {
1208 typeUrl = _json["typeUrl"];
1209 }
1210 if (_json.containsKey("value")) {
1211 value = _json["value"];
1212 }
1213 }
1214
1215 core.Map toJson() {
1216 var _json = new core.Map();
1217 if (typeUrl != null) {
1218 _json["typeUrl"] = typeUrl;
1219 }
1220 if (value != null) {
1221 _json["value"] = value;
1222 }
1223 return _json;
1224 }
1225 }
1226
1227 /**
1228 * A Duration represents a signed, fixed-length span of time represented as a
1229 * count of seconds and fractions of seconds at nanosecond resolution. It is
1230 * independent of any calendar and concepts like "day" or "month". It is related
1231 * to Timestamp in that the difference between two Timestamp values is a
1232 * Duration and it can be added or subtracted from a Timestamp. Range is
1233 * approximately +-10,000 years.
1234 *
1235 * Example 1: Compute Duration from two Timestamps in pseudo code.
1236 *
1237 * Timestamp start = ...; Timestamp end = ...; Duration duration = ...;
1238 *
1239 * duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos -
1240 * start.nanos;
1241 *
1242 * if (duration.seconds 0) { duration.seconds += 1; duration.nanos -=
1243 * 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) {
1244 * duration.seconds -= 1; duration.nanos += 1000000000; }
1245 *
1246 * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
1247 *
1248 * Timestamp start = ...; Duration duration = ...; Timestamp end = ...;
1249 *
1250 * end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos +
1251 * duration.nanos;
1252 *
1253 * if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; }
1254 */
1255 class Duration {
1256 /**
1257 * Signed fractions of a second at nanosecond resolution of the span of time.
1258 * Durations less than one second are represented with a 0 `seconds` field and
1259 * a positive or negative `nanos` field. For durations of one second or more,
1260 * a non-zero value for the `nanos` field must be of the same sign as the
1261 * `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive.
1262 */
1263 core.int nanos;
1264 /**
1265 * Signed seconds of the span of time. Must be from -315,576,000,000 to
1266 * +315,576,000,000 inclusive.
1267 */
1268 core.String seconds;
1269
1270 Duration();
1271
1272 Duration.fromJson(core.Map _json) {
1273 if (_json.containsKey("nanos")) {
1274 nanos = _json["nanos"];
1275 }
1276 if (_json.containsKey("seconds")) {
1277 seconds = _json["seconds"];
1278 }
1279 }
1280
1281 core.Map toJson() {
1282 var _json = new core.Map();
1283 if (nanos != null) {
1284 _json["nanos"] = nanos;
1285 }
1286 if (seconds != null) {
1287 _json["seconds"] = seconds;
1288 }
1289 return _json;
1290 }
1291 }
1292
1293 /**
1294 * An Execution represents a collection of Steps. For instance, it could
1295 * represent: - a mobile test executed across a range of device configurations -
1296 * a jenkins job with a build step followed by a test step
1297 *
1298 * The maximum size of an execution message is 1 MiB.
1299 *
1300 * An Execution can be updated until its state is set to COMPLETE at which point
1301 * it becomes immutable. Next tag: 12
1302 */
1303 class Execution {
1304 /**
1305 * The time when the Execution status transitioned to COMPLETE.
1306 *
1307 * This value will be set automatically when state transitions to COMPLETE.
1308 *
1309 * - In response: set if the execution state is COMPLETE. - In create/update
1310 * request: never set
1311 */
1312 Timestamp completionTime;
1313 /**
1314 * The time when the Execution was created.
1315 *
1316 * This value will be set automatically when CreateExecution is called.
1317 *
1318 * - In response: always set - In create/update request: never set
1319 */
1320 Timestamp creationTime;
1321 /**
1322 * A unique identifier within a History for this Execution.
1323 *
1324 * Returns INVALID_ARGUMENT if this field is set or overwritten by the caller.
1325 *
1326 * - In response always set - In create/update request: never set
1327 */
1328 core.String executionId;
1329 /**
1330 * Classify the result, for example into SUCCESS or FAILURE
1331 *
1332 * - In response: present if set by create/update request - In create/update
1333 * request: optional
1334 */
1335 Outcome outcome;
1336 /**
1337 * The initial state is IN_PROGRESS.
1338 *
1339 * The only legal state transitions is from IN_PROGRESS to COMPLETE.
1340 *
1341 * A PRECONDITION_FAILED will be returned if an invalid transition is
1342 * requested.
1343 *
1344 * The state can only be set to COMPLETE once. A FAILED_PRECONDITION will be
1345 * returned if the state is set to COMPLETE multiple times.
1346 *
1347 * If the state is set to COMPLETE, all the in-progress steps within the
1348 * execution will be set as COMPLETE. If the outcome of the step is not set,
1349 * the outcome will be set to INCONCLUSIVE.
1350 *
1351 * - In response always set - In create/update request: optional
1352 * Possible string values are:
1353 * - "complete"
1354 * - "inProgress"
1355 * - "pending"
1356 * - "unknownState"
1357 */
1358 core.String state;
1359 /**
1360 * TestExecution Matrix ID that the Test Service uses.
1361 *
1362 * - In response: present if set by create - In create: optional - In update:
1363 * never set
1364 */
1365 core.String testExecutionMatrixId;
1366
1367 Execution();
1368
1369 Execution.fromJson(core.Map _json) {
1370 if (_json.containsKey("completionTime")) {
1371 completionTime = new Timestamp.fromJson(_json["completionTime"]);
1372 }
1373 if (_json.containsKey("creationTime")) {
1374 creationTime = new Timestamp.fromJson(_json["creationTime"]);
1375 }
1376 if (_json.containsKey("executionId")) {
1377 executionId = _json["executionId"];
1378 }
1379 if (_json.containsKey("outcome")) {
1380 outcome = new Outcome.fromJson(_json["outcome"]);
1381 }
1382 if (_json.containsKey("state")) {
1383 state = _json["state"];
1384 }
1385 if (_json.containsKey("testExecutionMatrixId")) {
1386 testExecutionMatrixId = _json["testExecutionMatrixId"];
1387 }
1388 }
1389
1390 core.Map toJson() {
1391 var _json = new core.Map();
1392 if (completionTime != null) {
1393 _json["completionTime"] = (completionTime).toJson();
1394 }
1395 if (creationTime != null) {
1396 _json["creationTime"] = (creationTime).toJson();
1397 }
1398 if (executionId != null) {
1399 _json["executionId"] = executionId;
1400 }
1401 if (outcome != null) {
1402 _json["outcome"] = (outcome).toJson();
1403 }
1404 if (state != null) {
1405 _json["state"] = state;
1406 }
1407 if (testExecutionMatrixId != null) {
1408 _json["testExecutionMatrixId"] = testExecutionMatrixId;
1409 }
1410 return _json;
1411 }
1412 }
1413
1414 class FailureDetail {
1415 /** If the failure was severe because the system under test crashed. */
1416 core.bool crashed;
1417 /**
1418 * If an app is not installed and thus no test can be run with the app. This
1419 * might be caused by trying to run a test on an unsupported platform.
1420 */
1421 core.bool notInstalled;
1422 /** If a native process other than the app crashed. */
1423 core.bool otherNativeCrash;
1424 /** If the test overran some time limit, and that is why it failed. */
1425 core.bool timedOut;
1426
1427 FailureDetail();
1428
1429 FailureDetail.fromJson(core.Map _json) {
1430 if (_json.containsKey("crashed")) {
1431 crashed = _json["crashed"];
1432 }
1433 if (_json.containsKey("notInstalled")) {
1434 notInstalled = _json["notInstalled"];
1435 }
1436 if (_json.containsKey("otherNativeCrash")) {
1437 otherNativeCrash = _json["otherNativeCrash"];
1438 }
1439 if (_json.containsKey("timedOut")) {
1440 timedOut = _json["timedOut"];
1441 }
1442 }
1443
1444 core.Map toJson() {
1445 var _json = new core.Map();
1446 if (crashed != null) {
1447 _json["crashed"] = crashed;
1448 }
1449 if (notInstalled != null) {
1450 _json["notInstalled"] = notInstalled;
1451 }
1452 if (otherNativeCrash != null) {
1453 _json["otherNativeCrash"] = otherNativeCrash;
1454 }
1455 if (timedOut != null) {
1456 _json["timedOut"] = timedOut;
1457 }
1458 return _json;
1459 }
1460 }
1461
1462 /** A reference to a file. */
1463 class FileReference {
1464 /**
1465 * The URI of a file stored in Google Cloud Storage.
1466 *
1467 * For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in
1468 * gsutil format: gs://mybucket/path/to/test.xml with version-specific info,
1469 * gs://mybucket/path/to/test.xml#1360383693690000
1470 *
1471 * An INVALID_ARGUMENT error will be returned if the URI format is not
1472 * supported.
1473 *
1474 * - In response: always set - In create/update request: always set
1475 */
1476 core.String fileUri;
1477
1478 FileReference();
1479
1480 FileReference.fromJson(core.Map _json) {
1481 if (_json.containsKey("fileUri")) {
1482 fileUri = _json["fileUri"];
1483 }
1484 }
1485
1486 core.Map toJson() {
1487 var _json = new core.Map();
1488 if (fileUri != null) {
1489 _json["fileUri"] = fileUri;
1490 }
1491 return _json;
1492 }
1493 }
1494
1495 /**
1496 * A History represents a sorted list of Executions ordered by the
1497 * start_timestamp_millis field (descending). It can be used to group all the
1498 * Executions of a continuous build.
1499 *
1500 * Note that the ordering only operates on one-dimension. If a repository has
1501 * multiple branches, it means that multiple histories will need to be used in
1502 * order to order Executions per branch. Next tag: 7
1503 */
1504 class History {
1505 /**
1506 * A short human-readable (plain text) name to display in the UI. Maximum of
1507 * 100 characters.
1508 *
1509 * - In response: present if set during create. - In create request: optional
1510 */
1511 core.String displayName;
1512 /**
1513 * A unique identifier within a project for this History.
1514 *
1515 * Returns INVALID_ARGUMENT if this field is set or overwritten by the caller.
1516 *
1517 * - In response always set - In create request: never set
1518 */
1519 core.String historyId;
1520 /**
1521 * A name to uniquely identify a history within a project. Maximum of 100
1522 * characters.
1523 *
1524 * - In response always set - In create request: always set
1525 */
1526 core.String name;
1527
1528 History();
1529
1530 History.fromJson(core.Map _json) {
1531 if (_json.containsKey("displayName")) {
1532 displayName = _json["displayName"];
1533 }
1534 if (_json.containsKey("historyId")) {
1535 historyId = _json["historyId"];
1536 }
1537 if (_json.containsKey("name")) {
1538 name = _json["name"];
1539 }
1540 }
1541
1542 core.Map toJson() {
1543 var _json = new core.Map();
1544 if (displayName != null) {
1545 _json["displayName"] = displayName;
1546 }
1547 if (historyId != null) {
1548 _json["historyId"] = historyId;
1549 }
1550 if (name != null) {
1551 _json["name"] = name;
1552 }
1553 return _json;
1554 }
1555 }
1556
1557 /**
1558 * An image, with a link to the main image and a thumbnail.
1559 *
1560 * Next tag: 6
1561 */
1562 class Image {
1563 /** An error explaining why the thumbnail could not be rendered. */
1564 Status error;
1565 /**
1566 * A reference to the full-size, original image.
1567 *
1568 * This is the same as the tool_outputs entry for the image under its Step.
1569 *
1570 * Always set.
1571 */
1572 ToolOutputReference sourceImage;
1573 /**
1574 * The step to which the image is attached.
1575 *
1576 * Always set.
1577 */
1578 core.String stepId;
1579 /** The thumbnail. */
1580 Thumbnail thumbnail;
1581
1582 Image();
1583
1584 Image.fromJson(core.Map _json) {
1585 if (_json.containsKey("error")) {
1586 error = new Status.fromJson(_json["error"]);
1587 }
1588 if (_json.containsKey("sourceImage")) {
1589 sourceImage = new ToolOutputReference.fromJson(_json["sourceImage"]);
1590 }
1591 if (_json.containsKey("stepId")) {
1592 stepId = _json["stepId"];
1593 }
1594 if (_json.containsKey("thumbnail")) {
1595 thumbnail = new Thumbnail.fromJson(_json["thumbnail"]);
1596 }
1597 }
1598
1599 core.Map toJson() {
1600 var _json = new core.Map();
1601 if (error != null) {
1602 _json["error"] = (error).toJson();
1603 }
1604 if (sourceImage != null) {
1605 _json["sourceImage"] = (sourceImage).toJson();
1606 }
1607 if (stepId != null) {
1608 _json["stepId"] = stepId;
1609 }
1610 if (thumbnail != null) {
1611 _json["thumbnail"] = (thumbnail).toJson();
1612 }
1613 return _json;
1614 }
1615 }
1616
1617 class InconclusiveDetail {
1618 /**
1619 * If the end user aborted the test execution before a pass or fail could be
1620 * determined. For example, the user pressed ctrl-c which sent a kill signal
1621 * to the test runner while the test was running.
1622 */
1623 core.bool abortedByUser;
1624 /**
1625 * If the test runner could not determine success or failure because the test
1626 * depends on a component other than the system under test which failed.
1627 *
1628 * For example, a mobile test requires provisioning a device where the test
1629 * executes, and that provisioning can fail.
1630 */
1631 core.bool infrastructureFailure;
1632 /**
1633 * A native process crashed on the device, producing a tombstone. It is
1634 * unclear whether the crash was related to the app under test.
1635 *
1636 * For example, OpenGL crashed, but it is unclear if the app is responsible.
1637 * TODO(yinfu): Remove after all reference from TestService are deleted.
1638 */
1639 core.bool nativeCrash;
1640
1641 InconclusiveDetail();
1642
1643 InconclusiveDetail.fromJson(core.Map _json) {
1644 if (_json.containsKey("abortedByUser")) {
1645 abortedByUser = _json["abortedByUser"];
1646 }
1647 if (_json.containsKey("infrastructureFailure")) {
1648 infrastructureFailure = _json["infrastructureFailure"];
1649 }
1650 if (_json.containsKey("nativeCrash")) {
1651 nativeCrash = _json["nativeCrash"];
1652 }
1653 }
1654
1655 core.Map toJson() {
1656 var _json = new core.Map();
1657 if (abortedByUser != null) {
1658 _json["abortedByUser"] = abortedByUser;
1659 }
1660 if (infrastructureFailure != null) {
1661 _json["infrastructureFailure"] = infrastructureFailure;
1662 }
1663 if (nativeCrash != null) {
1664 _json["nativeCrash"] = nativeCrash;
1665 }
1666 return _json;
1667 }
1668 }
1669
1670 /** Next tag: 3 */
1671 class ListExecutionsResponse {
1672 /**
1673 * Executions.
1674 *
1675 * Always set.
1676 */
1677 core.List<Execution> executions;
1678 /**
1679 * A continuation token to resume the query at the next item.
1680 *
1681 * Will only be set if there are more Executions to fetch.
1682 */
1683 core.String nextPageToken;
1684
1685 ListExecutionsResponse();
1686
1687 ListExecutionsResponse.fromJson(core.Map _json) {
1688 if (_json.containsKey("executions")) {
1689 executions = _json["executions"].map((value) => new Execution.fromJson(val ue)).toList();
1690 }
1691 if (_json.containsKey("nextPageToken")) {
1692 nextPageToken = _json["nextPageToken"];
1693 }
1694 }
1695
1696 core.Map toJson() {
1697 var _json = new core.Map();
1698 if (executions != null) {
1699 _json["executions"] = executions.map((value) => (value).toJson()).toList() ;
1700 }
1701 if (nextPageToken != null) {
1702 _json["nextPageToken"] = nextPageToken;
1703 }
1704 return _json;
1705 }
1706 }
1707
1708 /** Response message for HistoryService.List */
1709 class ListHistoriesResponse {
1710 /** Histories. */
1711 core.List<History> histories;
1712 /**
1713 * A continuation token to resume the query at the next item.
1714 *
1715 * Will only be set if there are more histories to fetch.
1716 *
1717 * Tokens are valid for up to one hour from the time of the first list
1718 * request. For instance, if you make a list request at 1PM and use the token
1719 * from this first request 10 minutes later, the token from this second
1720 * response will only be valid for 50 minutes.
1721 */
1722 core.String nextPageToken;
1723
1724 ListHistoriesResponse();
1725
1726 ListHistoriesResponse.fromJson(core.Map _json) {
1727 if (_json.containsKey("histories")) {
1728 histories = _json["histories"].map((value) => new History.fromJson(value)) .toList();
1729 }
1730 if (_json.containsKey("nextPageToken")) {
1731 nextPageToken = _json["nextPageToken"];
1732 }
1733 }
1734
1735 core.Map toJson() {
1736 var _json = new core.Map();
1737 if (histories != null) {
1738 _json["histories"] = histories.map((value) => (value).toJson()).toList();
1739 }
1740 if (nextPageToken != null) {
1741 _json["nextPageToken"] = nextPageToken;
1742 }
1743 return _json;
1744 }
1745 }
1746
1747 /**
1748 * A response containing the thumbnails in a step.
1749 *
1750 * Next tag: 3
1751 */
1752 class ListStepThumbnailsResponse {
1753 /**
1754 * A continuation token to resume the query at the next item.
1755 *
1756 * If set, indicates that there are more thumbnails to read, by calling list
1757 * again with this value in the page_token field.
1758 */
1759 core.String nextPageToken;
1760 /**
1761 * A list of image data.
1762 *
1763 * Images are returned in a deterministic order; they are ordered by these
1764 * factors, in order of importance: * First, by their associated test case.
1765 * Images without a test case are considered greater than images with one. *
1766 * Second, by their creation time. Images without a creation time are greater
1767 * than images with one. * Third, by the order in which they were added to the
1768 * step (by calls to CreateStep or UpdateStep).
1769 */
1770 core.List<Image> thumbnails;
1771
1772 ListStepThumbnailsResponse();
1773
1774 ListStepThumbnailsResponse.fromJson(core.Map _json) {
1775 if (_json.containsKey("nextPageToken")) {
1776 nextPageToken = _json["nextPageToken"];
1777 }
1778 if (_json.containsKey("thumbnails")) {
1779 thumbnails = _json["thumbnails"].map((value) => new Image.fromJson(value)) .toList();
1780 }
1781 }
1782
1783 core.Map toJson() {
1784 var _json = new core.Map();
1785 if (nextPageToken != null) {
1786 _json["nextPageToken"] = nextPageToken;
1787 }
1788 if (thumbnails != null) {
1789 _json["thumbnails"] = thumbnails.map((value) => (value).toJson()).toList() ;
1790 }
1791 return _json;
1792 }
1793 }
1794
1795 /** Response message for StepService.List. */
1796 class ListStepsResponse {
1797 /**
1798 * A continuation token to resume the query at the next item.
1799 *
1800 * If set, indicates that there are more steps to read, by calling list again
1801 * with this value in the page_token field.
1802 */
1803 core.String nextPageToken;
1804 /** Steps. */
1805 core.List<Step> steps;
1806
1807 ListStepsResponse();
1808
1809 ListStepsResponse.fromJson(core.Map _json) {
1810 if (_json.containsKey("nextPageToken")) {
1811 nextPageToken = _json["nextPageToken"];
1812 }
1813 if (_json.containsKey("steps")) {
1814 steps = _json["steps"].map((value) => new Step.fromJson(value)).toList();
1815 }
1816 }
1817
1818 core.Map toJson() {
1819 var _json = new core.Map();
1820 if (nextPageToken != null) {
1821 _json["nextPageToken"] = nextPageToken;
1822 }
1823 if (steps != null) {
1824 _json["steps"] = steps.map((value) => (value).toJson()).toList();
1825 }
1826 return _json;
1827 }
1828 }
1829
1830 /** Interprets a result so that humans and machines can act on it. */
1831 class Outcome {
1832 /**
1833 * More information about a FAILURE outcome.
1834 *
1835 * Returns INVALID_ARGUMENT if this field is set but the summary is not
1836 * FAILURE.
1837 *
1838 * Optional
1839 */
1840 FailureDetail failureDetail;
1841 /**
1842 * More information about an INCONCLUSIVE outcome.
1843 *
1844 * Returns INVALID_ARGUMENT if this field is set but the summary is not
1845 * INCONCLUSIVE.
1846 *
1847 * Optional
1848 */
1849 InconclusiveDetail inconclusiveDetail;
1850 /**
1851 * More information about a SKIPPED outcome.
1852 *
1853 * Returns INVALID_ARGUMENT if this field is set but the summary is not
1854 * SKIPPED.
1855 *
1856 * Optional
1857 */
1858 SkippedDetail skippedDetail;
1859 /**
1860 * More information about a SUCCESS outcome.
1861 *
1862 * Returns INVALID_ARGUMENT if this field is set but the summary is not
1863 * SUCCESS.
1864 *
1865 * Optional
1866 */
1867 SuccessDetail successDetail;
1868 /**
1869 * The simplest way to interpret a result.
1870 *
1871 * Required
1872 * Possible string values are:
1873 * - "failure"
1874 * - "inconclusive"
1875 * - "skipped"
1876 * - "success"
1877 * - "unset"
1878 */
1879 core.String summary;
1880
1881 Outcome();
1882
1883 Outcome.fromJson(core.Map _json) {
1884 if (_json.containsKey("failureDetail")) {
1885 failureDetail = new FailureDetail.fromJson(_json["failureDetail"]);
1886 }
1887 if (_json.containsKey("inconclusiveDetail")) {
1888 inconclusiveDetail = new InconclusiveDetail.fromJson(_json["inconclusiveDe tail"]);
1889 }
1890 if (_json.containsKey("skippedDetail")) {
1891 skippedDetail = new SkippedDetail.fromJson(_json["skippedDetail"]);
1892 }
1893 if (_json.containsKey("successDetail")) {
1894 successDetail = new SuccessDetail.fromJson(_json["successDetail"]);
1895 }
1896 if (_json.containsKey("summary")) {
1897 summary = _json["summary"];
1898 }
1899 }
1900
1901 core.Map toJson() {
1902 var _json = new core.Map();
1903 if (failureDetail != null) {
1904 _json["failureDetail"] = (failureDetail).toJson();
1905 }
1906 if (inconclusiveDetail != null) {
1907 _json["inconclusiveDetail"] = (inconclusiveDetail).toJson();
1908 }
1909 if (skippedDetail != null) {
1910 _json["skippedDetail"] = (skippedDetail).toJson();
1911 }
1912 if (successDetail != null) {
1913 _json["successDetail"] = (successDetail).toJson();
1914 }
1915 if (summary != null) {
1916 _json["summary"] = summary;
1917 }
1918 return _json;
1919 }
1920 }
1921
1922 /** Per-project settings for the Tool Results service. */
1923 class ProjectSettings {
1924 /**
1925 * The name of the Google Cloud Storage bucket to which results are written.
1926 *
1927 * By default, this is unset.
1928 *
1929 * In update request: optional In response: optional
1930 */
1931 core.String defaultBucket;
1932 /**
1933 * The name of the project's settings.
1934 *
1935 * Always of the form: projects/{project-id}/settings
1936 *
1937 * In update request: never set In response: always set
1938 */
1939 core.String name;
1940
1941 ProjectSettings();
1942
1943 ProjectSettings.fromJson(core.Map _json) {
1944 if (_json.containsKey("defaultBucket")) {
1945 defaultBucket = _json["defaultBucket"];
1946 }
1947 if (_json.containsKey("name")) {
1948 name = _json["name"];
1949 }
1950 }
1951
1952 core.Map toJson() {
1953 var _json = new core.Map();
1954 if (defaultBucket != null) {
1955 _json["defaultBucket"] = defaultBucket;
1956 }
1957 if (name != null) {
1958 _json["name"] = name;
1959 }
1960 return _json;
1961 }
1962 }
1963
1964 /** Request message for StepService.PublishXunitXmlFiles. */
1965 class PublishXunitXmlFilesRequest {
1966 /**
1967 * URI of the Xunit XML files to publish.
1968 *
1969 * The maximum size of the file this reference is pointing to is 50MB.
1970 *
1971 * Required.
1972 */
1973 core.List<FileReference> xunitXmlFiles;
1974
1975 PublishXunitXmlFilesRequest();
1976
1977 PublishXunitXmlFilesRequest.fromJson(core.Map _json) {
1978 if (_json.containsKey("xunitXmlFiles")) {
1979 xunitXmlFiles = _json["xunitXmlFiles"].map((value) => new FileReference.fr omJson(value)).toList();
1980 }
1981 }
1982
1983 core.Map toJson() {
1984 var _json = new core.Map();
1985 if (xunitXmlFiles != null) {
1986 _json["xunitXmlFiles"] = xunitXmlFiles.map((value) => (value).toJson()).to List();
1987 }
1988 return _json;
1989 }
1990 }
1991
1992 class SkippedDetail {
1993 /** If the App doesn't support the specific API level. */
1994 core.bool incompatibleAppVersion;
1995 /** If the App doesn't run on the specific architecture, for example, x86. */
1996 core.bool incompatibleArchitecture;
1997 /** If the requested OS version doesn't run on the specific device model. */
1998 core.bool incompatibleDevice;
1999
2000 SkippedDetail();
2001
2002 SkippedDetail.fromJson(core.Map _json) {
2003 if (_json.containsKey("incompatibleAppVersion")) {
2004 incompatibleAppVersion = _json["incompatibleAppVersion"];
2005 }
2006 if (_json.containsKey("incompatibleArchitecture")) {
2007 incompatibleArchitecture = _json["incompatibleArchitecture"];
2008 }
2009 if (_json.containsKey("incompatibleDevice")) {
2010 incompatibleDevice = _json["incompatibleDevice"];
2011 }
2012 }
2013
2014 core.Map toJson() {
2015 var _json = new core.Map();
2016 if (incompatibleAppVersion != null) {
2017 _json["incompatibleAppVersion"] = incompatibleAppVersion;
2018 }
2019 if (incompatibleArchitecture != null) {
2020 _json["incompatibleArchitecture"] = incompatibleArchitecture;
2021 }
2022 if (incompatibleDevice != null) {
2023 _json["incompatibleDevice"] = incompatibleDevice;
2024 }
2025 return _json;
2026 }
2027 }
2028
2029 /**
2030 * The `Status` type defines a logical error model that is suitable for
2031 * different programming environments, including REST APIs and RPC APIs. It is
2032 * used by [gRPC](https://github.com/grpc). The error model is designed to be:
2033 *
2034 * - Simple to use and understand for most users - Flexible enough to meet
2035 * unexpected needs
2036 *
2037 * # Overview
2038 *
2039 * The `Status` message contains three pieces of data: error code, error
2040 * message, and error details. The error code should be an enum value of
2041 * [google.rpc.Code][], but it may accept additional error codes if needed. The
2042 * error message should be a developer-facing English message that helps
2043 * developers *understand* and *resolve* the error. If a localized user-facing
2044 * error message is needed, put the localized message in the error details or
2045 * localize it in the client. The optional error details may contain arbitrary
2046 * information about the error. There is a predefined set of error detail types
2047 * in the package `google.rpc` which can be used for common error conditions.
2048 *
2049 * # Language mapping
2050 *
2051 * The `Status` message is the logical representation of the error model, but it
2052 * is not necessarily the actual wire format. When the `Status` message is
2053 * exposed in different client libraries and different wire protocols, it can be
2054 * mapped differently. For example, it will likely be mapped to some exceptions
2055 * in Java, but more likely mapped to some error codes in C.
2056 *
2057 * # Other uses
2058 *
2059 * The error model and the `Status` message can be used in a variety of
2060 * environments, either with or without APIs, to provide a consistent developer
2061 * experience across different environments.
2062 *
2063 * Example uses of this error model include:
2064 *
2065 * - Partial errors. If a service needs to return partial errors to the client,
2066 * it may embed the `Status` in the normal response to indicate the partial
2067 * errors.
2068 *
2069 * - Workflow errors. A typical workflow has multiple steps. Each step may have
2070 * a `Status` message for error reporting purpose.
2071 *
2072 * - Batch operations. If a client uses batch request and batch response, the
2073 * `Status` message should be used directly inside batch response, one for each
2074 * error sub-response.
2075 *
2076 * - Asynchronous operations. If an API call embeds asynchronous operation
2077 * results in its response, the status of those operations should be represented
2078 * directly using the `Status` message.
2079 *
2080 * - Logging. If some API errors are stored in logs, the message `Status` could
2081 * be used directly after any stripping needed for security/privacy reasons.
2082 */
2083 class Status {
2084 /** The status code, which should be an enum value of [google.rpc.Code][]. */
2085 core.int code;
2086 /**
2087 * A list of messages that carry the error details. There will be a common set
2088 * of message types for APIs to use.
2089 */
2090 core.List<Any> details;
2091 /**
2092 * A developer-facing error message, which should be in English. Any
2093 * user-facing error message should be localized and sent in the
2094 * [google.rpc.Status.details][] field, or localized by the client.
2095 */
2096 core.String message;
2097
2098 Status();
2099
2100 Status.fromJson(core.Map _json) {
2101 if (_json.containsKey("code")) {
2102 code = _json["code"];
2103 }
2104 if (_json.containsKey("details")) {
2105 details = _json["details"].map((value) => new Any.fromJson(value)).toList( );
2106 }
2107 if (_json.containsKey("message")) {
2108 message = _json["message"];
2109 }
2110 }
2111
2112 core.Map toJson() {
2113 var _json = new core.Map();
2114 if (code != null) {
2115 _json["code"] = code;
2116 }
2117 if (details != null) {
2118 _json["details"] = details.map((value) => (value).toJson()).toList();
2119 }
2120 if (message != null) {
2121 _json["message"] = message;
2122 }
2123 return _json;
2124 }
2125 }
2126
2127 /**
2128 * A Step represents a single operation performed as part of Execution. A step
2129 * can be used to represent the execution of a tool ( for example a test runner
2130 * execution or an execution of a compiler).
2131 *
2132 * Steps can overlap (for instance two steps might have the same start time if
2133 * some operations are done in parallel).
2134 *
2135 * Here is an example, let's consider that we have a continuous build is
2136 * executing a test runner for each iteration. The workflow would look like: -
2137 * user creates a Execution with id 1 - user creates an TestExecutionStep with
2138 * id 100 for Execution 1 - user update TestExecutionStep with id 100 to add a
2139 * raw xml log + the service parses the xml logs and returns a TestExecutionStep
2140 * with updated TestResult(s). - user update the status of TestExecutionStep
2141 * with id 100 to COMPLETE
2142 *
2143 * A Step can be updated until its state is set to COMPLETE at which points it
2144 * becomes immutable.
2145 *
2146 * Next tag: 20
2147 */
2148 class Step {
2149 /**
2150 * The time when the step status was set to complete.
2151 *
2152 * This value will be set automatically when state transitions to COMPLETE.
2153 *
2154 * - In response: set if the execution state is COMPLETE. - In create/update
2155 * request: never set
2156 */
2157 Timestamp completionTime;
2158 /**
2159 * The time when the step was created.
2160 *
2161 * - In response: always set - In create/update request: never set
2162 */
2163 Timestamp creationTime;
2164 /**
2165 * A description of this tool For example: mvn clean package -D skipTests=true
2166 *
2167 * - In response: present if set by create/update request - In create/update
2168 * request: optional
2169 */
2170 core.String description;
2171 /**
2172 * How much the device resource is used to perform the test.
2173 *
2174 * This is the device usage used for billing purpose, which is different from
2175 * the run_duration, for example, infrastructure failure won't be charged for
2176 * device usage.
2177 *
2178 * PRECONDITION_FAILED will be returned if one attempts to set a device_usage
2179 * on a step which already has this field set.
2180 *
2181 * - In response: present if previously set. - In create request: optional -
2182 * In update request: optional
2183 */
2184 Duration deviceUsageDuration;
2185 /**
2186 * If the execution containing this step has any dimension_definition set,
2187 * then this field allows the child to specify the values of the dimensions.
2188 *
2189 * The keys must exactly match the dimension_definition of the execution.
2190 *
2191 * For example, if the execution has `dimension_definition = ['attempt',
2192 * 'device']` then a step must define values for those dimensions, eg.
2193 * `dimension_value = ['attempt': '1', 'device': 'Nexus 6']`
2194 *
2195 * If a step does not participate in one dimension of the matrix, the value
2196 * for that dimension should be empty string. For example, if one of the tests
2197 * is executed by a runner which does not support retries, the step could have
2198 * `dimension_value = ['attempt': '', 'device': 'Nexus 6']`
2199 *
2200 * If the step does not participate in any dimensions of the matrix, it may
2201 * leave dimension_value unset.
2202 *
2203 * A PRECONDITION_FAILED will be returned if any of the keys do not exist in
2204 * the dimension_definition of the execution.
2205 *
2206 * A PRECONDITION_FAILED will be returned if another step in this execution
2207 * already has the same name and dimension_value, but differs on other data
2208 * fields, for example, step field is different.
2209 *
2210 * A PRECONDITION_FAILED will be returned if dimension_value is set, and there
2211 * is a dimension_definition in the execution which is not specified as one of
2212 * the keys.
2213 *
2214 * - In response: present if set by create - In create request: optional - In
2215 * update request: never set
2216 */
2217 core.List<StepDimensionValueEntry> dimensionValue;
2218 /**
2219 * Whether any of the outputs of this step are images whose thumbnails can be
2220 * fetched with ListThumbnails.
2221 *
2222 * - In response: always set - In create/update request: never set
2223 */
2224 core.bool hasImages;
2225 /**
2226 * Arbitrary user-supplied key/value pairs that are associated with the step.
2227 *
2228 * Users are responsible for managing the key namespace such that keys don't
2229 * accidentally collide.
2230 *
2231 * An INVALID_ARGUMENT will be returned if the number of labels exceeds 100 or
2232 * if the length of any of the keys or values exceeds 100 characters.
2233 *
2234 * - In response: always set - In create request: optional - In update
2235 * request: optional; any new key/value pair will be added to the map, and any
2236 * new value for an existing key will update that key's value
2237 */
2238 core.List<StepLabelsEntry> labels;
2239 /**
2240 * A short human-readable name to display in the UI. Maximum of 100
2241 * characters. For example: Clean build
2242 *
2243 * A PRECONDITION_FAILED will be returned upon creating a new step if it
2244 * shares its name and dimension_value with an existing step. If two steps
2245 * represent a similar action, but have different dimension values, they
2246 * should share the same name. For instance, if the same set of tests is run
2247 * on two different platforms, the two steps should have the same name.
2248 *
2249 * - In response: always set - In create request: always set - In update
2250 * request: never set
2251 */
2252 core.String name;
2253 /**
2254 * Classification of the result, for example into SUCCESS or FAILURE
2255 *
2256 * - In response: present if set by create/update request - In create/update
2257 * request: optional
2258 */
2259 Outcome outcome;
2260 /**
2261 * How long it took for this step to run.
2262 *
2263 * If unset, this is set to the difference between creation_time and
2264 * completion_time when the step is set to the COMPLETE state. In some cases,
2265 * it is appropriate to set this value separately: For instance, if a step is
2266 * created, but the operation it represents is queued for a few minutes before
2267 * it executes, it would be appropriate not to include the time spent queued
2268 * in its run_duration.
2269 *
2270 * PRECONDITION_FAILED will be returned if one attempts to set a run_duration
2271 * on a step which already has this field set.
2272 *
2273 * - In response: present if previously set; always present on COMPLETE step -
2274 * In create request: optional - In update request: optional
2275 */
2276 Duration runDuration;
2277 /**
2278 * The initial state is IN_PROGRESS. The only legal state transitions are *
2279 * IN_PROGRESS -> COMPLETE
2280 *
2281 * A PRECONDITION_FAILED will be returned if an invalid transition is
2282 * requested.
2283 *
2284 * It is valid to create Step with a state set to COMPLETE. The state can only
2285 * be set to COMPLETE once. A PRECONDITION_FAILED will be returned if the
2286 * state is set to COMPLETE multiple times.
2287 *
2288 * - In response: always set - In create/update request: optional
2289 * Possible string values are:
2290 * - "complete"
2291 * - "inProgress"
2292 * - "pending"
2293 * - "unknownState"
2294 */
2295 core.String state;
2296 /**
2297 * A unique identifier within a Execution for this Step.
2298 *
2299 * Returns INVALID_ARGUMENT if this field is set or overwritten by the caller.
2300 *
2301 * - In response: always set - In create/update request: never set
2302 */
2303 core.String stepId;
2304 /** An execution of a test runner. */
2305 TestExecutionStep testExecutionStep;
2306 /** An execution of a tool (used for steps we don't explicitly support). */
2307 ToolExecutionStep toolExecutionStep;
2308
2309 Step();
2310
2311 Step.fromJson(core.Map _json) {
2312 if (_json.containsKey("completionTime")) {
2313 completionTime = new Timestamp.fromJson(_json["completionTime"]);
2314 }
2315 if (_json.containsKey("creationTime")) {
2316 creationTime = new Timestamp.fromJson(_json["creationTime"]);
2317 }
2318 if (_json.containsKey("description")) {
2319 description = _json["description"];
2320 }
2321 if (_json.containsKey("deviceUsageDuration")) {
2322 deviceUsageDuration = new Duration.fromJson(_json["deviceUsageDuration"]);
2323 }
2324 if (_json.containsKey("dimensionValue")) {
2325 dimensionValue = _json["dimensionValue"].map((value) => new StepDimensionV alueEntry.fromJson(value)).toList();
2326 }
2327 if (_json.containsKey("hasImages")) {
2328 hasImages = _json["hasImages"];
2329 }
2330 if (_json.containsKey("labels")) {
2331 labels = _json["labels"].map((value) => new StepLabelsEntry.fromJson(value )).toList();
2332 }
2333 if (_json.containsKey("name")) {
2334 name = _json["name"];
2335 }
2336 if (_json.containsKey("outcome")) {
2337 outcome = new Outcome.fromJson(_json["outcome"]);
2338 }
2339 if (_json.containsKey("runDuration")) {
2340 runDuration = new Duration.fromJson(_json["runDuration"]);
2341 }
2342 if (_json.containsKey("state")) {
2343 state = _json["state"];
2344 }
2345 if (_json.containsKey("stepId")) {
2346 stepId = _json["stepId"];
2347 }
2348 if (_json.containsKey("testExecutionStep")) {
2349 testExecutionStep = new TestExecutionStep.fromJson(_json["testExecutionSte p"]);
2350 }
2351 if (_json.containsKey("toolExecutionStep")) {
2352 toolExecutionStep = new ToolExecutionStep.fromJson(_json["toolExecutionSte p"]);
2353 }
2354 }
2355
2356 core.Map toJson() {
2357 var _json = new core.Map();
2358 if (completionTime != null) {
2359 _json["completionTime"] = (completionTime).toJson();
2360 }
2361 if (creationTime != null) {
2362 _json["creationTime"] = (creationTime).toJson();
2363 }
2364 if (description != null) {
2365 _json["description"] = description;
2366 }
2367 if (deviceUsageDuration != null) {
2368 _json["deviceUsageDuration"] = (deviceUsageDuration).toJson();
2369 }
2370 if (dimensionValue != null) {
2371 _json["dimensionValue"] = dimensionValue.map((value) => (value).toJson()). toList();
2372 }
2373 if (hasImages != null) {
2374 _json["hasImages"] = hasImages;
2375 }
2376 if (labels != null) {
2377 _json["labels"] = labels.map((value) => (value).toJson()).toList();
2378 }
2379 if (name != null) {
2380 _json["name"] = name;
2381 }
2382 if (outcome != null) {
2383 _json["outcome"] = (outcome).toJson();
2384 }
2385 if (runDuration != null) {
2386 _json["runDuration"] = (runDuration).toJson();
2387 }
2388 if (state != null) {
2389 _json["state"] = state;
2390 }
2391 if (stepId != null) {
2392 _json["stepId"] = stepId;
2393 }
2394 if (testExecutionStep != null) {
2395 _json["testExecutionStep"] = (testExecutionStep).toJson();
2396 }
2397 if (toolExecutionStep != null) {
2398 _json["toolExecutionStep"] = (toolExecutionStep).toJson();
2399 }
2400 return _json;
2401 }
2402 }
2403
2404 class StepDimensionValueEntry {
2405 core.String key;
2406 core.String value;
2407
2408 StepDimensionValueEntry();
2409
2410 StepDimensionValueEntry.fromJson(core.Map _json) {
2411 if (_json.containsKey("key")) {
2412 key = _json["key"];
2413 }
2414 if (_json.containsKey("value")) {
2415 value = _json["value"];
2416 }
2417 }
2418
2419 core.Map toJson() {
2420 var _json = new core.Map();
2421 if (key != null) {
2422 _json["key"] = key;
2423 }
2424 if (value != null) {
2425 _json["value"] = value;
2426 }
2427 return _json;
2428 }
2429 }
2430
2431 class StepLabelsEntry {
2432 core.String key;
2433 core.String value;
2434
2435 StepLabelsEntry();
2436
2437 StepLabelsEntry.fromJson(core.Map _json) {
2438 if (_json.containsKey("key")) {
2439 key = _json["key"];
2440 }
2441 if (_json.containsKey("value")) {
2442 value = _json["value"];
2443 }
2444 }
2445
2446 core.Map toJson() {
2447 var _json = new core.Map();
2448 if (key != null) {
2449 _json["key"] = key;
2450 }
2451 if (value != null) {
2452 _json["value"] = value;
2453 }
2454 return _json;
2455 }
2456 }
2457
2458 class SuccessDetail {
2459 /** If a native process other than the app crashed. */
2460 core.bool otherNativeCrash;
2461
2462 SuccessDetail();
2463
2464 SuccessDetail.fromJson(core.Map _json) {
2465 if (_json.containsKey("otherNativeCrash")) {
2466 otherNativeCrash = _json["otherNativeCrash"];
2467 }
2468 }
2469
2470 core.Map toJson() {
2471 var _json = new core.Map();
2472 if (otherNativeCrash != null) {
2473 _json["otherNativeCrash"] = otherNativeCrash;
2474 }
2475 return _json;
2476 }
2477 }
2478
2479 /**
2480 * A reference to a test case.
2481 *
2482 * Test case references are canonically ordered lexicographically by these three
2483 * factors: * First, by test_suite_name. * Second, by class_name. * Third, by
2484 * name.
2485 */
2486 class TestCaseReference {
2487 /** The name of the class. */
2488 core.String className;
2489 /**
2490 * The name of the test case.
2491 *
2492 * Required.
2493 */
2494 core.String name;
2495 /** The name of the test suite to which this test case belongs. */
2496 core.String testSuiteName;
2497
2498 TestCaseReference();
2499
2500 TestCaseReference.fromJson(core.Map _json) {
2501 if (_json.containsKey("className")) {
2502 className = _json["className"];
2503 }
2504 if (_json.containsKey("name")) {
2505 name = _json["name"];
2506 }
2507 if (_json.containsKey("testSuiteName")) {
2508 testSuiteName = _json["testSuiteName"];
2509 }
2510 }
2511
2512 core.Map toJson() {
2513 var _json = new core.Map();
2514 if (className != null) {
2515 _json["className"] = className;
2516 }
2517 if (name != null) {
2518 _json["name"] = name;
2519 }
2520 if (testSuiteName != null) {
2521 _json["testSuiteName"] = testSuiteName;
2522 }
2523 return _json;
2524 }
2525 }
2526
2527 /**
2528 * A step that represents running tests.
2529 *
2530 * It accepts ant-junit xml files which will be parsed into structured test
2531 * results by the service. Xml file paths are updated in order to append more
2532 * files, however they can't be deleted.
2533 *
2534 * Users can also add test results manually by using the test_result field. Next
2535 * tag: 7
2536 */
2537 class TestExecutionStep {
2538 /**
2539 * List of test suite overview contents. This could be parsed from xUnit XML
2540 * log by server, or uploaded directly by user. This references should only be
2541 * called when test suites are fully parsed or uploaded.
2542 *
2543 * The maximum allowed number of test suite overviews per step is 1000.
2544 *
2545 * - In response: always set - In create request: optional - In update
2546 * request: never (use publishXunitXmlFiles custom method instead)
2547 */
2548 core.List<TestSuiteOverview> testSuiteOverviews;
2549 /**
2550 * The timing break down of the test execution.
2551 *
2552 * - In response: present if set by create or update - In create/update
2553 * request: optional
2554 */
2555 TestTiming testTiming;
2556 /**
2557 * Represents the execution of the test runner.
2558 *
2559 * The exit code of this tool will be used to determine if the test passed.
2560 *
2561 * - In response: always set - In create/update request: optional
2562 */
2563 ToolExecution toolExecution;
2564
2565 TestExecutionStep();
2566
2567 TestExecutionStep.fromJson(core.Map _json) {
2568 if (_json.containsKey("testSuiteOverviews")) {
2569 testSuiteOverviews = _json["testSuiteOverviews"].map((value) => new TestSu iteOverview.fromJson(value)).toList();
2570 }
2571 if (_json.containsKey("testTiming")) {
2572 testTiming = new TestTiming.fromJson(_json["testTiming"]);
2573 }
2574 if (_json.containsKey("toolExecution")) {
2575 toolExecution = new ToolExecution.fromJson(_json["toolExecution"]);
2576 }
2577 }
2578
2579 core.Map toJson() {
2580 var _json = new core.Map();
2581 if (testSuiteOverviews != null) {
2582 _json["testSuiteOverviews"] = testSuiteOverviews.map((value) => (value).to Json()).toList();
2583 }
2584 if (testTiming != null) {
2585 _json["testTiming"] = (testTiming).toJson();
2586 }
2587 if (toolExecution != null) {
2588 _json["toolExecution"] = (toolExecution).toJson();
2589 }
2590 return _json;
2591 }
2592 }
2593
2594 /**
2595 * A summary of a test suite result either parsed from XML or uploaded directly
2596 * by a user.
2597 *
2598 * Note: the API related comments are for StepService only. This message is also
2599 * being used in ExecutionService in a read only mode for the corresponding
2600 * step.
2601 *
2602 * Next tag: 7
2603 */
2604 class TestSuiteOverview {
2605 /**
2606 * Number of test cases in error, typically set by the service by parsing the
2607 * xml_source.
2608 *
2609 * - In create/response: always set - In update request: never
2610 */
2611 core.int errorCount;
2612 /**
2613 * Number of failed test cases, typically set by the service by parsing the
2614 * xml_source. May also be set by the user.
2615 *
2616 * - In create/response: always set - In update request: never
2617 */
2618 core.int failureCount;
2619 /**
2620 * The name of the test suite.
2621 *
2622 * - In create/response: always set - In update request: never
2623 */
2624 core.String name;
2625 /**
2626 * Number of test cases not run, typically set by the service by parsing the
2627 * xml_source.
2628 *
2629 * - In create/response: always set - In update request: never
2630 */
2631 core.int skippedCount;
2632 /**
2633 * Number of test cases, typically set by the service by parsing the
2634 * xml_source.
2635 *
2636 * - In create/response: always set - In update request: never
2637 */
2638 core.int totalCount;
2639 /**
2640 * If this test suite was parsed from XML, this is the URI where the original
2641 * XML file is stored.
2642 *
2643 * Note: Multiple test suites can share the same xml_source
2644 *
2645 * Returns INVALID_ARGUMENT if the uri format is not supported.
2646 *
2647 * - In create/response: optional - In update request: never
2648 */
2649 FileReference xmlSource;
2650
2651 TestSuiteOverview();
2652
2653 TestSuiteOverview.fromJson(core.Map _json) {
2654 if (_json.containsKey("errorCount")) {
2655 errorCount = _json["errorCount"];
2656 }
2657 if (_json.containsKey("failureCount")) {
2658 failureCount = _json["failureCount"];
2659 }
2660 if (_json.containsKey("name")) {
2661 name = _json["name"];
2662 }
2663 if (_json.containsKey("skippedCount")) {
2664 skippedCount = _json["skippedCount"];
2665 }
2666 if (_json.containsKey("totalCount")) {
2667 totalCount = _json["totalCount"];
2668 }
2669 if (_json.containsKey("xmlSource")) {
2670 xmlSource = new FileReference.fromJson(_json["xmlSource"]);
2671 }
2672 }
2673
2674 core.Map toJson() {
2675 var _json = new core.Map();
2676 if (errorCount != null) {
2677 _json["errorCount"] = errorCount;
2678 }
2679 if (failureCount != null) {
2680 _json["failureCount"] = failureCount;
2681 }
2682 if (name != null) {
2683 _json["name"] = name;
2684 }
2685 if (skippedCount != null) {
2686 _json["skippedCount"] = skippedCount;
2687 }
2688 if (totalCount != null) {
2689 _json["totalCount"] = totalCount;
2690 }
2691 if (xmlSource != null) {
2692 _json["xmlSource"] = (xmlSource).toJson();
2693 }
2694 return _json;
2695 }
2696 }
2697
2698 /** Testing timing break down to know phases. */
2699 class TestTiming {
2700 /**
2701 * How long it took to run the test process.
2702 *
2703 * - In response: present if previously set. - In create/update request:
2704 * optional
2705 */
2706 Duration testProcessDuration;
2707
2708 TestTiming();
2709
2710 TestTiming.fromJson(core.Map _json) {
2711 if (_json.containsKey("testProcessDuration")) {
2712 testProcessDuration = new Duration.fromJson(_json["testProcessDuration"]);
2713 }
2714 }
2715
2716 core.Map toJson() {
2717 var _json = new core.Map();
2718 if (testProcessDuration != null) {
2719 _json["testProcessDuration"] = (testProcessDuration).toJson();
2720 }
2721 return _json;
2722 }
2723 }
2724
2725 /**
2726 * A single thumbnail, with its size and format.
2727 *
2728 * Next tag: 102
2729 */
2730 class Thumbnail {
2731 /**
2732 * The thumbnail's content type, i.e. "image/png".
2733 *
2734 * Always set.
2735 */
2736 core.String contentType;
2737 /**
2738 * The thumbnail file itself.
2739 *
2740 * That is, the bytes here are precisely the bytes that make up the thumbnail
2741 * file; they can be served as an image as-is (with the appropriate content
2742 * type.)
2743 *
2744 * Always set.
2745 */
2746 core.String data;
2747 core.List<core.int> get dataAsBytes {
2748 return crypto.CryptoUtils.base64StringToBytes(data);
2749 }
2750
2751 void set dataAsBytes(core.List<core.int> _bytes) {
2752 data = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true);
2753 }
2754 /**
2755 * The height of the thumbnail, in pixels.
2756 *
2757 * Always set.
2758 */
2759 core.int heightPx;
2760 /**
2761 * The width of the thumbnail, in pixels.
2762 *
2763 * Always set.
2764 */
2765 core.int widthPx;
2766
2767 Thumbnail();
2768
2769 Thumbnail.fromJson(core.Map _json) {
2770 if (_json.containsKey("contentType")) {
2771 contentType = _json["contentType"];
2772 }
2773 if (_json.containsKey("data")) {
2774 data = _json["data"];
2775 }
2776 if (_json.containsKey("heightPx")) {
2777 heightPx = _json["heightPx"];
2778 }
2779 if (_json.containsKey("widthPx")) {
2780 widthPx = _json["widthPx"];
2781 }
2782 }
2783
2784 core.Map toJson() {
2785 var _json = new core.Map();
2786 if (contentType != null) {
2787 _json["contentType"] = contentType;
2788 }
2789 if (data != null) {
2790 _json["data"] = data;
2791 }
2792 if (heightPx != null) {
2793 _json["heightPx"] = heightPx;
2794 }
2795 if (widthPx != null) {
2796 _json["widthPx"] = widthPx;
2797 }
2798 return _json;
2799 }
2800 }
2801
2802 /**
2803 * A Timestamp represents a point in time independent of any time zone or
2804 * calendar, represented as seconds and fractions of seconds at nanosecond
2805 * resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian
2806 * Calendar which extends the Gregorian calendar backwards to year one. It is
2807 * encoded assuming all minutes are 60 seconds long, i.e. leap seconds are
2808 * "smeared" so that no leap second table is needed for interpretation. Range is
2809 * from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting
2810 * to that range, we ensure that we can convert to and from RFC 3339 date
2811 * strings. See
2812 * [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).
2813 *
2814 * Example 1: Compute Timestamp from POSIX `time()`.
2815 *
2816 * Timestamp timestamp; timestamp.set_seconds(time(NULL));
2817 * timestamp.set_nanos(0);
2818 *
2819 * Example 2: Compute Timestamp from POSIX `gettimeofday()`.
2820 *
2821 * struct timeval tv; gettimeofday(&tv, NULL);
2822 *
2823 * Timestamp timestamp; timestamp.set_seconds(tv.tv_sec);
2824 * timestamp.set_nanos(tv.tv_usec * 1000);
2825 *
2826 * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
2827 *
2828 * FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks =
2829 * (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
2830 *
2831 * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z //
2832 * is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp
2833 * timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) -
2834 * 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
2835 *
2836 * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
2837 *
2838 * long millis = System.currentTimeMillis();
2839 *
2840 * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
2841 * .setNanos((int) ((millis % 1000) * 1000000)).build();
2842 *
2843 *
2844 *
2845 * Example 5: Compute Timestamp from current time in Python.
2846 *
2847 * now = time.time() seconds = int(now) nanos = int((now - seconds) * 10**9)
2848 * timestamp = Timestamp(seconds=seconds, nanos=nanos)
2849 */
2850 class Timestamp {
2851 /**
2852 * Non-negative fractions of a second at nanosecond resolution. Negative
2853 * second values with fractions must still have non-negative nanos values that
2854 * count forward in time. Must be from 0 to 999,999,999 inclusive.
2855 */
2856 core.int nanos;
2857 /**
2858 * Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must
2859 * be from from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
2860 */
2861 core.String seconds;
2862
2863 Timestamp();
2864
2865 Timestamp.fromJson(core.Map _json) {
2866 if (_json.containsKey("nanos")) {
2867 nanos = _json["nanos"];
2868 }
2869 if (_json.containsKey("seconds")) {
2870 seconds = _json["seconds"];
2871 }
2872 }
2873
2874 core.Map toJson() {
2875 var _json = new core.Map();
2876 if (nanos != null) {
2877 _json["nanos"] = nanos;
2878 }
2879 if (seconds != null) {
2880 _json["seconds"] = seconds;
2881 }
2882 return _json;
2883 }
2884 }
2885
2886 /**
2887 * An execution of an arbitrary tool. It could be a test runner or a tool
2888 * copying artifacts or deploying code. Next tag: 7
2889 */
2890 class ToolExecution {
2891 /**
2892 * The full tokenized command line including the program name (equivalent to
2893 * argv in a C program).
2894 *
2895 * - In response: present if set by create request - In create request:
2896 * optional - In update request: never set
2897 */
2898 core.List<core.String> commandLineArguments;
2899 /**
2900 * Tool execution exit code. This field will be set once the tool has exited.
2901 *
2902 * - In response: present if set by create/update request - In create request:
2903 * optional - In update request: optional, a FAILED_PRECONDITION error will be
2904 * returned if an exit_code is already set.
2905 */
2906 ToolExitCode exitCode;
2907 /**
2908 * References to any plain text logs output the tool execution.
2909 *
2910 * This field can be set before the tool has exited in order to be able to
2911 * have access to a live view of the logs while the tool is running.
2912 *
2913 * The maximum allowed number of tool logs per step is 1000.
2914 *
2915 * - In response: present if set by create/update request - In create request:
2916 * optional - In update request: optional, any value provided will be appended
2917 * to the existing list
2918 */
2919 core.List<FileReference> toolLogs;
2920 /**
2921 * References to opaque files of any format output by the tool execution.
2922 *
2923 * The maximum allowed number of tool outputs per step is 1000.
2924 *
2925 * - In response: present if set by create/update request - In create request:
2926 * optional - In update request: optional, any value provided will be appended
2927 * to the existing list
2928 */
2929 core.List<ToolOutputReference> toolOutputs;
2930
2931 ToolExecution();
2932
2933 ToolExecution.fromJson(core.Map _json) {
2934 if (_json.containsKey("commandLineArguments")) {
2935 commandLineArguments = _json["commandLineArguments"];
2936 }
2937 if (_json.containsKey("exitCode")) {
2938 exitCode = new ToolExitCode.fromJson(_json["exitCode"]);
2939 }
2940 if (_json.containsKey("toolLogs")) {
2941 toolLogs = _json["toolLogs"].map((value) => new FileReference.fromJson(val ue)).toList();
2942 }
2943 if (_json.containsKey("toolOutputs")) {
2944 toolOutputs = _json["toolOutputs"].map((value) => new ToolOutputReference. fromJson(value)).toList();
2945 }
2946 }
2947
2948 core.Map toJson() {
2949 var _json = new core.Map();
2950 if (commandLineArguments != null) {
2951 _json["commandLineArguments"] = commandLineArguments;
2952 }
2953 if (exitCode != null) {
2954 _json["exitCode"] = (exitCode).toJson();
2955 }
2956 if (toolLogs != null) {
2957 _json["toolLogs"] = toolLogs.map((value) => (value).toJson()).toList();
2958 }
2959 if (toolOutputs != null) {
2960 _json["toolOutputs"] = toolOutputs.map((value) => (value).toJson()).toList ();
2961 }
2962 return _json;
2963 }
2964 }
2965
2966 /**
2967 * Generic tool step to be used for binaries we do not explicitly support. For
2968 * example: running cp to copy artifacts from one location to another.
2969 */
2970 class ToolExecutionStep {
2971 /**
2972 * A Tool execution.
2973 *
2974 * - In response: present if set by create/update request - In create/update
2975 * request: optional
2976 */
2977 ToolExecution toolExecution;
2978
2979 ToolExecutionStep();
2980
2981 ToolExecutionStep.fromJson(core.Map _json) {
2982 if (_json.containsKey("toolExecution")) {
2983 toolExecution = new ToolExecution.fromJson(_json["toolExecution"]);
2984 }
2985 }
2986
2987 core.Map toJson() {
2988 var _json = new core.Map();
2989 if (toolExecution != null) {
2990 _json["toolExecution"] = (toolExecution).toJson();
2991 }
2992 return _json;
2993 }
2994 }
2995
2996 /** Exit code from a tool execution. */
2997 class ToolExitCode {
2998 /**
2999 * Tool execution exit code. A value of 0 means that the execution was
3000 * successful.
3001 *
3002 * - In response: always set - In create/update request: always set
3003 */
3004 core.int number;
3005
3006 ToolExitCode();
3007
3008 ToolExitCode.fromJson(core.Map _json) {
3009 if (_json.containsKey("number")) {
3010 number = _json["number"];
3011 }
3012 }
3013
3014 core.Map toJson() {
3015 var _json = new core.Map();
3016 if (number != null) {
3017 _json["number"] = number;
3018 }
3019 return _json;
3020 }
3021 }
3022
3023 /** A reference to a ToolExecution output file. */
3024 class ToolOutputReference {
3025 /**
3026 * The creation time of the file.
3027 *
3028 * - In response: present if set by create/update request - In create/update
3029 * request: optional
3030 */
3031 Timestamp creationTime;
3032 /**
3033 * A FileReference to an output file.
3034 *
3035 * - In response: always set - In create/update request: always set
3036 */
3037 FileReference output;
3038 /**
3039 * The test case to which this output file belongs.
3040 *
3041 * - In response: present if set by create/update request - In create/update
3042 * request: optional
3043 */
3044 TestCaseReference testCase;
3045
3046 ToolOutputReference();
3047
3048 ToolOutputReference.fromJson(core.Map _json) {
3049 if (_json.containsKey("creationTime")) {
3050 creationTime = new Timestamp.fromJson(_json["creationTime"]);
3051 }
3052 if (_json.containsKey("output")) {
3053 output = new FileReference.fromJson(_json["output"]);
3054 }
3055 if (_json.containsKey("testCase")) {
3056 testCase = new TestCaseReference.fromJson(_json["testCase"]);
3057 }
3058 }
3059
3060 core.Map toJson() {
3061 var _json = new core.Map();
3062 if (creationTime != null) {
3063 _json["creationTime"] = (creationTime).toJson();
3064 }
3065 if (output != null) {
3066 _json["output"] = (output).toJson();
3067 }
3068 if (testCase != null) {
3069 _json["testCase"] = (testCase).toJson();
3070 }
3071 return _json;
3072 }
3073 }
OLDNEW
« no previous file with comments | « generated/googleapis_beta/lib/sqladmin/v1beta4.dart ('k') | generated/googleapis_beta/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698