OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis_beta.dataflow.v1b3; | 3 library googleapis_beta.dataflow.v1b3; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
8 | 8 |
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
11 | 11 |
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
13 ApiRequestError, DetailedApiRequestError; | 13 ApiRequestError, DetailedApiRequestError; |
14 | 14 |
15 const core.String USER_AGENT = 'dart-api-client dataflow/v1b3'; | 15 const core.String USER_AGENT = 'dart-api-client dataflow/v1b3'; |
16 | 16 |
17 /** Manages Google Cloud Dataflow projects on Google Cloud Platform. */ | 17 /** Manages Google Cloud Dataflow projects on Google Cloud Platform. */ |
18 class DataflowApi { | 18 class DataflowApi { |
19 /** View and manage your data across Google Cloud Platform services */ | 19 /** View and manage your data across Google Cloud Platform services */ |
20 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; | 20 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; |
21 | 21 |
| 22 /** View and manage your Google Compute Engine resources */ |
| 23 static const ComputeScope = "https://www.googleapis.com/auth/compute"; |
| 24 |
22 /** View your email address */ | 25 /** View your email address */ |
23 static const UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.em
ail"; | 26 static const UserinfoEmailScope = "https://www.googleapis.com/auth/userinfo.em
ail"; |
24 | 27 |
25 | 28 |
26 final commons.ApiRequester _requester; | 29 final commons.ApiRequester _requester; |
27 | 30 |
28 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); | 31 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); |
29 | 32 |
30 DataflowApi(http.Client client, {core.String rootUrl: "https://dataflow.google
apis.com/", core.String servicePath: ""}) : | 33 DataflowApi(http.Client client, {core.String rootUrl: "https://dataflow.google
apis.com/", core.String servicePath: ""}) : |
31 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 34 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 104 |
102 /** | 105 /** |
103 * Creates a Cloud Dataflow job. | 106 * Creates a Cloud Dataflow job. |
104 * | 107 * |
105 * [request] - The metadata request object. | 108 * [request] - The metadata request object. |
106 * | 109 * |
107 * Request parameters: | 110 * Request parameters: |
108 * | 111 * |
109 * [projectId] - The ID of the Cloud Platform project that the job belongs to. | 112 * [projectId] - The ID of the Cloud Platform project that the job belongs to. |
110 * | 113 * |
111 * [location] - The location that contains this job. | |
112 * | |
113 * [replaceJobId] - Deprecated. This field is now in the Job message. | |
114 * | |
115 * [view] - The level of information requested in response. | 114 * [view] - The level of information requested in response. |
116 * Possible string values are: | 115 * Possible string values are: |
117 * - "JOB_VIEW_UNKNOWN" : A JOB_VIEW_UNKNOWN. | 116 * - "JOB_VIEW_UNKNOWN" : A JOB_VIEW_UNKNOWN. |
118 * - "JOB_VIEW_SUMMARY" : A JOB_VIEW_SUMMARY. | 117 * - "JOB_VIEW_SUMMARY" : A JOB_VIEW_SUMMARY. |
119 * - "JOB_VIEW_ALL" : A JOB_VIEW_ALL. | 118 * - "JOB_VIEW_ALL" : A JOB_VIEW_ALL. |
120 * - "JOB_VIEW_DESCRIPTION" : A JOB_VIEW_DESCRIPTION. | 119 * - "JOB_VIEW_DESCRIPTION" : A JOB_VIEW_DESCRIPTION. |
121 * | 120 * |
| 121 * [location] - The location that contains this job. |
| 122 * |
| 123 * [replaceJobId] - Deprecated. This field is now in the Job message. |
| 124 * |
122 * Completes with a [Job]. | 125 * Completes with a [Job]. |
123 * | 126 * |
124 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 127 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
125 * error. | 128 * error. |
126 * | 129 * |
127 * If the used [http.Client] completes with an error when making a REST call, | 130 * If the used [http.Client] completes with an error when making a REST call, |
128 * this method will complete with the same error. | 131 * this method will complete with the same error. |
129 */ | 132 */ |
130 async.Future<Job> create(Job request, core.String projectId, {core.String loca
tion, core.String replaceJobId, core.String view}) { | 133 async.Future<Job> create(Job request, core.String projectId, {core.String view
, core.String location, core.String replaceJobId}) { |
131 var _url = null; | 134 var _url = null; |
132 var _queryParams = new core.Map(); | 135 var _queryParams = new core.Map(); |
133 var _uploadMedia = null; | 136 var _uploadMedia = null; |
134 var _uploadOptions = null; | 137 var _uploadOptions = null; |
135 var _downloadOptions = commons.DownloadOptions.Metadata; | 138 var _downloadOptions = commons.DownloadOptions.Metadata; |
136 var _body = null; | 139 var _body = null; |
137 | 140 |
138 if (request != null) { | 141 if (request != null) { |
139 _body = convert.JSON.encode((request).toJson()); | 142 _body = convert.JSON.encode((request).toJson()); |
140 } | 143 } |
141 if (projectId == null) { | 144 if (projectId == null) { |
142 throw new core.ArgumentError("Parameter projectId is required."); | 145 throw new core.ArgumentError("Parameter projectId is required."); |
143 } | 146 } |
| 147 if (view != null) { |
| 148 _queryParams["view"] = [view]; |
| 149 } |
144 if (location != null) { | 150 if (location != null) { |
145 _queryParams["location"] = [location]; | 151 _queryParams["location"] = [location]; |
146 } | 152 } |
147 if (replaceJobId != null) { | 153 if (replaceJobId != null) { |
148 _queryParams["replaceJobId"] = [replaceJobId]; | 154 _queryParams["replaceJobId"] = [replaceJobId]; |
149 } | 155 } |
150 if (view != null) { | |
151 _queryParams["view"] = [view]; | |
152 } | |
153 | 156 |
154 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/jo
bs'; | 157 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/jo
bs'; |
155 | 158 |
156 var _response = _requester.request(_url, | 159 var _response = _requester.request(_url, |
157 "POST", | 160 "POST", |
158 body: _body, | 161 body: _body, |
159 queryParams: _queryParams, | 162 queryParams: _queryParams, |
160 uploadOptions: _uploadOptions, | 163 uploadOptions: _uploadOptions, |
161 uploadMedia: _uploadMedia, | 164 uploadMedia: _uploadMedia, |
162 downloadOptions: _downloadOptions); | 165 downloadOptions: _downloadOptions); |
163 return _response.then((data) => new Job.fromJson(data)); | 166 return _response.then((data) => new Job.fromJson(data)); |
164 } | 167 } |
165 | 168 |
166 /** | 169 /** |
167 * Gets the state of the specified Cloud Dataflow job. | 170 * Gets the state of the specified Cloud Dataflow job. |
168 * | 171 * |
169 * Request parameters: | 172 * Request parameters: |
170 * | 173 * |
171 * [projectId] - The ID of the Cloud Platform project that the job belongs to. | 174 * [projectId] - The ID of the Cloud Platform project that the job belongs to. |
172 * | 175 * |
173 * [jobId] - The job ID. | 176 * [jobId] - The job ID. |
174 * | 177 * |
| 178 * [location] - The location that contains this job. |
| 179 * |
175 * [view] - The level of information requested in response. | 180 * [view] - The level of information requested in response. |
176 * Possible string values are: | 181 * Possible string values are: |
177 * - "JOB_VIEW_UNKNOWN" : A JOB_VIEW_UNKNOWN. | 182 * - "JOB_VIEW_UNKNOWN" : A JOB_VIEW_UNKNOWN. |
178 * - "JOB_VIEW_SUMMARY" : A JOB_VIEW_SUMMARY. | 183 * - "JOB_VIEW_SUMMARY" : A JOB_VIEW_SUMMARY. |
179 * - "JOB_VIEW_ALL" : A JOB_VIEW_ALL. | 184 * - "JOB_VIEW_ALL" : A JOB_VIEW_ALL. |
180 * - "JOB_VIEW_DESCRIPTION" : A JOB_VIEW_DESCRIPTION. | 185 * - "JOB_VIEW_DESCRIPTION" : A JOB_VIEW_DESCRIPTION. |
181 * | 186 * |
182 * [location] - The location that contains this job. | |
183 * | |
184 * Completes with a [Job]. | 187 * Completes with a [Job]. |
185 * | 188 * |
186 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 189 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
187 * error. | 190 * error. |
188 * | 191 * |
189 * If the used [http.Client] completes with an error when making a REST call, | 192 * If the used [http.Client] completes with an error when making a REST call, |
190 * this method will complete with the same error. | 193 * this method will complete with the same error. |
191 */ | 194 */ |
192 async.Future<Job> get(core.String projectId, core.String jobId, {core.String v
iew, core.String location}) { | 195 async.Future<Job> get(core.String projectId, core.String jobId, {core.String l
ocation, core.String view}) { |
193 var _url = null; | 196 var _url = null; |
194 var _queryParams = new core.Map(); | 197 var _queryParams = new core.Map(); |
195 var _uploadMedia = null; | 198 var _uploadMedia = null; |
196 var _uploadOptions = null; | 199 var _uploadOptions = null; |
197 var _downloadOptions = commons.DownloadOptions.Metadata; | 200 var _downloadOptions = commons.DownloadOptions.Metadata; |
198 var _body = null; | 201 var _body = null; |
199 | 202 |
200 if (projectId == null) { | 203 if (projectId == null) { |
201 throw new core.ArgumentError("Parameter projectId is required."); | 204 throw new core.ArgumentError("Parameter projectId is required."); |
202 } | 205 } |
203 if (jobId == null) { | 206 if (jobId == null) { |
204 throw new core.ArgumentError("Parameter jobId is required."); | 207 throw new core.ArgumentError("Parameter jobId is required."); |
205 } | 208 } |
| 209 if (location != null) { |
| 210 _queryParams["location"] = [location]; |
| 211 } |
206 if (view != null) { | 212 if (view != null) { |
207 _queryParams["view"] = [view]; | 213 _queryParams["view"] = [view]; |
208 } | 214 } |
209 if (location != null) { | |
210 _queryParams["location"] = [location]; | |
211 } | |
212 | 215 |
213 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/jo
bs/' + commons.Escaper.ecapeVariable('$jobId'); | 216 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/jo
bs/' + commons.Escaper.ecapeVariable('$jobId'); |
214 | 217 |
215 var _response = _requester.request(_url, | 218 var _response = _requester.request(_url, |
216 "GET", | 219 "GET", |
217 body: _body, | 220 body: _body, |
218 queryParams: _queryParams, | 221 queryParams: _queryParams, |
219 uploadOptions: _uploadOptions, | 222 uploadOptions: _uploadOptions, |
220 uploadMedia: _uploadMedia, | 223 uploadMedia: _uploadMedia, |
221 downloadOptions: _downloadOptions); | 224 downloadOptions: _downloadOptions); |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 | 531 |
529 /** | 532 /** |
530 * Request the job status. | 533 * Request the job status. |
531 * | 534 * |
532 * Request parameters: | 535 * Request parameters: |
533 * | 536 * |
534 * [projectId] - A project id. | 537 * [projectId] - A project id. |
535 * | 538 * |
536 * [jobId] - The job to get messages about. | 539 * [jobId] - The job to get messages about. |
537 * | 540 * |
| 541 * [location] - The location which contains the job specified by job_id. |
| 542 * |
| 543 * [endTime] - Return only messages with timestamps < end_time. The default is |
| 544 * now |
| 545 * (i.e. return up to the latest messages available). |
| 546 * |
| 547 * [startTime] - If specified, return only messages with timestamps >= |
| 548 * start_time. |
| 549 * The default is the job creation time (i.e. beginning of messages). |
| 550 * |
| 551 * [pageToken] - If supplied, this should be the value of next_page_token |
| 552 * returned |
| 553 * by an earlier call. This will cause the next page of results to |
| 554 * be returned. |
| 555 * |
538 * [pageSize] - If specified, determines the maximum number of messages to | 556 * [pageSize] - If specified, determines the maximum number of messages to |
539 * return. If unspecified, the service may choose an appropriate | 557 * return. If unspecified, the service may choose an appropriate |
540 * default, or may return an arbitrarily large number of results. | 558 * default, or may return an arbitrarily large number of results. |
541 * | 559 * |
542 * [minimumImportance] - Filter to only get messages with importance >= level | 560 * [minimumImportance] - Filter to only get messages with importance >= level |
543 * Possible string values are: | 561 * Possible string values are: |
544 * - "JOB_MESSAGE_IMPORTANCE_UNKNOWN" : A JOB_MESSAGE_IMPORTANCE_UNKNOWN. | 562 * - "JOB_MESSAGE_IMPORTANCE_UNKNOWN" : A JOB_MESSAGE_IMPORTANCE_UNKNOWN. |
545 * - "JOB_MESSAGE_DEBUG" : A JOB_MESSAGE_DEBUG. | 563 * - "JOB_MESSAGE_DEBUG" : A JOB_MESSAGE_DEBUG. |
546 * - "JOB_MESSAGE_DETAILED" : A JOB_MESSAGE_DETAILED. | 564 * - "JOB_MESSAGE_DETAILED" : A JOB_MESSAGE_DETAILED. |
547 * - "JOB_MESSAGE_BASIC" : A JOB_MESSAGE_BASIC. | 565 * - "JOB_MESSAGE_BASIC" : A JOB_MESSAGE_BASIC. |
548 * - "JOB_MESSAGE_WARNING" : A JOB_MESSAGE_WARNING. | 566 * - "JOB_MESSAGE_WARNING" : A JOB_MESSAGE_WARNING. |
549 * - "JOB_MESSAGE_ERROR" : A JOB_MESSAGE_ERROR. | 567 * - "JOB_MESSAGE_ERROR" : A JOB_MESSAGE_ERROR. |
550 * | 568 * |
551 * [endTime] - Return only messages with timestamps < end_time. The default is | |
552 * now | |
553 * (i.e. return up to the latest messages available). | |
554 * | |
555 * [location] - The location which contains the job specified by job_id. | |
556 * | |
557 * [pageToken] - If supplied, this should be the value of next_page_token | |
558 * returned | |
559 * by an earlier call. This will cause the next page of results to | |
560 * be returned. | |
561 * | |
562 * [startTime] - If specified, return only messages with timestamps >= | |
563 * start_time. | |
564 * The default is the job creation time (i.e. beginning of messages). | |
565 * | |
566 * Completes with a [ListJobMessagesResponse]. | 569 * Completes with a [ListJobMessagesResponse]. |
567 * | 570 * |
568 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 571 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
569 * error. | 572 * error. |
570 * | 573 * |
571 * If the used [http.Client] completes with an error when making a REST call, | 574 * If the used [http.Client] completes with an error when making a REST call, |
572 * this method will complete with the same error. | 575 * this method will complete with the same error. |
573 */ | 576 */ |
574 async.Future<ListJobMessagesResponse> list(core.String projectId, core.String
jobId, {core.int pageSize, core.String minimumImportance, core.String endTime, c
ore.String location, core.String pageToken, core.String startTime}) { | 577 async.Future<ListJobMessagesResponse> list(core.String projectId, core.String
jobId, {core.String location, core.String endTime, core.String startTime, core.S
tring pageToken, core.int pageSize, core.String minimumImportance}) { |
575 var _url = null; | 578 var _url = null; |
576 var _queryParams = new core.Map(); | 579 var _queryParams = new core.Map(); |
577 var _uploadMedia = null; | 580 var _uploadMedia = null; |
578 var _uploadOptions = null; | 581 var _uploadOptions = null; |
579 var _downloadOptions = commons.DownloadOptions.Metadata; | 582 var _downloadOptions = commons.DownloadOptions.Metadata; |
580 var _body = null; | 583 var _body = null; |
581 | 584 |
582 if (projectId == null) { | 585 if (projectId == null) { |
583 throw new core.ArgumentError("Parameter projectId is required."); | 586 throw new core.ArgumentError("Parameter projectId is required."); |
584 } | 587 } |
585 if (jobId == null) { | 588 if (jobId == null) { |
586 throw new core.ArgumentError("Parameter jobId is required."); | 589 throw new core.ArgumentError("Parameter jobId is required."); |
587 } | 590 } |
| 591 if (location != null) { |
| 592 _queryParams["location"] = [location]; |
| 593 } |
| 594 if (endTime != null) { |
| 595 _queryParams["endTime"] = [endTime]; |
| 596 } |
| 597 if (startTime != null) { |
| 598 _queryParams["startTime"] = [startTime]; |
| 599 } |
| 600 if (pageToken != null) { |
| 601 _queryParams["pageToken"] = [pageToken]; |
| 602 } |
588 if (pageSize != null) { | 603 if (pageSize != null) { |
589 _queryParams["pageSize"] = ["${pageSize}"]; | 604 _queryParams["pageSize"] = ["${pageSize}"]; |
590 } | 605 } |
591 if (minimumImportance != null) { | 606 if (minimumImportance != null) { |
592 _queryParams["minimumImportance"] = [minimumImportance]; | 607 _queryParams["minimumImportance"] = [minimumImportance]; |
593 } | 608 } |
594 if (endTime != null) { | |
595 _queryParams["endTime"] = [endTime]; | |
596 } | |
597 if (location != null) { | |
598 _queryParams["location"] = [location]; | |
599 } | |
600 if (pageToken != null) { | |
601 _queryParams["pageToken"] = [pageToken]; | |
602 } | |
603 if (startTime != null) { | |
604 _queryParams["startTime"] = [startTime]; | |
605 } | |
606 | 609 |
607 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/jo
bs/' + commons.Escaper.ecapeVariable('$jobId') + '/messages'; | 610 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/jo
bs/' + commons.Escaper.ecapeVariable('$jobId') + '/messages'; |
608 | 611 |
609 var _response = _requester.request(_url, | 612 var _response = _requester.request(_url, |
610 "GET", | 613 "GET", |
611 body: _body, | 614 body: _body, |
612 queryParams: _queryParams, | 615 queryParams: _queryParams, |
613 uploadOptions: _uploadOptions, | 616 uploadOptions: _uploadOptions, |
614 uploadMedia: _uploadMedia, | 617 uploadMedia: _uploadMedia, |
615 downloadOptions: _downloadOptions); | 618 downloadOptions: _downloadOptions); |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 return _response.then((data) => new ReportWorkItemStatusResponse.fromJson(da
ta)); | 726 return _response.then((data) => new ReportWorkItemStatusResponse.fromJson(da
ta)); |
724 } | 727 } |
725 | 728 |
726 } | 729 } |
727 | 730 |
728 | 731 |
729 class ProjectsLocationsResourceApi { | 732 class ProjectsLocationsResourceApi { |
730 final commons.ApiRequester _requester; | 733 final commons.ApiRequester _requester; |
731 | 734 |
732 ProjectsLocationsJobsResourceApi get jobs => new ProjectsLocationsJobsResource
Api(_requester); | 735 ProjectsLocationsJobsResourceApi get jobs => new ProjectsLocationsJobsResource
Api(_requester); |
| 736 ProjectsLocationsTemplatesResourceApi get templates => new ProjectsLocationsTe
mplatesResourceApi(_requester); |
733 | 737 |
734 ProjectsLocationsResourceApi(commons.ApiRequester client) : | 738 ProjectsLocationsResourceApi(commons.ApiRequester client) : |
735 _requester = client; | 739 _requester = client; |
| 740 |
| 741 /** |
| 742 * Send a worker_message to the service. |
| 743 * |
| 744 * [request] - The metadata request object. |
| 745 * |
| 746 * Request parameters: |
| 747 * |
| 748 * [projectId] - The project to send the WorkerMessages to. |
| 749 * |
| 750 * [location] - The location which contains the job |
| 751 * |
| 752 * Completes with a [SendWorkerMessagesResponse]. |
| 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<SendWorkerMessagesResponse> workerMessages(SendWorkerMessagesRequ
est request, core.String projectId, core.String location) { |
| 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 (request != null) { |
| 769 _body = convert.JSON.encode((request).toJson()); |
| 770 } |
| 771 if (projectId == null) { |
| 772 throw new core.ArgumentError("Parameter projectId is required."); |
| 773 } |
| 774 if (location == null) { |
| 775 throw new core.ArgumentError("Parameter location is required."); |
| 776 } |
| 777 |
| 778 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/lo
cations/' + commons.Escaper.ecapeVariable('$location') + '/WorkerMessages'; |
| 779 |
| 780 var _response = _requester.request(_url, |
| 781 "POST", |
| 782 body: _body, |
| 783 queryParams: _queryParams, |
| 784 uploadOptions: _uploadOptions, |
| 785 uploadMedia: _uploadMedia, |
| 786 downloadOptions: _downloadOptions); |
| 787 return _response.then((data) => new SendWorkerMessagesResponse.fromJson(data
)); |
| 788 } |
| 789 |
736 } | 790 } |
737 | 791 |
738 | 792 |
739 class ProjectsLocationsJobsResourceApi { | 793 class ProjectsLocationsJobsResourceApi { |
740 final commons.ApiRequester _requester; | 794 final commons.ApiRequester _requester; |
741 | 795 |
| 796 ProjectsLocationsJobsDebugResourceApi get debug => new ProjectsLocationsJobsDe
bugResourceApi(_requester); |
742 ProjectsLocationsJobsMessagesResourceApi get messages => new ProjectsLocations
JobsMessagesResourceApi(_requester); | 797 ProjectsLocationsJobsMessagesResourceApi get messages => new ProjectsLocations
JobsMessagesResourceApi(_requester); |
743 ProjectsLocationsJobsWorkItemsResourceApi get workItems => new ProjectsLocatio
nsJobsWorkItemsResourceApi(_requester); | 798 ProjectsLocationsJobsWorkItemsResourceApi get workItems => new ProjectsLocatio
nsJobsWorkItemsResourceApi(_requester); |
744 | 799 |
745 ProjectsLocationsJobsResourceApi(commons.ApiRequester client) : | 800 ProjectsLocationsJobsResourceApi(commons.ApiRequester client) : |
746 _requester = client; | 801 _requester = client; |
747 | 802 |
748 /** | 803 /** |
749 * Creates a Cloud Dataflow job. | 804 * Creates a Cloud Dataflow job. |
750 * | 805 * |
751 * [request] - The metadata request object. | 806 * [request] - The metadata request object. |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
925 | 980 |
926 /** | 981 /** |
927 * List the jobs of a project. | 982 * List the jobs of a project. |
928 * | 983 * |
929 * Request parameters: | 984 * Request parameters: |
930 * | 985 * |
931 * [projectId] - The project which owns the jobs. | 986 * [projectId] - The project which owns the jobs. |
932 * | 987 * |
933 * [location] - The location that contains this job. | 988 * [location] - The location that contains this job. |
934 * | 989 * |
| 990 * [filter] - The kind of filter to use. |
| 991 * Possible string values are: |
| 992 * - "UNKNOWN" : A UNKNOWN. |
| 993 * - "ALL" : A ALL. |
| 994 * - "TERMINATED" : A TERMINATED. |
| 995 * - "ACTIVE" : A ACTIVE. |
| 996 * |
| 997 * [pageToken] - Set this to the 'next_page_token' field of a previous |
| 998 * response |
| 999 * to request additional results in a long list. |
| 1000 * |
935 * [pageSize] - If there are many jobs, limit response to at most this many. | 1001 * [pageSize] - If there are many jobs, limit response to at most this many. |
936 * The actual number of jobs returned will be the lesser of max_responses | 1002 * The actual number of jobs returned will be the lesser of max_responses |
937 * and an unspecified server-defined limit. | 1003 * and an unspecified server-defined limit. |
938 * | 1004 * |
939 * [view] - Level of information requested in response. Default is | 1005 * [view] - Level of information requested in response. Default is |
940 * `JOB_VIEW_SUMMARY`. | 1006 * `JOB_VIEW_SUMMARY`. |
941 * Possible string values are: | 1007 * Possible string values are: |
942 * - "JOB_VIEW_UNKNOWN" : A JOB_VIEW_UNKNOWN. | 1008 * - "JOB_VIEW_UNKNOWN" : A JOB_VIEW_UNKNOWN. |
943 * - "JOB_VIEW_SUMMARY" : A JOB_VIEW_SUMMARY. | 1009 * - "JOB_VIEW_SUMMARY" : A JOB_VIEW_SUMMARY. |
944 * - "JOB_VIEW_ALL" : A JOB_VIEW_ALL. | 1010 * - "JOB_VIEW_ALL" : A JOB_VIEW_ALL. |
945 * - "JOB_VIEW_DESCRIPTION" : A JOB_VIEW_DESCRIPTION. | 1011 * - "JOB_VIEW_DESCRIPTION" : A JOB_VIEW_DESCRIPTION. |
946 * | 1012 * |
947 * [filter] - The kind of filter to use. | |
948 * Possible string values are: | |
949 * - "UNKNOWN" : A UNKNOWN. | |
950 * - "ALL" : A ALL. | |
951 * - "TERMINATED" : A TERMINATED. | |
952 * - "ACTIVE" : A ACTIVE. | |
953 * | |
954 * [pageToken] - Set this to the 'next_page_token' field of a previous | |
955 * response | |
956 * to request additional results in a long list. | |
957 * | |
958 * Completes with a [ListJobsResponse]. | 1013 * Completes with a [ListJobsResponse]. |
959 * | 1014 * |
960 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1015 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
961 * error. | 1016 * error. |
962 * | 1017 * |
963 * If the used [http.Client] completes with an error when making a REST call, | 1018 * If the used [http.Client] completes with an error when making a REST call, |
964 * this method will complete with the same error. | 1019 * this method will complete with the same error. |
965 */ | 1020 */ |
966 async.Future<ListJobsResponse> list(core.String projectId, core.String locatio
n, {core.int pageSize, core.String view, core.String filter, core.String pageTok
en}) { | 1021 async.Future<ListJobsResponse> list(core.String projectId, core.String locatio
n, {core.String filter, core.String pageToken, core.int pageSize, core.String vi
ew}) { |
967 var _url = null; | 1022 var _url = null; |
968 var _queryParams = new core.Map(); | 1023 var _queryParams = new core.Map(); |
969 var _uploadMedia = null; | 1024 var _uploadMedia = null; |
970 var _uploadOptions = null; | 1025 var _uploadOptions = null; |
971 var _downloadOptions = commons.DownloadOptions.Metadata; | 1026 var _downloadOptions = commons.DownloadOptions.Metadata; |
972 var _body = null; | 1027 var _body = null; |
973 | 1028 |
974 if (projectId == null) { | 1029 if (projectId == null) { |
975 throw new core.ArgumentError("Parameter projectId is required."); | 1030 throw new core.ArgumentError("Parameter projectId is required."); |
976 } | 1031 } |
977 if (location == null) { | 1032 if (location == null) { |
978 throw new core.ArgumentError("Parameter location is required."); | 1033 throw new core.ArgumentError("Parameter location is required."); |
979 } | 1034 } |
| 1035 if (filter != null) { |
| 1036 _queryParams["filter"] = [filter]; |
| 1037 } |
| 1038 if (pageToken != null) { |
| 1039 _queryParams["pageToken"] = [pageToken]; |
| 1040 } |
980 if (pageSize != null) { | 1041 if (pageSize != null) { |
981 _queryParams["pageSize"] = ["${pageSize}"]; | 1042 _queryParams["pageSize"] = ["${pageSize}"]; |
982 } | 1043 } |
983 if (view != null) { | 1044 if (view != null) { |
984 _queryParams["view"] = [view]; | 1045 _queryParams["view"] = [view]; |
985 } | 1046 } |
986 if (filter != null) { | |
987 _queryParams["filter"] = [filter]; | |
988 } | |
989 if (pageToken != null) { | |
990 _queryParams["pageToken"] = [pageToken]; | |
991 } | |
992 | 1047 |
993 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/lo
cations/' + commons.Escaper.ecapeVariable('$location') + '/jobs'; | 1048 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/lo
cations/' + commons.Escaper.ecapeVariable('$location') + '/jobs'; |
994 | 1049 |
995 var _response = _requester.request(_url, | 1050 var _response = _requester.request(_url, |
996 "GET", | 1051 "GET", |
997 body: _body, | 1052 body: _body, |
998 queryParams: _queryParams, | 1053 queryParams: _queryParams, |
999 uploadOptions: _uploadOptions, | 1054 uploadOptions: _uploadOptions, |
1000 uploadMedia: _uploadMedia, | 1055 uploadMedia: _uploadMedia, |
1001 downloadOptions: _downloadOptions); | 1056 downloadOptions: _downloadOptions); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1052 queryParams: _queryParams, | 1107 queryParams: _queryParams, |
1053 uploadOptions: _uploadOptions, | 1108 uploadOptions: _uploadOptions, |
1054 uploadMedia: _uploadMedia, | 1109 uploadMedia: _uploadMedia, |
1055 downloadOptions: _downloadOptions); | 1110 downloadOptions: _downloadOptions); |
1056 return _response.then((data) => new Job.fromJson(data)); | 1111 return _response.then((data) => new Job.fromJson(data)); |
1057 } | 1112 } |
1058 | 1113 |
1059 } | 1114 } |
1060 | 1115 |
1061 | 1116 |
| 1117 class ProjectsLocationsJobsDebugResourceApi { |
| 1118 final commons.ApiRequester _requester; |
| 1119 |
| 1120 ProjectsLocationsJobsDebugResourceApi(commons.ApiRequester client) : |
| 1121 _requester = client; |
| 1122 |
| 1123 /** |
| 1124 * Get encoded debug configuration for component. Not cacheable. |
| 1125 * |
| 1126 * [request] - The metadata request object. |
| 1127 * |
| 1128 * Request parameters: |
| 1129 * |
| 1130 * [projectId] - The project id. |
| 1131 * |
| 1132 * [location] - The location which contains the job specified by job_id. |
| 1133 * |
| 1134 * [jobId] - The job id. |
| 1135 * |
| 1136 * Completes with a [GetDebugConfigResponse]. |
| 1137 * |
| 1138 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1139 * error. |
| 1140 * |
| 1141 * If the used [http.Client] completes with an error when making a REST call, |
| 1142 * this method will complete with the same error. |
| 1143 */ |
| 1144 async.Future<GetDebugConfigResponse> getConfig(GetDebugConfigRequest request,
core.String projectId, core.String location, core.String jobId) { |
| 1145 var _url = null; |
| 1146 var _queryParams = new core.Map(); |
| 1147 var _uploadMedia = null; |
| 1148 var _uploadOptions = null; |
| 1149 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1150 var _body = null; |
| 1151 |
| 1152 if (request != null) { |
| 1153 _body = convert.JSON.encode((request).toJson()); |
| 1154 } |
| 1155 if (projectId == null) { |
| 1156 throw new core.ArgumentError("Parameter projectId is required."); |
| 1157 } |
| 1158 if (location == null) { |
| 1159 throw new core.ArgumentError("Parameter location is required."); |
| 1160 } |
| 1161 if (jobId == null) { |
| 1162 throw new core.ArgumentError("Parameter jobId is required."); |
| 1163 } |
| 1164 |
| 1165 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/lo
cations/' + commons.Escaper.ecapeVariable('$location') + '/jobs/' + commons.Esca
per.ecapeVariable('$jobId') + '/debug/getConfig'; |
| 1166 |
| 1167 var _response = _requester.request(_url, |
| 1168 "POST", |
| 1169 body: _body, |
| 1170 queryParams: _queryParams, |
| 1171 uploadOptions: _uploadOptions, |
| 1172 uploadMedia: _uploadMedia, |
| 1173 downloadOptions: _downloadOptions); |
| 1174 return _response.then((data) => new GetDebugConfigResponse.fromJson(data)); |
| 1175 } |
| 1176 |
| 1177 /** |
| 1178 * Send encoded debug capture data for component. |
| 1179 * |
| 1180 * [request] - The metadata request object. |
| 1181 * |
| 1182 * Request parameters: |
| 1183 * |
| 1184 * [projectId] - The project id. |
| 1185 * |
| 1186 * [location] - The location which contains the job specified by job_id. |
| 1187 * |
| 1188 * [jobId] - The job id. |
| 1189 * |
| 1190 * Completes with a [SendDebugCaptureResponse]. |
| 1191 * |
| 1192 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1193 * error. |
| 1194 * |
| 1195 * If the used [http.Client] completes with an error when making a REST call, |
| 1196 * this method will complete with the same error. |
| 1197 */ |
| 1198 async.Future<SendDebugCaptureResponse> sendCapture(SendDebugCaptureRequest req
uest, core.String projectId, core.String location, core.String jobId) { |
| 1199 var _url = null; |
| 1200 var _queryParams = new core.Map(); |
| 1201 var _uploadMedia = null; |
| 1202 var _uploadOptions = null; |
| 1203 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1204 var _body = null; |
| 1205 |
| 1206 if (request != null) { |
| 1207 _body = convert.JSON.encode((request).toJson()); |
| 1208 } |
| 1209 if (projectId == null) { |
| 1210 throw new core.ArgumentError("Parameter projectId is required."); |
| 1211 } |
| 1212 if (location == null) { |
| 1213 throw new core.ArgumentError("Parameter location is required."); |
| 1214 } |
| 1215 if (jobId == null) { |
| 1216 throw new core.ArgumentError("Parameter jobId is required."); |
| 1217 } |
| 1218 |
| 1219 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/lo
cations/' + commons.Escaper.ecapeVariable('$location') + '/jobs/' + commons.Esca
per.ecapeVariable('$jobId') + '/debug/sendCapture'; |
| 1220 |
| 1221 var _response = _requester.request(_url, |
| 1222 "POST", |
| 1223 body: _body, |
| 1224 queryParams: _queryParams, |
| 1225 uploadOptions: _uploadOptions, |
| 1226 uploadMedia: _uploadMedia, |
| 1227 downloadOptions: _downloadOptions); |
| 1228 return _response.then((data) => new SendDebugCaptureResponse.fromJson(data))
; |
| 1229 } |
| 1230 |
| 1231 } |
| 1232 |
| 1233 |
1062 class ProjectsLocationsJobsMessagesResourceApi { | 1234 class ProjectsLocationsJobsMessagesResourceApi { |
1063 final commons.ApiRequester _requester; | 1235 final commons.ApiRequester _requester; |
1064 | 1236 |
1065 ProjectsLocationsJobsMessagesResourceApi(commons.ApiRequester client) : | 1237 ProjectsLocationsJobsMessagesResourceApi(commons.ApiRequester client) : |
1066 _requester = client; | 1238 _requester = client; |
1067 | 1239 |
1068 /** | 1240 /** |
1069 * Request the job status. | 1241 * Request the job status. |
1070 * | 1242 * |
1071 * Request parameters: | 1243 * Request parameters: |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1174 * [projectId] - Identifies the project this worker belongs to. | 1346 * [projectId] - Identifies the project this worker belongs to. |
1175 * | 1347 * |
1176 * [location] - The location which contains the WorkItem's job. | 1348 * [location] - The location which contains the WorkItem's job. |
1177 * | 1349 * |
1178 * [jobId] - Identifies the workflow job this worker belongs to. | 1350 * [jobId] - Identifies the workflow job this worker belongs to. |
1179 * | 1351 * |
1180 * Completes with a [LeaseWorkItemResponse]. | 1352 * Completes with a [LeaseWorkItemResponse]. |
1181 * | 1353 * |
1182 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1354 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1183 * error. | 1355 * error. |
| 1356 * |
| 1357 * If the used [http.Client] completes with an error when making a REST call, |
| 1358 * this method will complete with the same error. |
| 1359 */ |
| 1360 async.Future<LeaseWorkItemResponse> lease(LeaseWorkItemRequest request, core.S
tring projectId, core.String location, core.String jobId) { |
| 1361 var _url = null; |
| 1362 var _queryParams = new core.Map(); |
| 1363 var _uploadMedia = null; |
| 1364 var _uploadOptions = null; |
| 1365 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1366 var _body = null; |
| 1367 |
| 1368 if (request != null) { |
| 1369 _body = convert.JSON.encode((request).toJson()); |
| 1370 } |
| 1371 if (projectId == null) { |
| 1372 throw new core.ArgumentError("Parameter projectId is required."); |
| 1373 } |
| 1374 if (location == null) { |
| 1375 throw new core.ArgumentError("Parameter location is required."); |
| 1376 } |
| 1377 if (jobId == null) { |
| 1378 throw new core.ArgumentError("Parameter jobId is required."); |
| 1379 } |
| 1380 |
| 1381 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/lo
cations/' + commons.Escaper.ecapeVariable('$location') + '/jobs/' + commons.Esca
per.ecapeVariable('$jobId') + '/workItems:lease'; |
| 1382 |
| 1383 var _response = _requester.request(_url, |
| 1384 "POST", |
| 1385 body: _body, |
| 1386 queryParams: _queryParams, |
| 1387 uploadOptions: _uploadOptions, |
| 1388 uploadMedia: _uploadMedia, |
| 1389 downloadOptions: _downloadOptions); |
| 1390 return _response.then((data) => new LeaseWorkItemResponse.fromJson(data)); |
| 1391 } |
| 1392 |
| 1393 /** |
| 1394 * Reports the status of dataflow WorkItems leased by a worker. |
| 1395 * |
| 1396 * [request] - The metadata request object. |
| 1397 * |
| 1398 * Request parameters: |
| 1399 * |
| 1400 * [projectId] - The project which owns the WorkItem's job. |
| 1401 * |
| 1402 * [location] - The location which contains the WorkItem's job. |
| 1403 * |
| 1404 * [jobId] - The job which the WorkItem is part of. |
| 1405 * |
| 1406 * Completes with a [ReportWorkItemStatusResponse]. |
| 1407 * |
| 1408 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1409 * error. |
| 1410 * |
| 1411 * If the used [http.Client] completes with an error when making a REST call, |
| 1412 * this method will complete with the same error. |
| 1413 */ |
| 1414 async.Future<ReportWorkItemStatusResponse> reportStatus(ReportWorkItemStatusRe
quest request, core.String projectId, core.String location, core.String jobId) { |
| 1415 var _url = null; |
| 1416 var _queryParams = new core.Map(); |
| 1417 var _uploadMedia = null; |
| 1418 var _uploadOptions = null; |
| 1419 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1420 var _body = null; |
| 1421 |
| 1422 if (request != null) { |
| 1423 _body = convert.JSON.encode((request).toJson()); |
| 1424 } |
| 1425 if (projectId == null) { |
| 1426 throw new core.ArgumentError("Parameter projectId is required."); |
| 1427 } |
| 1428 if (location == null) { |
| 1429 throw new core.ArgumentError("Parameter location is required."); |
| 1430 } |
| 1431 if (jobId == null) { |
| 1432 throw new core.ArgumentError("Parameter jobId is required."); |
| 1433 } |
| 1434 |
| 1435 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/lo
cations/' + commons.Escaper.ecapeVariable('$location') + '/jobs/' + commons.Esca
per.ecapeVariable('$jobId') + '/workItems:reportStatus'; |
| 1436 |
| 1437 var _response = _requester.request(_url, |
| 1438 "POST", |
| 1439 body: _body, |
| 1440 queryParams: _queryParams, |
| 1441 uploadOptions: _uploadOptions, |
| 1442 uploadMedia: _uploadMedia, |
| 1443 downloadOptions: _downloadOptions); |
| 1444 return _response.then((data) => new ReportWorkItemStatusResponse.fromJson(da
ta)); |
| 1445 } |
| 1446 |
| 1447 } |
| 1448 |
| 1449 |
| 1450 class ProjectsLocationsTemplatesResourceApi { |
| 1451 final commons.ApiRequester _requester; |
| 1452 |
| 1453 ProjectsLocationsTemplatesResourceApi(commons.ApiRequester client) : |
| 1454 _requester = client; |
| 1455 |
| 1456 /** |
| 1457 * Creates a Cloud Dataflow job from a template. |
| 1458 * |
| 1459 * [request] - The metadata request object. |
| 1460 * |
| 1461 * Request parameters: |
| 1462 * |
| 1463 * [projectId] - Required. The ID of the Cloud Platform project that the job |
| 1464 * belongs to. |
| 1465 * |
| 1466 * [location] - The location to which to direct the request. |
| 1467 * |
| 1468 * Completes with a [Job]. |
| 1469 * |
| 1470 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1471 * error. |
| 1472 * |
| 1473 * If the used [http.Client] completes with an error when making a REST call, |
| 1474 * this method will complete with the same error. |
| 1475 */ |
| 1476 async.Future<Job> create(CreateJobFromTemplateRequest request, core.String pro
jectId, core.String location) { |
| 1477 var _url = null; |
| 1478 var _queryParams = new core.Map(); |
| 1479 var _uploadMedia = null; |
| 1480 var _uploadOptions = null; |
| 1481 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1482 var _body = null; |
| 1483 |
| 1484 if (request != null) { |
| 1485 _body = convert.JSON.encode((request).toJson()); |
| 1486 } |
| 1487 if (projectId == null) { |
| 1488 throw new core.ArgumentError("Parameter projectId is required."); |
| 1489 } |
| 1490 if (location == null) { |
| 1491 throw new core.ArgumentError("Parameter location is required."); |
| 1492 } |
| 1493 |
| 1494 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/lo
cations/' + commons.Escaper.ecapeVariable('$location') + '/templates'; |
| 1495 |
| 1496 var _response = _requester.request(_url, |
| 1497 "POST", |
| 1498 body: _body, |
| 1499 queryParams: _queryParams, |
| 1500 uploadOptions: _uploadOptions, |
| 1501 uploadMedia: _uploadMedia, |
| 1502 downloadOptions: _downloadOptions); |
| 1503 return _response.then((data) => new Job.fromJson(data)); |
| 1504 } |
| 1505 |
| 1506 /** |
| 1507 * Get the template associated with a template. |
| 1508 * |
| 1509 * Request parameters: |
| 1510 * |
| 1511 * [projectId] - Required. The ID of the Cloud Platform project that the job |
| 1512 * belongs to. |
| 1513 * |
| 1514 * [location] - The location to which to direct the request. |
| 1515 * |
| 1516 * [view] - The view to retrieve. Defaults to METADATA_ONLY. |
| 1517 * Possible string values are: |
| 1518 * - "METADATA_ONLY" : A METADATA_ONLY. |
| 1519 * |
| 1520 * [gcsPath] - Required. A Cloud Storage path to the template from which to |
| 1521 * create the job. |
| 1522 * Must be a valid Cloud Storage URL, beginning with `gs://`. |
| 1523 * |
| 1524 * Completes with a [GetTemplateResponse]. |
| 1525 * |
| 1526 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1527 * error. |
1184 * | 1528 * |
1185 * If the used [http.Client] completes with an error when making a REST call, | 1529 * If the used [http.Client] completes with an error when making a REST call, |
1186 * this method will complete with the same error. | 1530 * this method will complete with the same error. |
1187 */ | 1531 */ |
1188 async.Future<LeaseWorkItemResponse> lease(LeaseWorkItemRequest request, core.S
tring projectId, core.String location, core.String jobId) { | 1532 async.Future<GetTemplateResponse> get(core.String projectId, core.String locat
ion, {core.String view, core.String gcsPath}) { |
1189 var _url = null; | 1533 var _url = null; |
1190 var _queryParams = new core.Map(); | 1534 var _queryParams = new core.Map(); |
1191 var _uploadMedia = null; | 1535 var _uploadMedia = null; |
1192 var _uploadOptions = null; | 1536 var _uploadOptions = null; |
1193 var _downloadOptions = commons.DownloadOptions.Metadata; | 1537 var _downloadOptions = commons.DownloadOptions.Metadata; |
1194 var _body = null; | 1538 var _body = null; |
1195 | 1539 |
1196 if (request != null) { | |
1197 _body = convert.JSON.encode((request).toJson()); | |
1198 } | |
1199 if (projectId == null) { | 1540 if (projectId == null) { |
1200 throw new core.ArgumentError("Parameter projectId is required."); | 1541 throw new core.ArgumentError("Parameter projectId is required."); |
1201 } | 1542 } |
1202 if (location == null) { | 1543 if (location == null) { |
1203 throw new core.ArgumentError("Parameter location is required."); | 1544 throw new core.ArgumentError("Parameter location is required."); |
1204 } | 1545 } |
1205 if (jobId == null) { | 1546 if (view != null) { |
1206 throw new core.ArgumentError("Parameter jobId is required."); | 1547 _queryParams["view"] = [view]; |
| 1548 } |
| 1549 if (gcsPath != null) { |
| 1550 _queryParams["gcsPath"] = [gcsPath]; |
1207 } | 1551 } |
1208 | 1552 |
1209 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/lo
cations/' + commons.Escaper.ecapeVariable('$location') + '/jobs/' + commons.Esca
per.ecapeVariable('$jobId') + '/workItems:lease'; | 1553 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/lo
cations/' + commons.Escaper.ecapeVariable('$location') + '/templates:get'; |
1210 | 1554 |
1211 var _response = _requester.request(_url, | 1555 var _response = _requester.request(_url, |
1212 "POST", | 1556 "GET", |
1213 body: _body, | 1557 body: _body, |
1214 queryParams: _queryParams, | 1558 queryParams: _queryParams, |
1215 uploadOptions: _uploadOptions, | 1559 uploadOptions: _uploadOptions, |
1216 uploadMedia: _uploadMedia, | 1560 uploadMedia: _uploadMedia, |
1217 downloadOptions: _downloadOptions); | 1561 downloadOptions: _downloadOptions); |
1218 return _response.then((data) => new LeaseWorkItemResponse.fromJson(data)); | 1562 return _response.then((data) => new GetTemplateResponse.fromJson(data)); |
1219 } | 1563 } |
1220 | 1564 |
1221 /** | 1565 /** |
1222 * Reports the status of dataflow WorkItems leased by a worker. | 1566 * Launch a template. |
1223 * | 1567 * |
1224 * [request] - The metadata request object. | 1568 * [request] - The metadata request object. |
1225 * | 1569 * |
1226 * Request parameters: | 1570 * Request parameters: |
1227 * | 1571 * |
1228 * [projectId] - The project which owns the WorkItem's job. | 1572 * [projectId] - Required. The ID of the Cloud Platform project that the job |
| 1573 * belongs to. |
1229 * | 1574 * |
1230 * [location] - The location which contains the WorkItem's job. | 1575 * [location] - The location to which to direct the request. |
1231 * | 1576 * |
1232 * [jobId] - The job which the WorkItem is part of. | 1577 * [gcsPath] - Required. A Cloud Storage path to the template from which to |
| 1578 * create |
| 1579 * the job. |
| 1580 * Must be valid Cloud Storage URL, beginning with 'gs://'. |
1233 * | 1581 * |
1234 * Completes with a [ReportWorkItemStatusResponse]. | 1582 * [dryRun] - Whether or not the job should actually be executed after |
| 1583 * validating parameters. Defaults to false. Validation errors do |
| 1584 * not cause the HTTP request to fail if true. |
| 1585 * |
| 1586 * Completes with a [LaunchTemplateResponse]. |
1235 * | 1587 * |
1236 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1588 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1237 * error. | 1589 * error. |
1238 * | 1590 * |
1239 * If the used [http.Client] completes with an error when making a REST call, | 1591 * If the used [http.Client] completes with an error when making a REST call, |
1240 * this method will complete with the same error. | 1592 * this method will complete with the same error. |
1241 */ | 1593 */ |
1242 async.Future<ReportWorkItemStatusResponse> reportStatus(ReportWorkItemStatusRe
quest request, core.String projectId, core.String location, core.String jobId) { | 1594 async.Future<LaunchTemplateResponse> launch(LaunchTemplateParameters request,
core.String projectId, core.String location, {core.String gcsPath, core.bool dry
Run}) { |
1243 var _url = null; | 1595 var _url = null; |
1244 var _queryParams = new core.Map(); | 1596 var _queryParams = new core.Map(); |
1245 var _uploadMedia = null; | 1597 var _uploadMedia = null; |
1246 var _uploadOptions = null; | 1598 var _uploadOptions = null; |
1247 var _downloadOptions = commons.DownloadOptions.Metadata; | 1599 var _downloadOptions = commons.DownloadOptions.Metadata; |
1248 var _body = null; | 1600 var _body = null; |
1249 | 1601 |
1250 if (request != null) { | 1602 if (request != null) { |
1251 _body = convert.JSON.encode((request).toJson()); | 1603 _body = convert.JSON.encode((request).toJson()); |
1252 } | 1604 } |
1253 if (projectId == null) { | 1605 if (projectId == null) { |
1254 throw new core.ArgumentError("Parameter projectId is required."); | 1606 throw new core.ArgumentError("Parameter projectId is required."); |
1255 } | 1607 } |
1256 if (location == null) { | 1608 if (location == null) { |
1257 throw new core.ArgumentError("Parameter location is required."); | 1609 throw new core.ArgumentError("Parameter location is required."); |
1258 } | 1610 } |
1259 if (jobId == null) { | 1611 if (gcsPath != null) { |
1260 throw new core.ArgumentError("Parameter jobId is required."); | 1612 _queryParams["gcsPath"] = [gcsPath]; |
| 1613 } |
| 1614 if (dryRun != null) { |
| 1615 _queryParams["dryRun"] = ["${dryRun}"]; |
1261 } | 1616 } |
1262 | 1617 |
1263 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/lo
cations/' + commons.Escaper.ecapeVariable('$location') + '/jobs/' + commons.Esca
per.ecapeVariable('$jobId') + '/workItems:reportStatus'; | 1618 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/lo
cations/' + commons.Escaper.ecapeVariable('$location') + '/templates:launch'; |
1264 | 1619 |
1265 var _response = _requester.request(_url, | 1620 var _response = _requester.request(_url, |
1266 "POST", | 1621 "POST", |
1267 body: _body, | 1622 body: _body, |
1268 queryParams: _queryParams, | 1623 queryParams: _queryParams, |
1269 uploadOptions: _uploadOptions, | 1624 uploadOptions: _uploadOptions, |
1270 uploadMedia: _uploadMedia, | 1625 uploadMedia: _uploadMedia, |
1271 downloadOptions: _downloadOptions); | 1626 downloadOptions: _downloadOptions); |
1272 return _response.then((data) => new ReportWorkItemStatusResponse.fromJson(da
ta)); | 1627 return _response.then((data) => new LaunchTemplateResponse.fromJson(data)); |
1273 } | 1628 } |
1274 | 1629 |
1275 } | 1630 } |
1276 | 1631 |
1277 | 1632 |
1278 class ProjectsTemplatesResourceApi { | 1633 class ProjectsTemplatesResourceApi { |
1279 final commons.ApiRequester _requester; | 1634 final commons.ApiRequester _requester; |
1280 | 1635 |
1281 ProjectsTemplatesResourceApi(commons.ApiRequester client) : | 1636 ProjectsTemplatesResourceApi(commons.ApiRequester client) : |
1282 _requester = client; | 1637 _requester = client; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1335 * belongs to. | 1690 * belongs to. |
1336 * | 1691 * |
1337 * [view] - The view to retrieve. Defaults to METADATA_ONLY. | 1692 * [view] - The view to retrieve. Defaults to METADATA_ONLY. |
1338 * Possible string values are: | 1693 * Possible string values are: |
1339 * - "METADATA_ONLY" : A METADATA_ONLY. | 1694 * - "METADATA_ONLY" : A METADATA_ONLY. |
1340 * | 1695 * |
1341 * [gcsPath] - Required. A Cloud Storage path to the template from which to | 1696 * [gcsPath] - Required. A Cloud Storage path to the template from which to |
1342 * create the job. | 1697 * create the job. |
1343 * Must be a valid Cloud Storage URL, beginning with `gs://`. | 1698 * Must be a valid Cloud Storage URL, beginning with `gs://`. |
1344 * | 1699 * |
| 1700 * [location] - The location to which to direct the request. |
| 1701 * |
1345 * Completes with a [GetTemplateResponse]. | 1702 * Completes with a [GetTemplateResponse]. |
1346 * | 1703 * |
1347 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1704 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1348 * error. | 1705 * error. |
1349 * | 1706 * |
1350 * If the used [http.Client] completes with an error when making a REST call, | 1707 * If the used [http.Client] completes with an error when making a REST call, |
1351 * this method will complete with the same error. | 1708 * this method will complete with the same error. |
1352 */ | 1709 */ |
1353 async.Future<GetTemplateResponse> get(core.String projectId, {core.String view
, core.String gcsPath}) { | 1710 async.Future<GetTemplateResponse> get(core.String projectId, {core.String view
, core.String gcsPath, core.String location}) { |
1354 var _url = null; | 1711 var _url = null; |
1355 var _queryParams = new core.Map(); | 1712 var _queryParams = new core.Map(); |
1356 var _uploadMedia = null; | 1713 var _uploadMedia = null; |
1357 var _uploadOptions = null; | 1714 var _uploadOptions = null; |
1358 var _downloadOptions = commons.DownloadOptions.Metadata; | 1715 var _downloadOptions = commons.DownloadOptions.Metadata; |
1359 var _body = null; | 1716 var _body = null; |
1360 | 1717 |
1361 if (projectId == null) { | 1718 if (projectId == null) { |
1362 throw new core.ArgumentError("Parameter projectId is required."); | 1719 throw new core.ArgumentError("Parameter projectId is required."); |
1363 } | 1720 } |
1364 if (view != null) { | 1721 if (view != null) { |
1365 _queryParams["view"] = [view]; | 1722 _queryParams["view"] = [view]; |
1366 } | 1723 } |
1367 if (gcsPath != null) { | 1724 if (gcsPath != null) { |
1368 _queryParams["gcsPath"] = [gcsPath]; | 1725 _queryParams["gcsPath"] = [gcsPath]; |
1369 } | 1726 } |
| 1727 if (location != null) { |
| 1728 _queryParams["location"] = [location]; |
| 1729 } |
1370 | 1730 |
1371 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/te
mplates:get'; | 1731 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/te
mplates:get'; |
1372 | 1732 |
1373 var _response = _requester.request(_url, | 1733 var _response = _requester.request(_url, |
1374 "GET", | 1734 "GET", |
1375 body: _body, | 1735 body: _body, |
1376 queryParams: _queryParams, | 1736 queryParams: _queryParams, |
1377 uploadOptions: _uploadOptions, | 1737 uploadOptions: _uploadOptions, |
1378 uploadMedia: _uploadMedia, | 1738 uploadMedia: _uploadMedia, |
1379 downloadOptions: _downloadOptions); | 1739 downloadOptions: _downloadOptions); |
(...skipping 12 matching lines...) Expand all Loading... |
1392 * | 1752 * |
1393 * [gcsPath] - Required. A Cloud Storage path to the template from which to | 1753 * [gcsPath] - Required. A Cloud Storage path to the template from which to |
1394 * create | 1754 * create |
1395 * the job. | 1755 * the job. |
1396 * Must be valid Cloud Storage URL, beginning with 'gs://'. | 1756 * Must be valid Cloud Storage URL, beginning with 'gs://'. |
1397 * | 1757 * |
1398 * [dryRun] - Whether or not the job should actually be executed after | 1758 * [dryRun] - Whether or not the job should actually be executed after |
1399 * validating parameters. Defaults to false. Validation errors do | 1759 * validating parameters. Defaults to false. Validation errors do |
1400 * not cause the HTTP request to fail if true. | 1760 * not cause the HTTP request to fail if true. |
1401 * | 1761 * |
| 1762 * [location] - The location to which to direct the request. |
| 1763 * |
1402 * Completes with a [LaunchTemplateResponse]. | 1764 * Completes with a [LaunchTemplateResponse]. |
1403 * | 1765 * |
1404 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1766 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1405 * error. | 1767 * error. |
1406 * | 1768 * |
1407 * If the used [http.Client] completes with an error when making a REST call, | 1769 * If the used [http.Client] completes with an error when making a REST call, |
1408 * this method will complete with the same error. | 1770 * this method will complete with the same error. |
1409 */ | 1771 */ |
1410 async.Future<LaunchTemplateResponse> launch(LaunchTemplateParameters request,
core.String projectId, {core.String gcsPath, core.bool dryRun}) { | 1772 async.Future<LaunchTemplateResponse> launch(LaunchTemplateParameters request,
core.String projectId, {core.String gcsPath, core.bool dryRun, core.String locat
ion}) { |
1411 var _url = null; | 1773 var _url = null; |
1412 var _queryParams = new core.Map(); | 1774 var _queryParams = new core.Map(); |
1413 var _uploadMedia = null; | 1775 var _uploadMedia = null; |
1414 var _uploadOptions = null; | 1776 var _uploadOptions = null; |
1415 var _downloadOptions = commons.DownloadOptions.Metadata; | 1777 var _downloadOptions = commons.DownloadOptions.Metadata; |
1416 var _body = null; | 1778 var _body = null; |
1417 | 1779 |
1418 if (request != null) { | 1780 if (request != null) { |
1419 _body = convert.JSON.encode((request).toJson()); | 1781 _body = convert.JSON.encode((request).toJson()); |
1420 } | 1782 } |
1421 if (projectId == null) { | 1783 if (projectId == null) { |
1422 throw new core.ArgumentError("Parameter projectId is required."); | 1784 throw new core.ArgumentError("Parameter projectId is required."); |
1423 } | 1785 } |
1424 if (gcsPath != null) { | 1786 if (gcsPath != null) { |
1425 _queryParams["gcsPath"] = [gcsPath]; | 1787 _queryParams["gcsPath"] = [gcsPath]; |
1426 } | 1788 } |
1427 if (dryRun != null) { | 1789 if (dryRun != null) { |
1428 _queryParams["dryRun"] = ["${dryRun}"]; | 1790 _queryParams["dryRun"] = ["${dryRun}"]; |
1429 } | 1791 } |
| 1792 if (location != null) { |
| 1793 _queryParams["location"] = [location]; |
| 1794 } |
1430 | 1795 |
1431 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/te
mplates:launch'; | 1796 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/te
mplates:launch'; |
1432 | 1797 |
1433 var _response = _requester.request(_url, | 1798 var _response = _requester.request(_url, |
1434 "POST", | 1799 "POST", |
1435 body: _body, | 1800 body: _body, |
1436 queryParams: _queryParams, | 1801 queryParams: _queryParams, |
1437 uploadOptions: _uploadOptions, | 1802 uploadOptions: _uploadOptions, |
1438 uploadMedia: _uploadMedia, | 1803 uploadMedia: _uploadMedia, |
1439 downloadOptions: _downloadOptions); | 1804 downloadOptions: _downloadOptions); |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1594 if (fractionConsumed != null) { | 1959 if (fractionConsumed != null) { |
1595 _json["fractionConsumed"] = fractionConsumed; | 1960 _json["fractionConsumed"] = fractionConsumed; |
1596 } | 1961 } |
1597 if (position != null) { | 1962 if (position != null) { |
1598 _json["position"] = (position).toJson(); | 1963 _json["position"] = (position).toJson(); |
1599 } | 1964 } |
1600 return _json; | 1965 return _json; |
1601 } | 1966 } |
1602 } | 1967 } |
1603 | 1968 |
| 1969 /** |
| 1970 * A structured message reporting an autoscaling decision made by the Dataflow |
| 1971 * service. |
| 1972 */ |
| 1973 class AutoscalingEvent { |
| 1974 /** The current number of workers the job has. */ |
| 1975 core.String currentNumWorkers; |
| 1976 /** |
| 1977 * A message describing why the system decided to adjust the current |
| 1978 * number of workers, why it failed, or why the system decided to |
| 1979 * not make any changes to the number of workers. |
| 1980 */ |
| 1981 StructuredMessage description; |
| 1982 /** |
| 1983 * The type of autoscaling event to report. |
| 1984 * Possible string values are: |
| 1985 * - "TYPE_UNKNOWN" : Default type for the enum. Value should never be |
| 1986 * returned. |
| 1987 * - "TARGET_NUM_WORKERS_CHANGED" : The TARGET_NUM_WORKERS_CHANGED type should |
| 1988 * be used when the target |
| 1989 * worker pool size has changed at the start of an actuation. An event |
| 1990 * should always be specified as TARGET_NUM_WORKERS_CHANGED if it reflects |
| 1991 * a change in the target_num_workers. |
| 1992 * - "CURRENT_NUM_WORKERS_CHANGED" : The CURRENT_NUM_WORKERS_CHANGED type |
| 1993 * should be used when actual worker |
| 1994 * pool size has been changed, but the target_num_workers has not changed. |
| 1995 * - "ACTUATION_FAILURE" : The ACTUATION_FAILURE type should be used when we |
| 1996 * want to report |
| 1997 * an error to the user indicating why the current number of workers |
| 1998 * in the pool could not be changed. |
| 1999 * Displayed in the current status and history widgets. |
| 2000 * - "NO_CHANGE" : Used when we want to report to the user a reason why we are |
| 2001 * not currently adjusting the number of workers. |
| 2002 * Should specify both target_num_workers, current_num_workers and a |
| 2003 * decision_message. |
| 2004 */ |
| 2005 core.String eventType; |
| 2006 /** The target number of workers the worker pool wants to resize to use. */ |
| 2007 core.String targetNumWorkers; |
| 2008 /** |
| 2009 * The time this event was emitted to indicate a new target or current |
| 2010 * num_workers value. |
| 2011 */ |
| 2012 core.String time; |
| 2013 |
| 2014 AutoscalingEvent(); |
| 2015 |
| 2016 AutoscalingEvent.fromJson(core.Map _json) { |
| 2017 if (_json.containsKey("currentNumWorkers")) { |
| 2018 currentNumWorkers = _json["currentNumWorkers"]; |
| 2019 } |
| 2020 if (_json.containsKey("description")) { |
| 2021 description = new StructuredMessage.fromJson(_json["description"]); |
| 2022 } |
| 2023 if (_json.containsKey("eventType")) { |
| 2024 eventType = _json["eventType"]; |
| 2025 } |
| 2026 if (_json.containsKey("targetNumWorkers")) { |
| 2027 targetNumWorkers = _json["targetNumWorkers"]; |
| 2028 } |
| 2029 if (_json.containsKey("time")) { |
| 2030 time = _json["time"]; |
| 2031 } |
| 2032 } |
| 2033 |
| 2034 core.Map toJson() { |
| 2035 var _json = new core.Map(); |
| 2036 if (currentNumWorkers != null) { |
| 2037 _json["currentNumWorkers"] = currentNumWorkers; |
| 2038 } |
| 2039 if (description != null) { |
| 2040 _json["description"] = (description).toJson(); |
| 2041 } |
| 2042 if (eventType != null) { |
| 2043 _json["eventType"] = eventType; |
| 2044 } |
| 2045 if (targetNumWorkers != null) { |
| 2046 _json["targetNumWorkers"] = targetNumWorkers; |
| 2047 } |
| 2048 if (time != null) { |
| 2049 _json["time"] = time; |
| 2050 } |
| 2051 return _json; |
| 2052 } |
| 2053 } |
| 2054 |
1604 /** Settings for WorkerPool autoscaling. */ | 2055 /** Settings for WorkerPool autoscaling. */ |
1605 class AutoscalingSettings { | 2056 class AutoscalingSettings { |
1606 /** | 2057 /** |
1607 * The algorithm to use for autoscaling. | 2058 * The algorithm to use for autoscaling. |
1608 * Possible string values are: | 2059 * Possible string values are: |
1609 * - "AUTOSCALING_ALGORITHM_UNKNOWN" : The algorithm is unknown, or | 2060 * - "AUTOSCALING_ALGORITHM_UNKNOWN" : The algorithm is unknown, or |
1610 * unspecified. | 2061 * unspecified. |
1611 * - "AUTOSCALING_ALGORITHM_NONE" : Disable autoscaling. | 2062 * - "AUTOSCALING_ALGORITHM_NONE" : Disable autoscaling. |
1612 * - "AUTOSCALING_ALGORITHM_BASIC" : Increase worker count over time to reduce | 2063 * - "AUTOSCALING_ALGORITHM_BASIC" : Increase worker count over time to reduce |
1613 * job execution time. | 2064 * job execution time. |
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2229 /** The runtime environment for the job. */ | 2680 /** The runtime environment for the job. */ |
2230 RuntimeEnvironment environment; | 2681 RuntimeEnvironment environment; |
2231 /** | 2682 /** |
2232 * Required. A Cloud Storage path to the template from which to | 2683 * Required. A Cloud Storage path to the template from which to |
2233 * create the job. | 2684 * create the job. |
2234 * Must be a valid Cloud Storage URL, beginning with `gs://`. | 2685 * Must be a valid Cloud Storage URL, beginning with `gs://`. |
2235 */ | 2686 */ |
2236 core.String gcsPath; | 2687 core.String gcsPath; |
2237 /** Required. The job name to use for the created job. */ | 2688 /** Required. The job name to use for the created job. */ |
2238 core.String jobName; | 2689 core.String jobName; |
| 2690 /** The location to which to direct the request. */ |
| 2691 core.String location; |
2239 /** The runtime parameters to pass to the job. */ | 2692 /** The runtime parameters to pass to the job. */ |
2240 core.Map<core.String, core.String> parameters; | 2693 core.Map<core.String, core.String> parameters; |
2241 | 2694 |
2242 CreateJobFromTemplateRequest(); | 2695 CreateJobFromTemplateRequest(); |
2243 | 2696 |
2244 CreateJobFromTemplateRequest.fromJson(core.Map _json) { | 2697 CreateJobFromTemplateRequest.fromJson(core.Map _json) { |
2245 if (_json.containsKey("environment")) { | 2698 if (_json.containsKey("environment")) { |
2246 environment = new RuntimeEnvironment.fromJson(_json["environment"]); | 2699 environment = new RuntimeEnvironment.fromJson(_json["environment"]); |
2247 } | 2700 } |
2248 if (_json.containsKey("gcsPath")) { | 2701 if (_json.containsKey("gcsPath")) { |
2249 gcsPath = _json["gcsPath"]; | 2702 gcsPath = _json["gcsPath"]; |
2250 } | 2703 } |
2251 if (_json.containsKey("jobName")) { | 2704 if (_json.containsKey("jobName")) { |
2252 jobName = _json["jobName"]; | 2705 jobName = _json["jobName"]; |
2253 } | 2706 } |
| 2707 if (_json.containsKey("location")) { |
| 2708 location = _json["location"]; |
| 2709 } |
2254 if (_json.containsKey("parameters")) { | 2710 if (_json.containsKey("parameters")) { |
2255 parameters = _json["parameters"]; | 2711 parameters = _json["parameters"]; |
2256 } | 2712 } |
2257 } | 2713 } |
2258 | 2714 |
2259 core.Map toJson() { | 2715 core.Map toJson() { |
2260 var _json = new core.Map(); | 2716 var _json = new core.Map(); |
2261 if (environment != null) { | 2717 if (environment != null) { |
2262 _json["environment"] = (environment).toJson(); | 2718 _json["environment"] = (environment).toJson(); |
2263 } | 2719 } |
2264 if (gcsPath != null) { | 2720 if (gcsPath != null) { |
2265 _json["gcsPath"] = gcsPath; | 2721 _json["gcsPath"] = gcsPath; |
2266 } | 2722 } |
2267 if (jobName != null) { | 2723 if (jobName != null) { |
2268 _json["jobName"] = jobName; | 2724 _json["jobName"] = jobName; |
2269 } | 2725 } |
| 2726 if (location != null) { |
| 2727 _json["location"] = location; |
| 2728 } |
2270 if (parameters != null) { | 2729 if (parameters != null) { |
2271 _json["parameters"] = parameters; | 2730 _json["parameters"] = parameters; |
2272 } | 2731 } |
2273 return _json; | 2732 return _json; |
2274 } | 2733 } |
2275 } | 2734 } |
2276 | 2735 |
2277 /** Identifies the location of a custom souce. */ | 2736 /** Identifies the location of a custom souce. */ |
2278 class CustomSourceLocation { | 2737 class CustomSourceLocation { |
2279 /** Whether this source is stateful. */ | 2738 /** Whether this source is stateful. */ |
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2805 if (version != null) { | 3264 if (version != null) { |
2806 _json["version"] = version; | 3265 _json["version"] = version; |
2807 } | 3266 } |
2808 if (workerPools != null) { | 3267 if (workerPools != null) { |
2809 _json["workerPools"] = workerPools.map((value) => (value).toJson()).toList
(); | 3268 _json["workerPools"] = workerPools.map((value) => (value).toJson()).toList
(); |
2810 } | 3269 } |
2811 return _json; | 3270 return _json; |
2812 } | 3271 } |
2813 } | 3272 } |
2814 | 3273 |
| 3274 /** A message describing the state of a particular execution stage. */ |
| 3275 class ExecutionStageState { |
| 3276 /** The time at which the stage transitioned to this state. */ |
| 3277 core.String currentStateTime; |
| 3278 /** The name of the execution stage. */ |
| 3279 core.String executionStageName; |
| 3280 /** |
| 3281 * Executions stage states allow the same set of values as JobState. |
| 3282 * Possible string values are: |
| 3283 * - "JOB_STATE_UNKNOWN" : The job's run state isn't specified. |
| 3284 * - "JOB_STATE_STOPPED" : `JOB_STATE_STOPPED` indicates that the job has not |
| 3285 * yet started to run. |
| 3286 * - "JOB_STATE_RUNNING" : `JOB_STATE_RUNNING` indicates that the job is |
| 3287 * currently running. |
| 3288 * - "JOB_STATE_DONE" : `JOB_STATE_DONE` indicates that the job has |
| 3289 * successfully completed. |
| 3290 * This is a terminal job state. This state may be set by the Cloud Dataflow |
| 3291 * service, as a transition from `JOB_STATE_RUNNING`. It may also be set via a |
| 3292 * Cloud Dataflow `UpdateJob` call, if the job has not yet reached a terminal |
| 3293 * state. |
| 3294 * - "JOB_STATE_FAILED" : `JOB_STATE_FAILED` indicates that the job has |
| 3295 * failed. This is a |
| 3296 * terminal job state. This state may only be set by the Cloud Dataflow |
| 3297 * service, and only as a transition from `JOB_STATE_RUNNING`. |
| 3298 * - "JOB_STATE_CANCELLED" : `JOB_STATE_CANCELLED` indicates that the job has |
| 3299 * been explicitly |
| 3300 * cancelled. This is a terminal job state. This state may only be |
| 3301 * set via a Cloud Dataflow `UpdateJob` call, and only if the job has not |
| 3302 * yet reached another terminal state. |
| 3303 * - "JOB_STATE_UPDATED" : `JOB_STATE_UPDATED` indicates that the job was |
| 3304 * successfully updated, |
| 3305 * meaning that this job was stopped and another job was started, inheriting |
| 3306 * state from this one. This is a terminal job state. This state may only be |
| 3307 * set by the Cloud Dataflow service, and only as a transition from |
| 3308 * `JOB_STATE_RUNNING`. |
| 3309 * - "JOB_STATE_DRAINING" : `JOB_STATE_DRAINING` indicates that the job is in |
| 3310 * the process of draining. |
| 3311 * A draining job has stopped pulling from its input sources and is processing |
| 3312 * any data that remains in-flight. This state may be set via a Cloud Dataflow |
| 3313 * `UpdateJob` call, but only as a transition from `JOB_STATE_RUNNING`. Jobs |
| 3314 * that are draining may only transition to `JOB_STATE_DRAINED`, |
| 3315 * `JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`. |
| 3316 * - "JOB_STATE_DRAINED" : `JOB_STATE_DRAINED` indicates that the job has been |
| 3317 * drained. |
| 3318 * A drained job terminated by stopping pulling from its input sources and |
| 3319 * processing any data that remained in-flight when draining was requested. |
| 3320 * This state is a terminal state, may only be set by the Cloud Dataflow |
| 3321 * service, and only as a transition from `JOB_STATE_DRAINING`. |
| 3322 * - "JOB_STATE_PENDING" : 'JOB_STATE_PENDING' indicates that the job has been |
| 3323 * created but is not yet |
| 3324 * running. Jobs that are pending may only transition to `JOB_STATE_RUNNING`, |
| 3325 * or `JOB_STATE_FAILED`. |
| 3326 * - "JOB_STATE_CANCELLING" : 'JOB_STATE_CANCELLING' indicates that the job |
| 3327 * has been explicitly cancelled |
| 3328 * and is in the process of stopping. Jobs that are cancelling may only |
| 3329 * transition to 'JOB_STATE_CANCELLED' or 'JOB_STATE_FAILED'. |
| 3330 */ |
| 3331 core.String executionStageState; |
| 3332 |
| 3333 ExecutionStageState(); |
| 3334 |
| 3335 ExecutionStageState.fromJson(core.Map _json) { |
| 3336 if (_json.containsKey("currentStateTime")) { |
| 3337 currentStateTime = _json["currentStateTime"]; |
| 3338 } |
| 3339 if (_json.containsKey("executionStageName")) { |
| 3340 executionStageName = _json["executionStageName"]; |
| 3341 } |
| 3342 if (_json.containsKey("executionStageState")) { |
| 3343 executionStageState = _json["executionStageState"]; |
| 3344 } |
| 3345 } |
| 3346 |
| 3347 core.Map toJson() { |
| 3348 var _json = new core.Map(); |
| 3349 if (currentStateTime != null) { |
| 3350 _json["currentStateTime"] = currentStateTime; |
| 3351 } |
| 3352 if (executionStageName != null) { |
| 3353 _json["executionStageName"] = executionStageName; |
| 3354 } |
| 3355 if (executionStageState != null) { |
| 3356 _json["executionStageState"] = executionStageState; |
| 3357 } |
| 3358 return _json; |
| 3359 } |
| 3360 } |
| 3361 |
2815 /** | 3362 /** |
2816 * Description of the composing transforms, names/ids, and input/outputs of a | 3363 * Description of the composing transforms, names/ids, and input/outputs of a |
2817 * stage of execution. Some composing transforms and sources may have been | 3364 * stage of execution. Some composing transforms and sources may have been |
2818 * generated by the Dataflow service during execution planning. | 3365 * generated by the Dataflow service during execution planning. |
2819 */ | 3366 */ |
2820 class ExecutionStageSummary { | 3367 class ExecutionStageSummary { |
2821 /** | 3368 /** |
2822 * Collections produced and consumed by component transforms of this stage. | 3369 * Collections produced and consumed by component transforms of this stage. |
2823 */ | 3370 */ |
2824 core.List<ComponentSource> componentSource; | 3371 core.List<ComponentSource> componentSource; |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3000 } | 3547 } |
3001 } | 3548 } |
3002 | 3549 |
3003 /** Request to get updated debug configuration for component. */ | 3550 /** Request to get updated debug configuration for component. */ |
3004 class GetDebugConfigRequest { | 3551 class GetDebugConfigRequest { |
3005 /** | 3552 /** |
3006 * The internal component id for which debug configuration is | 3553 * The internal component id for which debug configuration is |
3007 * requested. | 3554 * requested. |
3008 */ | 3555 */ |
3009 core.String componentId; | 3556 core.String componentId; |
| 3557 /** The location which contains the job specified by job_id. */ |
| 3558 core.String location; |
3010 /** The worker id, i.e., VM hostname. */ | 3559 /** The worker id, i.e., VM hostname. */ |
3011 core.String workerId; | 3560 core.String workerId; |
3012 | 3561 |
3013 GetDebugConfigRequest(); | 3562 GetDebugConfigRequest(); |
3014 | 3563 |
3015 GetDebugConfigRequest.fromJson(core.Map _json) { | 3564 GetDebugConfigRequest.fromJson(core.Map _json) { |
3016 if (_json.containsKey("componentId")) { | 3565 if (_json.containsKey("componentId")) { |
3017 componentId = _json["componentId"]; | 3566 componentId = _json["componentId"]; |
3018 } | 3567 } |
| 3568 if (_json.containsKey("location")) { |
| 3569 location = _json["location"]; |
| 3570 } |
3019 if (_json.containsKey("workerId")) { | 3571 if (_json.containsKey("workerId")) { |
3020 workerId = _json["workerId"]; | 3572 workerId = _json["workerId"]; |
3021 } | 3573 } |
3022 } | 3574 } |
3023 | 3575 |
3024 core.Map toJson() { | 3576 core.Map toJson() { |
3025 var _json = new core.Map(); | 3577 var _json = new core.Map(); |
3026 if (componentId != null) { | 3578 if (componentId != null) { |
3027 _json["componentId"] = componentId; | 3579 _json["componentId"] = componentId; |
3028 } | 3580 } |
| 3581 if (location != null) { |
| 3582 _json["location"] = location; |
| 3583 } |
3029 if (workerId != null) { | 3584 if (workerId != null) { |
3030 _json["workerId"] = workerId; | 3585 _json["workerId"] = workerId; |
3031 } | 3586 } |
3032 return _json; | 3587 return _json; |
3033 } | 3588 } |
3034 } | 3589 } |
3035 | 3590 |
3036 /** Response to a get debug configuration request. */ | 3591 /** Response to a get debug configuration request. */ |
3037 class GetDebugConfigResponse { | 3592 class GetDebugConfigResponse { |
3038 /** The encoded debug configuration for the requested component. */ | 3593 /** The encoded debug configuration for the requested component. */ |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3322 * any data that remains in-flight. This state may be set via a Cloud Dataflow | 3877 * any data that remains in-flight. This state may be set via a Cloud Dataflow |
3323 * `UpdateJob` call, but only as a transition from `JOB_STATE_RUNNING`. Jobs | 3878 * `UpdateJob` call, but only as a transition from `JOB_STATE_RUNNING`. Jobs |
3324 * that are draining may only transition to `JOB_STATE_DRAINED`, | 3879 * that are draining may only transition to `JOB_STATE_DRAINED`, |
3325 * `JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`. | 3880 * `JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`. |
3326 * - "JOB_STATE_DRAINED" : `JOB_STATE_DRAINED` indicates that the job has been | 3881 * - "JOB_STATE_DRAINED" : `JOB_STATE_DRAINED` indicates that the job has been |
3327 * drained. | 3882 * drained. |
3328 * A drained job terminated by stopping pulling from its input sources and | 3883 * A drained job terminated by stopping pulling from its input sources and |
3329 * processing any data that remained in-flight when draining was requested. | 3884 * processing any data that remained in-flight when draining was requested. |
3330 * This state is a terminal state, may only be set by the Cloud Dataflow | 3885 * This state is a terminal state, may only be set by the Cloud Dataflow |
3331 * service, and only as a transition from `JOB_STATE_DRAINING`. | 3886 * service, and only as a transition from `JOB_STATE_DRAINING`. |
| 3887 * - "JOB_STATE_PENDING" : 'JOB_STATE_PENDING' indicates that the job has been |
| 3888 * created but is not yet |
| 3889 * running. Jobs that are pending may only transition to `JOB_STATE_RUNNING`, |
| 3890 * or `JOB_STATE_FAILED`. |
| 3891 * - "JOB_STATE_CANCELLING" : 'JOB_STATE_CANCELLING' indicates that the job |
| 3892 * has been explicitly cancelled |
| 3893 * and is in the process of stopping. Jobs that are cancelling may only |
| 3894 * transition to 'JOB_STATE_CANCELLED' or 'JOB_STATE_FAILED'. |
3332 */ | 3895 */ |
3333 core.String currentState; | 3896 core.String currentState; |
3334 /** The timestamp associated with the current state. */ | 3897 /** The timestamp associated with the current state. */ |
3335 core.String currentStateTime; | 3898 core.String currentStateTime; |
3336 /** The environment for the job. */ | 3899 /** The environment for the job. */ |
3337 Environment environment; | 3900 Environment environment; |
3338 /** Deprecated. */ | 3901 /** Deprecated. */ |
3339 JobExecutionInfo executionInfo; | 3902 JobExecutionInfo executionInfo; |
3340 /** | 3903 /** |
3341 * The unique ID of this job. | 3904 * The unique ID of this job. |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3434 * any data that remains in-flight. This state may be set via a Cloud Dataflow | 3997 * any data that remains in-flight. This state may be set via a Cloud Dataflow |
3435 * `UpdateJob` call, but only as a transition from `JOB_STATE_RUNNING`. Jobs | 3998 * `UpdateJob` call, but only as a transition from `JOB_STATE_RUNNING`. Jobs |
3436 * that are draining may only transition to `JOB_STATE_DRAINED`, | 3999 * that are draining may only transition to `JOB_STATE_DRAINED`, |
3437 * `JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`. | 4000 * `JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`. |
3438 * - "JOB_STATE_DRAINED" : `JOB_STATE_DRAINED` indicates that the job has been | 4001 * - "JOB_STATE_DRAINED" : `JOB_STATE_DRAINED` indicates that the job has been |
3439 * drained. | 4002 * drained. |
3440 * A drained job terminated by stopping pulling from its input sources and | 4003 * A drained job terminated by stopping pulling from its input sources and |
3441 * processing any data that remained in-flight when draining was requested. | 4004 * processing any data that remained in-flight when draining was requested. |
3442 * This state is a terminal state, may only be set by the Cloud Dataflow | 4005 * This state is a terminal state, may only be set by the Cloud Dataflow |
3443 * service, and only as a transition from `JOB_STATE_DRAINING`. | 4006 * service, and only as a transition from `JOB_STATE_DRAINING`. |
| 4007 * - "JOB_STATE_PENDING" : 'JOB_STATE_PENDING' indicates that the job has been |
| 4008 * created but is not yet |
| 4009 * running. Jobs that are pending may only transition to `JOB_STATE_RUNNING`, |
| 4010 * or `JOB_STATE_FAILED`. |
| 4011 * - "JOB_STATE_CANCELLING" : 'JOB_STATE_CANCELLING' indicates that the job |
| 4012 * has been explicitly cancelled |
| 4013 * and is in the process of stopping. Jobs that are cancelling may only |
| 4014 * transition to 'JOB_STATE_CANCELLED' or 'JOB_STATE_FAILED'. |
3444 */ | 4015 */ |
3445 core.String requestedState; | 4016 core.String requestedState; |
| 4017 /** |
| 4018 * This field may be mutated by the Cloud Dataflow service; |
| 4019 * callers cannot mutate it. |
| 4020 */ |
| 4021 core.List<ExecutionStageState> stageStates; |
3446 /** The top-level steps that constitute the entire job. */ | 4022 /** The top-level steps that constitute the entire job. */ |
3447 core.List<Step> steps; | 4023 core.List<Step> steps; |
3448 /** | 4024 /** |
3449 * A set of files the system should be aware of that are used | 4025 * A set of files the system should be aware of that are used |
3450 * for temporary storage. These temporary files will be | 4026 * for temporary storage. These temporary files will be |
3451 * removed on job completion. | 4027 * removed on job completion. |
3452 * No duplicates are allowed. | 4028 * No duplicates are allowed. |
3453 * No file patterns are supported. | 4029 * No file patterns are supported. |
3454 * | 4030 * |
3455 * The supported files are: | 4031 * The supported files are: |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3519 } | 4095 } |
3520 if (_json.containsKey("replaceJobId")) { | 4096 if (_json.containsKey("replaceJobId")) { |
3521 replaceJobId = _json["replaceJobId"]; | 4097 replaceJobId = _json["replaceJobId"]; |
3522 } | 4098 } |
3523 if (_json.containsKey("replacedByJobId")) { | 4099 if (_json.containsKey("replacedByJobId")) { |
3524 replacedByJobId = _json["replacedByJobId"]; | 4100 replacedByJobId = _json["replacedByJobId"]; |
3525 } | 4101 } |
3526 if (_json.containsKey("requestedState")) { | 4102 if (_json.containsKey("requestedState")) { |
3527 requestedState = _json["requestedState"]; | 4103 requestedState = _json["requestedState"]; |
3528 } | 4104 } |
| 4105 if (_json.containsKey("stageStates")) { |
| 4106 stageStates = _json["stageStates"].map((value) => new ExecutionStageState.
fromJson(value)).toList(); |
| 4107 } |
3529 if (_json.containsKey("steps")) { | 4108 if (_json.containsKey("steps")) { |
3530 steps = _json["steps"].map((value) => new Step.fromJson(value)).toList(); | 4109 steps = _json["steps"].map((value) => new Step.fromJson(value)).toList(); |
3531 } | 4110 } |
3532 if (_json.containsKey("tempFiles")) { | 4111 if (_json.containsKey("tempFiles")) { |
3533 tempFiles = _json["tempFiles"]; | 4112 tempFiles = _json["tempFiles"]; |
3534 } | 4113 } |
3535 if (_json.containsKey("transformNameMapping")) { | 4114 if (_json.containsKey("transformNameMapping")) { |
3536 transformNameMapping = _json["transformNameMapping"]; | 4115 transformNameMapping = _json["transformNameMapping"]; |
3537 } | 4116 } |
3538 if (_json.containsKey("type")) { | 4117 if (_json.containsKey("type")) { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3580 } | 4159 } |
3581 if (replaceJobId != null) { | 4160 if (replaceJobId != null) { |
3582 _json["replaceJobId"] = replaceJobId; | 4161 _json["replaceJobId"] = replaceJobId; |
3583 } | 4162 } |
3584 if (replacedByJobId != null) { | 4163 if (replacedByJobId != null) { |
3585 _json["replacedByJobId"] = replacedByJobId; | 4164 _json["replacedByJobId"] = replacedByJobId; |
3586 } | 4165 } |
3587 if (requestedState != null) { | 4166 if (requestedState != null) { |
3588 _json["requestedState"] = requestedState; | 4167 _json["requestedState"] = requestedState; |
3589 } | 4168 } |
| 4169 if (stageStates != null) { |
| 4170 _json["stageStates"] = stageStates.map((value) => (value).toJson()).toList
(); |
| 4171 } |
3590 if (steps != null) { | 4172 if (steps != null) { |
3591 _json["steps"] = steps.map((value) => (value).toJson()).toList(); | 4173 _json["steps"] = steps.map((value) => (value).toJson()).toList(); |
3592 } | 4174 } |
3593 if (tempFiles != null) { | 4175 if (tempFiles != null) { |
3594 _json["tempFiles"] = tempFiles; | 4176 _json["tempFiles"] = tempFiles; |
3595 } | 4177 } |
3596 if (transformNameMapping != null) { | 4178 if (transformNameMapping != null) { |
3597 _json["transformNameMapping"] = transformNameMapping; | 4179 _json["transformNameMapping"] = transformNameMapping; |
3598 } | 4180 } |
3599 if (type != null) { | 4181 if (type != null) { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3652 var _json = new core.Map(); | 4234 var _json = new core.Map(); |
3653 if (stepName != null) { | 4235 if (stepName != null) { |
3654 _json["stepName"] = stepName; | 4236 _json["stepName"] = stepName; |
3655 } | 4237 } |
3656 return _json; | 4238 return _json; |
3657 } | 4239 } |
3658 } | 4240 } |
3659 | 4241 |
3660 /** A particular message pertaining to a Dataflow job. */ | 4242 /** A particular message pertaining to a Dataflow job. */ |
3661 class JobMessage { | 4243 class JobMessage { |
3662 /** | 4244 /** Deprecated. */ |
3663 * Identifies the message. This is automatically generated by the | |
3664 * service; the caller should treat it as an opaque string. | |
3665 */ | |
3666 core.String id; | 4245 core.String id; |
3667 /** | 4246 /** |
3668 * Importance level of the message. | 4247 * Importance level of the message. |
3669 * Possible string values are: | 4248 * Possible string values are: |
3670 * - "JOB_MESSAGE_IMPORTANCE_UNKNOWN" : The message importance isn't | 4249 * - "JOB_MESSAGE_IMPORTANCE_UNKNOWN" : The message importance isn't |
3671 * specified, or is unknown. | 4250 * specified, or is unknown. |
3672 * - "JOB_MESSAGE_DEBUG" : The message is at the 'debug' level: typically only | 4251 * - "JOB_MESSAGE_DEBUG" : The message is at the 'debug' level: typically only |
3673 * useful for | 4252 * useful for |
3674 * software engineers working on the code the job is running. | 4253 * software engineers working on the code the job is running. |
3675 * Typically, Dataflow pipeline runners do not display log messages | 4254 * Typically, Dataflow pipeline runners do not display log messages |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4042 var _json = new core.Map(); | 4621 var _json = new core.Map(); |
4043 if (workItems != null) { | 4622 if (workItems != null) { |
4044 _json["workItems"] = workItems.map((value) => (value).toJson()).toList(); | 4623 _json["workItems"] = workItems.map((value) => (value).toJson()).toList(); |
4045 } | 4624 } |
4046 return _json; | 4625 return _json; |
4047 } | 4626 } |
4048 } | 4627 } |
4049 | 4628 |
4050 /** Response to a request to list job messages. */ | 4629 /** Response to a request to list job messages. */ |
4051 class ListJobMessagesResponse { | 4630 class ListJobMessagesResponse { |
| 4631 /** Autoscaling events in ascending timestamp order. */ |
| 4632 core.List<AutoscalingEvent> autoscalingEvents; |
4052 /** Messages in ascending timestamp order. */ | 4633 /** Messages in ascending timestamp order. */ |
4053 core.List<JobMessage> jobMessages; | 4634 core.List<JobMessage> jobMessages; |
4054 /** The token to obtain the next page of results if there are more. */ | 4635 /** The token to obtain the next page of results if there are more. */ |
4055 core.String nextPageToken; | 4636 core.String nextPageToken; |
4056 | 4637 |
4057 ListJobMessagesResponse(); | 4638 ListJobMessagesResponse(); |
4058 | 4639 |
4059 ListJobMessagesResponse.fromJson(core.Map _json) { | 4640 ListJobMessagesResponse.fromJson(core.Map _json) { |
| 4641 if (_json.containsKey("autoscalingEvents")) { |
| 4642 autoscalingEvents = _json["autoscalingEvents"].map((value) => new Autoscal
ingEvent.fromJson(value)).toList(); |
| 4643 } |
4060 if (_json.containsKey("jobMessages")) { | 4644 if (_json.containsKey("jobMessages")) { |
4061 jobMessages = _json["jobMessages"].map((value) => new JobMessage.fromJson(
value)).toList(); | 4645 jobMessages = _json["jobMessages"].map((value) => new JobMessage.fromJson(
value)).toList(); |
4062 } | 4646 } |
4063 if (_json.containsKey("nextPageToken")) { | 4647 if (_json.containsKey("nextPageToken")) { |
4064 nextPageToken = _json["nextPageToken"]; | 4648 nextPageToken = _json["nextPageToken"]; |
4065 } | 4649 } |
4066 } | 4650 } |
4067 | 4651 |
4068 core.Map toJson() { | 4652 core.Map toJson() { |
4069 var _json = new core.Map(); | 4653 var _json = new core.Map(); |
| 4654 if (autoscalingEvents != null) { |
| 4655 _json["autoscalingEvents"] = autoscalingEvents.map((value) => (value).toJs
on()).toList(); |
| 4656 } |
4070 if (jobMessages != null) { | 4657 if (jobMessages != null) { |
4071 _json["jobMessages"] = jobMessages.map((value) => (value).toJson()).toList
(); | 4658 _json["jobMessages"] = jobMessages.map((value) => (value).toJson()).toList
(); |
4072 } | 4659 } |
4073 if (nextPageToken != null) { | 4660 if (nextPageToken != null) { |
4074 _json["nextPageToken"] = nextPageToken; | 4661 _json["nextPageToken"] = nextPageToken; |
4075 } | 4662 } |
4076 return _json; | 4663 return _json; |
4077 } | 4664 } |
4078 } | 4665 } |
4079 | 4666 |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4684 if (systemName != null) { | 5271 if (systemName != null) { |
4685 _json["systemName"] = systemName; | 5272 _json["systemName"] = systemName; |
4686 } | 5273 } |
4687 if (write != null) { | 5274 if (write != null) { |
4688 _json["write"] = (write).toJson(); | 5275 _json["write"] = (write).toJson(); |
4689 } | 5276 } |
4690 return _json; | 5277 return _json; |
4691 } | 5278 } |
4692 } | 5279 } |
4693 | 5280 |
| 5281 /** Structured data associated with this message. */ |
| 5282 class Parameter { |
| 5283 /** Key or name for this parameter. */ |
| 5284 core.String key; |
| 5285 /** |
| 5286 * Value for this parameter. |
| 5287 * |
| 5288 * The values for Object must be JSON objects. It can consist of `num`, |
| 5289 * `String`, `bool` and `null` as well as `Map` and `List` values. |
| 5290 */ |
| 5291 core.Object value; |
| 5292 |
| 5293 Parameter(); |
| 5294 |
| 5295 Parameter.fromJson(core.Map _json) { |
| 5296 if (_json.containsKey("key")) { |
| 5297 key = _json["key"]; |
| 5298 } |
| 5299 if (_json.containsKey("value")) { |
| 5300 value = _json["value"]; |
| 5301 } |
| 5302 } |
| 5303 |
| 5304 core.Map toJson() { |
| 5305 var _json = new core.Map(); |
| 5306 if (key != null) { |
| 5307 _json["key"] = key; |
| 5308 } |
| 5309 if (value != null) { |
| 5310 _json["value"] = value; |
| 5311 } |
| 5312 return _json; |
| 5313 } |
| 5314 } |
| 5315 |
4694 /** Metadata for a specific parameter. */ | 5316 /** Metadata for a specific parameter. */ |
4695 class ParameterMetadata { | 5317 class ParameterMetadata { |
4696 /** Required. The help text to display for the parameter. */ | 5318 /** Required. The help text to display for the parameter. */ |
4697 core.String helpText; | 5319 core.String helpText; |
4698 /** Optional. Whether the parameter is optional. Defaults to false. */ | 5320 /** Optional. Whether the parameter is optional. Defaults to false. */ |
4699 core.bool isOptional; | 5321 core.bool isOptional; |
4700 /** Required. The label to display for the parameter. */ | 5322 /** Required. The label to display for the parameter. */ |
4701 core.String label; | 5323 core.String label; |
4702 /** Required. The name of the parameter. */ | 5324 /** Required. The name of the parameter. */ |
4703 core.String name; | 5325 core.String name; |
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5283 return _json; | 5905 return _json; |
5284 } | 5906 } |
5285 } | 5907 } |
5286 | 5908 |
5287 /** Request to send encoded debug information. */ | 5909 /** Request to send encoded debug information. */ |
5288 class SendDebugCaptureRequest { | 5910 class SendDebugCaptureRequest { |
5289 /** The internal component id for which debug information is sent. */ | 5911 /** The internal component id for which debug information is sent. */ |
5290 core.String componentId; | 5912 core.String componentId; |
5291 /** The encoded debug information. */ | 5913 /** The encoded debug information. */ |
5292 core.String data; | 5914 core.String data; |
| 5915 /** The location which contains the job specified by job_id. */ |
| 5916 core.String location; |
5293 /** The worker id, i.e., VM hostname. */ | 5917 /** The worker id, i.e., VM hostname. */ |
5294 core.String workerId; | 5918 core.String workerId; |
5295 | 5919 |
5296 SendDebugCaptureRequest(); | 5920 SendDebugCaptureRequest(); |
5297 | 5921 |
5298 SendDebugCaptureRequest.fromJson(core.Map _json) { | 5922 SendDebugCaptureRequest.fromJson(core.Map _json) { |
5299 if (_json.containsKey("componentId")) { | 5923 if (_json.containsKey("componentId")) { |
5300 componentId = _json["componentId"]; | 5924 componentId = _json["componentId"]; |
5301 } | 5925 } |
5302 if (_json.containsKey("data")) { | 5926 if (_json.containsKey("data")) { |
5303 data = _json["data"]; | 5927 data = _json["data"]; |
5304 } | 5928 } |
| 5929 if (_json.containsKey("location")) { |
| 5930 location = _json["location"]; |
| 5931 } |
5305 if (_json.containsKey("workerId")) { | 5932 if (_json.containsKey("workerId")) { |
5306 workerId = _json["workerId"]; | 5933 workerId = _json["workerId"]; |
5307 } | 5934 } |
5308 } | 5935 } |
5309 | 5936 |
5310 core.Map toJson() { | 5937 core.Map toJson() { |
5311 var _json = new core.Map(); | 5938 var _json = new core.Map(); |
5312 if (componentId != null) { | 5939 if (componentId != null) { |
5313 _json["componentId"] = componentId; | 5940 _json["componentId"] = componentId; |
5314 } | 5941 } |
5315 if (data != null) { | 5942 if (data != null) { |
5316 _json["data"] = data; | 5943 _json["data"] = data; |
5317 } | 5944 } |
| 5945 if (location != null) { |
| 5946 _json["location"] = location; |
| 5947 } |
5318 if (workerId != null) { | 5948 if (workerId != null) { |
5319 _json["workerId"] = workerId; | 5949 _json["workerId"] = workerId; |
5320 } | 5950 } |
5321 return _json; | 5951 return _json; |
5322 } | 5952 } |
5323 } | 5953 } |
5324 | 5954 |
5325 /** | 5955 /** |
5326 * Response to a send capture request. | 5956 * Response to a send capture request. |
5327 * nothing | 5957 * nothing |
5328 */ | 5958 */ |
5329 class SendDebugCaptureResponse { | 5959 class SendDebugCaptureResponse { |
5330 | 5960 |
5331 SendDebugCaptureResponse(); | 5961 SendDebugCaptureResponse(); |
5332 | 5962 |
5333 SendDebugCaptureResponse.fromJson(core.Map _json) { | 5963 SendDebugCaptureResponse.fromJson(core.Map _json) { |
5334 } | 5964 } |
5335 | 5965 |
5336 core.Map toJson() { | 5966 core.Map toJson() { |
5337 var _json = new core.Map(); | 5967 var _json = new core.Map(); |
5338 return _json; | 5968 return _json; |
5339 } | 5969 } |
5340 } | 5970 } |
5341 | 5971 |
5342 /** A request for sending worker messages to the service. */ | 5972 /** A request for sending worker messages to the service. */ |
5343 class SendWorkerMessagesRequest { | 5973 class SendWorkerMessagesRequest { |
| 5974 /** The location which contains the job */ |
| 5975 core.String location; |
5344 /** The WorkerMessages to send. */ | 5976 /** The WorkerMessages to send. */ |
5345 core.List<WorkerMessage> workerMessages; | 5977 core.List<WorkerMessage> workerMessages; |
5346 | 5978 |
5347 SendWorkerMessagesRequest(); | 5979 SendWorkerMessagesRequest(); |
5348 | 5980 |
5349 SendWorkerMessagesRequest.fromJson(core.Map _json) { | 5981 SendWorkerMessagesRequest.fromJson(core.Map _json) { |
| 5982 if (_json.containsKey("location")) { |
| 5983 location = _json["location"]; |
| 5984 } |
5350 if (_json.containsKey("workerMessages")) { | 5985 if (_json.containsKey("workerMessages")) { |
5351 workerMessages = _json["workerMessages"].map((value) => new WorkerMessage.
fromJson(value)).toList(); | 5986 workerMessages = _json["workerMessages"].map((value) => new WorkerMessage.
fromJson(value)).toList(); |
5352 } | 5987 } |
5353 } | 5988 } |
5354 | 5989 |
5355 core.Map toJson() { | 5990 core.Map toJson() { |
5356 var _json = new core.Map(); | 5991 var _json = new core.Map(); |
| 5992 if (location != null) { |
| 5993 _json["location"] = location; |
| 5994 } |
5357 if (workerMessages != null) { | 5995 if (workerMessages != null) { |
5358 _json["workerMessages"] = workerMessages.map((value) => (value).toJson()).
toList(); | 5996 _json["workerMessages"] = workerMessages.map((value) => (value).toJson()).
toList(); |
5359 } | 5997 } |
5360 return _json; | 5998 return _json; |
5361 } | 5999 } |
5362 } | 6000 } |
5363 | 6001 |
5364 /** The response to the worker messages. */ | 6002 /** The response to the worker messages. */ |
5365 class SendWorkerMessagesResponse { | 6003 class SendWorkerMessagesResponse { |
5366 /** The servers response to the worker messages. */ | 6004 /** The servers response to the worker messages. */ |
(...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6723 | 7361 |
6724 core.Map toJson() { | 7362 core.Map toJson() { |
6725 var _json = new core.Map(); | 7363 var _json = new core.Map(); |
6726 if (elements != null) { | 7364 if (elements != null) { |
6727 _json["elements"] = elements; | 7365 _json["elements"] = elements; |
6728 } | 7366 } |
6729 return _json; | 7367 return _json; |
6730 } | 7368 } |
6731 } | 7369 } |
6732 | 7370 |
| 7371 /** |
| 7372 * A rich message format, including a human readable string, a key for |
| 7373 * identifying the message, and structured data associated with the message for |
| 7374 * programmatic consumption. |
| 7375 */ |
| 7376 class StructuredMessage { |
| 7377 /** |
| 7378 * Idenfier for this message type. Used by external systems to |
| 7379 * internationalize or personalize message. |
| 7380 */ |
| 7381 core.String messageKey; |
| 7382 /** Human-readable version of message. */ |
| 7383 core.String messageText; |
| 7384 /** The structured data associated with this message. */ |
| 7385 core.List<Parameter> parameters; |
| 7386 |
| 7387 StructuredMessage(); |
| 7388 |
| 7389 StructuredMessage.fromJson(core.Map _json) { |
| 7390 if (_json.containsKey("messageKey")) { |
| 7391 messageKey = _json["messageKey"]; |
| 7392 } |
| 7393 if (_json.containsKey("messageText")) { |
| 7394 messageText = _json["messageText"]; |
| 7395 } |
| 7396 if (_json.containsKey("parameters")) { |
| 7397 parameters = _json["parameters"].map((value) => new Parameter.fromJson(val
ue)).toList(); |
| 7398 } |
| 7399 } |
| 7400 |
| 7401 core.Map toJson() { |
| 7402 var _json = new core.Map(); |
| 7403 if (messageKey != null) { |
| 7404 _json["messageKey"] = messageKey; |
| 7405 } |
| 7406 if (messageText != null) { |
| 7407 _json["messageText"] = messageText; |
| 7408 } |
| 7409 if (parameters != null) { |
| 7410 _json["parameters"] = parameters.map((value) => (value).toJson()).toList()
; |
| 7411 } |
| 7412 return _json; |
| 7413 } |
| 7414 } |
| 7415 |
6733 /** Taskrunner configuration settings. */ | 7416 /** Taskrunner configuration settings. */ |
6734 class TaskRunnerSettings { | 7417 class TaskRunnerSettings { |
6735 /** Whether to also send taskrunner log info to stderr. */ | 7418 /** Whether to also send taskrunner log info to stderr. */ |
6736 core.bool alsologtostderr; | 7419 core.bool alsologtostderr; |
6737 /** The location on the worker for task-specific subdirectories. */ | 7420 /** The location on the worker for task-specific subdirectories. */ |
6738 core.String baseTaskDir; | 7421 core.String baseTaskDir; |
6739 /** | 7422 /** |
6740 * The base URL for the taskrunner to use when accessing Google Cloud APIs. | 7423 * The base URL for the taskrunner to use when accessing Google Cloud APIs. |
6741 * | 7424 * |
6742 * When workers access Google Cloud APIs, they logically do so via | 7425 * When workers access Google Cloud APIs, they logically do so via |
(...skipping 1447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8190 var _json = new core.Map(); | 8873 var _json = new core.Map(); |
8191 if (input != null) { | 8874 if (input != null) { |
8192 _json["input"] = (input).toJson(); | 8875 _json["input"] = (input).toJson(); |
8193 } | 8876 } |
8194 if (sink != null) { | 8877 if (sink != null) { |
8195 _json["sink"] = (sink).toJson(); | 8878 _json["sink"] = (sink).toJson(); |
8196 } | 8879 } |
8197 return _json; | 8880 return _json; |
8198 } | 8881 } |
8199 } | 8882 } |
OLD | NEW |