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; |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 | 165 |
166 /** | 166 /** |
167 * Gets the state of the specified Cloud Dataflow job. | 167 * Gets the state of the specified Cloud Dataflow job. |
168 * | 168 * |
169 * Request parameters: | 169 * Request parameters: |
170 * | 170 * |
171 * [projectId] - The ID of the Cloud Platform project that the job belongs to. | 171 * [projectId] - The ID of the Cloud Platform project that the job belongs to. |
172 * | 172 * |
173 * [jobId] - The job ID. | 173 * [jobId] - The job ID. |
174 * | 174 * |
175 * [location] - The location that contains this job. | |
176 * | |
177 * [view] - The level of information requested in response. | 175 * [view] - The level of information requested in response. |
178 * Possible string values are: | 176 * Possible string values are: |
179 * - "JOB_VIEW_UNKNOWN" : A JOB_VIEW_UNKNOWN. | 177 * - "JOB_VIEW_UNKNOWN" : A JOB_VIEW_UNKNOWN. |
180 * - "JOB_VIEW_SUMMARY" : A JOB_VIEW_SUMMARY. | 178 * - "JOB_VIEW_SUMMARY" : A JOB_VIEW_SUMMARY. |
181 * - "JOB_VIEW_ALL" : A JOB_VIEW_ALL. | 179 * - "JOB_VIEW_ALL" : A JOB_VIEW_ALL. |
182 * - "JOB_VIEW_DESCRIPTION" : A JOB_VIEW_DESCRIPTION. | 180 * - "JOB_VIEW_DESCRIPTION" : A JOB_VIEW_DESCRIPTION. |
183 * | 181 * |
| 182 * [location] - The location that contains this job. |
| 183 * |
184 * Completes with a [Job]. | 184 * Completes with a [Job]. |
185 * | 185 * |
186 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 186 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
187 * error. | 187 * error. |
188 * | 188 * |
189 * If the used [http.Client] completes with an error when making a REST call, | 189 * If the used [http.Client] completes with an error when making a REST call, |
190 * this method will complete with the same error. | 190 * this method will complete with the same error. |
191 */ | 191 */ |
192 async.Future<Job> get(core.String projectId, core.String jobId, {core.String l
ocation, core.String view}) { | 192 async.Future<Job> get(core.String projectId, core.String jobId, {core.String v
iew, core.String location}) { |
193 var _url = null; | 193 var _url = null; |
194 var _queryParams = new core.Map(); | 194 var _queryParams = new core.Map(); |
195 var _uploadMedia = null; | 195 var _uploadMedia = null; |
196 var _uploadOptions = null; | 196 var _uploadOptions = null; |
197 var _downloadOptions = commons.DownloadOptions.Metadata; | 197 var _downloadOptions = commons.DownloadOptions.Metadata; |
198 var _body = null; | 198 var _body = null; |
199 | 199 |
200 if (projectId == null) { | 200 if (projectId == null) { |
201 throw new core.ArgumentError("Parameter projectId is required."); | 201 throw new core.ArgumentError("Parameter projectId is required."); |
202 } | 202 } |
203 if (jobId == null) { | 203 if (jobId == null) { |
204 throw new core.ArgumentError("Parameter jobId is required."); | 204 throw new core.ArgumentError("Parameter jobId is required."); |
205 } | 205 } |
| 206 if (view != null) { |
| 207 _queryParams["view"] = [view]; |
| 208 } |
206 if (location != null) { | 209 if (location != null) { |
207 _queryParams["location"] = [location]; | 210 _queryParams["location"] = [location]; |
208 } | 211 } |
209 if (view != null) { | |
210 _queryParams["view"] = [view]; | |
211 } | |
212 | 212 |
213 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/jo
bs/' + commons.Escaper.ecapeVariable('$jobId'); | 213 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/jo
bs/' + commons.Escaper.ecapeVariable('$jobId'); |
214 | 214 |
215 var _response = _requester.request(_url, | 215 var _response = _requester.request(_url, |
216 "GET", | 216 "GET", |
217 body: _body, | 217 body: _body, |
218 queryParams: _queryParams, | 218 queryParams: _queryParams, |
219 uploadOptions: _uploadOptions, | 219 uploadOptions: _uploadOptions, |
220 uploadMedia: _uploadMedia, | 220 uploadMedia: _uploadMedia, |
221 downloadOptions: _downloadOptions); | 221 downloadOptions: _downloadOptions); |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 | 528 |
529 /** | 529 /** |
530 * Request the job status. | 530 * Request the job status. |
531 * | 531 * |
532 * Request parameters: | 532 * Request parameters: |
533 * | 533 * |
534 * [projectId] - A project id. | 534 * [projectId] - A project id. |
535 * | 535 * |
536 * [jobId] - The job to get messages about. | 536 * [jobId] - The job to get messages about. |
537 * | 537 * |
538 * [startTime] - If specified, return only messages with timestamps >= | |
539 * start_time. | |
540 * The default is the job creation time (i.e. beginning of messages). | |
541 * | |
542 * [pageToken] - If supplied, this should be the value of next_page_token | |
543 * returned | |
544 * by an earlier call. This will cause the next page of results to | |
545 * be returned. | |
546 * | |
547 * [pageSize] - If specified, determines the maximum number of messages to | 538 * [pageSize] - If specified, determines the maximum number of messages to |
548 * return. If unspecified, the service may choose an appropriate | 539 * return. If unspecified, the service may choose an appropriate |
549 * default, or may return an arbitrarily large number of results. | 540 * default, or may return an arbitrarily large number of results. |
550 * | 541 * |
551 * [minimumImportance] - Filter to only get messages with importance >= level | 542 * [minimumImportance] - Filter to only get messages with importance >= level |
552 * Possible string values are: | 543 * Possible string values are: |
553 * - "JOB_MESSAGE_IMPORTANCE_UNKNOWN" : A JOB_MESSAGE_IMPORTANCE_UNKNOWN. | 544 * - "JOB_MESSAGE_IMPORTANCE_UNKNOWN" : A JOB_MESSAGE_IMPORTANCE_UNKNOWN. |
554 * - "JOB_MESSAGE_DEBUG" : A JOB_MESSAGE_DEBUG. | 545 * - "JOB_MESSAGE_DEBUG" : A JOB_MESSAGE_DEBUG. |
555 * - "JOB_MESSAGE_DETAILED" : A JOB_MESSAGE_DETAILED. | 546 * - "JOB_MESSAGE_DETAILED" : A JOB_MESSAGE_DETAILED. |
556 * - "JOB_MESSAGE_BASIC" : A JOB_MESSAGE_BASIC. | 547 * - "JOB_MESSAGE_BASIC" : A JOB_MESSAGE_BASIC. |
557 * - "JOB_MESSAGE_WARNING" : A JOB_MESSAGE_WARNING. | 548 * - "JOB_MESSAGE_WARNING" : A JOB_MESSAGE_WARNING. |
558 * - "JOB_MESSAGE_ERROR" : A JOB_MESSAGE_ERROR. | 549 * - "JOB_MESSAGE_ERROR" : A JOB_MESSAGE_ERROR. |
559 * | 550 * |
560 * [location] - The location which contains the job specified by job_id. | |
561 * | |
562 * [endTime] - Return only messages with timestamps < end_time. The default is | 551 * [endTime] - Return only messages with timestamps < end_time. The default is |
563 * now | 552 * now |
564 * (i.e. return up to the latest messages available). | 553 * (i.e. return up to the latest messages available). |
565 * | 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]. | 566 * Completes with a [ListJobMessagesResponse]. |
567 * | 567 * |
568 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 568 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
569 * error. | 569 * error. |
570 * | 570 * |
571 * If the used [http.Client] completes with an error when making a REST call, | 571 * If the used [http.Client] completes with an error when making a REST call, |
572 * this method will complete with the same error. | 572 * this method will complete with the same error. |
573 */ | 573 */ |
574 async.Future<ListJobMessagesResponse> list(core.String projectId, core.String
jobId, {core.String startTime, core.String pageToken, core.int pageSize, core.St
ring minimumImportance, core.String location, core.String endTime}) { | 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}) { |
575 var _url = null; | 575 var _url = null; |
576 var _queryParams = new core.Map(); | 576 var _queryParams = new core.Map(); |
577 var _uploadMedia = null; | 577 var _uploadMedia = null; |
578 var _uploadOptions = null; | 578 var _uploadOptions = null; |
579 var _downloadOptions = commons.DownloadOptions.Metadata; | 579 var _downloadOptions = commons.DownloadOptions.Metadata; |
580 var _body = null; | 580 var _body = null; |
581 | 581 |
582 if (projectId == null) { | 582 if (projectId == null) { |
583 throw new core.ArgumentError("Parameter projectId is required."); | 583 throw new core.ArgumentError("Parameter projectId is required."); |
584 } | 584 } |
585 if (jobId == null) { | 585 if (jobId == null) { |
586 throw new core.ArgumentError("Parameter jobId is required."); | 586 throw new core.ArgumentError("Parameter jobId is required."); |
587 } | 587 } |
588 if (startTime != null) { | |
589 _queryParams["startTime"] = [startTime]; | |
590 } | |
591 if (pageToken != null) { | |
592 _queryParams["pageToken"] = [pageToken]; | |
593 } | |
594 if (pageSize != null) { | 588 if (pageSize != null) { |
595 _queryParams["pageSize"] = ["${pageSize}"]; | 589 _queryParams["pageSize"] = ["${pageSize}"]; |
596 } | 590 } |
597 if (minimumImportance != null) { | 591 if (minimumImportance != null) { |
598 _queryParams["minimumImportance"] = [minimumImportance]; | 592 _queryParams["minimumImportance"] = [minimumImportance]; |
599 } | 593 } |
| 594 if (endTime != null) { |
| 595 _queryParams["endTime"] = [endTime]; |
| 596 } |
600 if (location != null) { | 597 if (location != null) { |
601 _queryParams["location"] = [location]; | 598 _queryParams["location"] = [location]; |
602 } | 599 } |
603 if (endTime != null) { | 600 if (pageToken != null) { |
604 _queryParams["endTime"] = [endTime]; | 601 _queryParams["pageToken"] = [pageToken]; |
| 602 } |
| 603 if (startTime != null) { |
| 604 _queryParams["startTime"] = [startTime]; |
605 } | 605 } |
606 | 606 |
607 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/jo
bs/' + commons.Escaper.ecapeVariable('$jobId') + '/messages'; | 607 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/jo
bs/' + commons.Escaper.ecapeVariable('$jobId') + '/messages'; |
608 | 608 |
609 var _response = _requester.request(_url, | 609 var _response = _requester.request(_url, |
610 "GET", | 610 "GET", |
611 body: _body, | 611 body: _body, |
612 queryParams: _queryParams, | 612 queryParams: _queryParams, |
613 uploadOptions: _uploadOptions, | 613 uploadOptions: _uploadOptions, |
614 uploadMedia: _uploadMedia, | 614 uploadMedia: _uploadMedia, |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 * Creates a Cloud Dataflow job. | 749 * Creates a Cloud Dataflow job. |
750 * | 750 * |
751 * [request] - The metadata request object. | 751 * [request] - The metadata request object. |
752 * | 752 * |
753 * Request parameters: | 753 * Request parameters: |
754 * | 754 * |
755 * [projectId] - The ID of the Cloud Platform project that the job belongs to. | 755 * [projectId] - The ID of the Cloud Platform project that the job belongs to. |
756 * | 756 * |
757 * [location] - The location that contains this job. | 757 * [location] - The location that contains this job. |
758 * | 758 * |
759 * [replaceJobId] - Deprecated. This field is now in the Job message. | |
760 * | |
761 * [view] - The level of information requested in response. | 759 * [view] - The level of information requested in response. |
762 * Possible string values are: | 760 * Possible string values are: |
763 * - "JOB_VIEW_UNKNOWN" : A JOB_VIEW_UNKNOWN. | 761 * - "JOB_VIEW_UNKNOWN" : A JOB_VIEW_UNKNOWN. |
764 * - "JOB_VIEW_SUMMARY" : A JOB_VIEW_SUMMARY. | 762 * - "JOB_VIEW_SUMMARY" : A JOB_VIEW_SUMMARY. |
765 * - "JOB_VIEW_ALL" : A JOB_VIEW_ALL. | 763 * - "JOB_VIEW_ALL" : A JOB_VIEW_ALL. |
766 * - "JOB_VIEW_DESCRIPTION" : A JOB_VIEW_DESCRIPTION. | 764 * - "JOB_VIEW_DESCRIPTION" : A JOB_VIEW_DESCRIPTION. |
767 * | 765 * |
| 766 * [replaceJobId] - Deprecated. This field is now in the Job message. |
| 767 * |
768 * Completes with a [Job]. | 768 * Completes with a [Job]. |
769 * | 769 * |
770 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 770 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
771 * error. | 771 * error. |
772 * | 772 * |
773 * If the used [http.Client] completes with an error when making a REST call, | 773 * If the used [http.Client] completes with an error when making a REST call, |
774 * this method will complete with the same error. | 774 * this method will complete with the same error. |
775 */ | 775 */ |
776 async.Future<Job> create(Job request, core.String projectId, core.String locat
ion, {core.String replaceJobId, core.String view}) { | 776 async.Future<Job> create(Job request, core.String projectId, core.String locat
ion, {core.String view, core.String replaceJobId}) { |
777 var _url = null; | 777 var _url = null; |
778 var _queryParams = new core.Map(); | 778 var _queryParams = new core.Map(); |
779 var _uploadMedia = null; | 779 var _uploadMedia = null; |
780 var _uploadOptions = null; | 780 var _uploadOptions = null; |
781 var _downloadOptions = commons.DownloadOptions.Metadata; | 781 var _downloadOptions = commons.DownloadOptions.Metadata; |
782 var _body = null; | 782 var _body = null; |
783 | 783 |
784 if (request != null) { | 784 if (request != null) { |
785 _body = convert.JSON.encode((request).toJson()); | 785 _body = convert.JSON.encode((request).toJson()); |
786 } | 786 } |
787 if (projectId == null) { | 787 if (projectId == null) { |
788 throw new core.ArgumentError("Parameter projectId is required."); | 788 throw new core.ArgumentError("Parameter projectId is required."); |
789 } | 789 } |
790 if (location == null) { | 790 if (location == null) { |
791 throw new core.ArgumentError("Parameter location is required."); | 791 throw new core.ArgumentError("Parameter location is required."); |
792 } | 792 } |
| 793 if (view != null) { |
| 794 _queryParams["view"] = [view]; |
| 795 } |
793 if (replaceJobId != null) { | 796 if (replaceJobId != null) { |
794 _queryParams["replaceJobId"] = [replaceJobId]; | 797 _queryParams["replaceJobId"] = [replaceJobId]; |
795 } | 798 } |
796 if (view != null) { | |
797 _queryParams["view"] = [view]; | |
798 } | |
799 | 799 |
800 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/lo
cations/' + commons.Escaper.ecapeVariable('$location') + '/jobs'; | 800 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/lo
cations/' + commons.Escaper.ecapeVariable('$location') + '/jobs'; |
801 | 801 |
802 var _response = _requester.request(_url, | 802 var _response = _requester.request(_url, |
803 "POST", | 803 "POST", |
804 body: _body, | 804 body: _body, |
805 queryParams: _queryParams, | 805 queryParams: _queryParams, |
806 uploadOptions: _uploadOptions, | 806 uploadOptions: _uploadOptions, |
807 uploadMedia: _uploadMedia, | 807 uploadMedia: _uploadMedia, |
808 downloadOptions: _downloadOptions); | 808 downloadOptions: _downloadOptions); |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
925 | 925 |
926 /** | 926 /** |
927 * List the jobs of a project. | 927 * List the jobs of a project. |
928 * | 928 * |
929 * Request parameters: | 929 * Request parameters: |
930 * | 930 * |
931 * [projectId] - The project which owns the jobs. | 931 * [projectId] - The project which owns the jobs. |
932 * | 932 * |
933 * [location] - The location that contains this job. | 933 * [location] - The location that contains this job. |
934 * | 934 * |
935 * [filter] - The kind of filter to use. | |
936 * Possible string values are: | |
937 * - "UNKNOWN" : A UNKNOWN. | |
938 * - "ALL" : A ALL. | |
939 * - "TERMINATED" : A TERMINATED. | |
940 * - "ACTIVE" : A ACTIVE. | |
941 * | |
942 * [pageToken] - Set this to the 'next_page_token' field of a previous | |
943 * response | |
944 * to request additional results in a long list. | |
945 * | |
946 * [pageSize] - If there are many jobs, limit response to at most this many. | 935 * [pageSize] - If there are many jobs, limit response to at most this many. |
947 * The actual number of jobs returned will be the lesser of max_responses | 936 * The actual number of jobs returned will be the lesser of max_responses |
948 * and an unspecified server-defined limit. | 937 * and an unspecified server-defined limit. |
949 * | 938 * |
950 * [view] - Level of information requested in response. Default is | 939 * [view] - Level of information requested in response. Default is |
951 * `JOB_VIEW_SUMMARY`. | 940 * `JOB_VIEW_SUMMARY`. |
952 * Possible string values are: | 941 * Possible string values are: |
953 * - "JOB_VIEW_UNKNOWN" : A JOB_VIEW_UNKNOWN. | 942 * - "JOB_VIEW_UNKNOWN" : A JOB_VIEW_UNKNOWN. |
954 * - "JOB_VIEW_SUMMARY" : A JOB_VIEW_SUMMARY. | 943 * - "JOB_VIEW_SUMMARY" : A JOB_VIEW_SUMMARY. |
955 * - "JOB_VIEW_ALL" : A JOB_VIEW_ALL. | 944 * - "JOB_VIEW_ALL" : A JOB_VIEW_ALL. |
956 * - "JOB_VIEW_DESCRIPTION" : A JOB_VIEW_DESCRIPTION. | 945 * - "JOB_VIEW_DESCRIPTION" : A JOB_VIEW_DESCRIPTION. |
957 * | 946 * |
| 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]. | 958 * Completes with a [ListJobsResponse]. |
959 * | 959 * |
960 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 960 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
961 * error. | 961 * error. |
962 * | 962 * |
963 * If the used [http.Client] completes with an error when making a REST call, | 963 * If the used [http.Client] completes with an error when making a REST call, |
964 * this method will complete with the same error. | 964 * this method will complete with the same error. |
965 */ | 965 */ |
966 async.Future<ListJobsResponse> list(core.String projectId, core.String locatio
n, {core.String filter, core.String pageToken, core.int pageSize, core.String vi
ew}) { | 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}) { |
967 var _url = null; | 967 var _url = null; |
968 var _queryParams = new core.Map(); | 968 var _queryParams = new core.Map(); |
969 var _uploadMedia = null; | 969 var _uploadMedia = null; |
970 var _uploadOptions = null; | 970 var _uploadOptions = null; |
971 var _downloadOptions = commons.DownloadOptions.Metadata; | 971 var _downloadOptions = commons.DownloadOptions.Metadata; |
972 var _body = null; | 972 var _body = null; |
973 | 973 |
974 if (projectId == null) { | 974 if (projectId == null) { |
975 throw new core.ArgumentError("Parameter projectId is required."); | 975 throw new core.ArgumentError("Parameter projectId is required."); |
976 } | 976 } |
977 if (location == null) { | 977 if (location == null) { |
978 throw new core.ArgumentError("Parameter location is required."); | 978 throw new core.ArgumentError("Parameter location is required."); |
979 } | 979 } |
| 980 if (pageSize != null) { |
| 981 _queryParams["pageSize"] = ["${pageSize}"]; |
| 982 } |
| 983 if (view != null) { |
| 984 _queryParams["view"] = [view]; |
| 985 } |
980 if (filter != null) { | 986 if (filter != null) { |
981 _queryParams["filter"] = [filter]; | 987 _queryParams["filter"] = [filter]; |
982 } | 988 } |
983 if (pageToken != null) { | 989 if (pageToken != null) { |
984 _queryParams["pageToken"] = [pageToken]; | 990 _queryParams["pageToken"] = [pageToken]; |
985 } | 991 } |
986 if (pageSize != null) { | |
987 _queryParams["pageSize"] = ["${pageSize}"]; | |
988 } | |
989 if (view != null) { | |
990 _queryParams["view"] = [view]; | |
991 } | |
992 | 992 |
993 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/lo
cations/' + commons.Escaper.ecapeVariable('$location') + '/jobs'; | 993 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/lo
cations/' + commons.Escaper.ecapeVariable('$location') + '/jobs'; |
994 | 994 |
995 var _response = _requester.request(_url, | 995 var _response = _requester.request(_url, |
996 "GET", | 996 "GET", |
997 body: _body, | 997 body: _body, |
998 queryParams: _queryParams, | 998 queryParams: _queryParams, |
999 uploadOptions: _uploadOptions, | 999 uploadOptions: _uploadOptions, |
1000 uploadMedia: _uploadMedia, | 1000 uploadMedia: _uploadMedia, |
1001 downloadOptions: _downloadOptions); | 1001 downloadOptions: _downloadOptions); |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1383 /** | 1383 /** |
1384 * Launch a template. | 1384 * Launch a template. |
1385 * | 1385 * |
1386 * [request] - The metadata request object. | 1386 * [request] - The metadata request object. |
1387 * | 1387 * |
1388 * Request parameters: | 1388 * Request parameters: |
1389 * | 1389 * |
1390 * [projectId] - Required. The ID of the Cloud Platform project that the job | 1390 * [projectId] - Required. The ID of the Cloud Platform project that the job |
1391 * belongs to. | 1391 * belongs to. |
1392 * | 1392 * |
1393 * [dryRun] - Whether or not the job should actually be executed after | |
1394 * validating parameters. Defaults to false. Validation errors do | |
1395 * not cause the HTTP request to fail if true. | |
1396 * | |
1397 * [gcsPath] - Required. A Cloud Storage path to the template from which to | 1393 * [gcsPath] - Required. A Cloud Storage path to the template from which to |
1398 * create | 1394 * create |
1399 * the job. | 1395 * the job. |
1400 * Must be valid Cloud Storage URL, beginning with 'gs://'. | 1396 * Must be valid Cloud Storage URL, beginning with 'gs://'. |
1401 * | 1397 * |
| 1398 * [dryRun] - Whether or not the job should actually be executed after |
| 1399 * validating parameters. Defaults to false. Validation errors do |
| 1400 * not cause the HTTP request to fail if true. |
| 1401 * |
1402 * Completes with a [LaunchTemplateResponse]. | 1402 * Completes with a [LaunchTemplateResponse]. |
1403 * | 1403 * |
1404 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1404 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1405 * error. | 1405 * error. |
1406 * | 1406 * |
1407 * If the used [http.Client] completes with an error when making a REST call, | 1407 * If the used [http.Client] completes with an error when making a REST call, |
1408 * this method will complete with the same error. | 1408 * this method will complete with the same error. |
1409 */ | 1409 */ |
1410 async.Future<LaunchTemplateResponse> launch(LaunchTemplateParameters request,
core.String projectId, {core.bool dryRun, core.String gcsPath}) { | 1410 async.Future<LaunchTemplateResponse> launch(LaunchTemplateParameters request,
core.String projectId, {core.String gcsPath, core.bool dryRun}) { |
1411 var _url = null; | 1411 var _url = null; |
1412 var _queryParams = new core.Map(); | 1412 var _queryParams = new core.Map(); |
1413 var _uploadMedia = null; | 1413 var _uploadMedia = null; |
1414 var _uploadOptions = null; | 1414 var _uploadOptions = null; |
1415 var _downloadOptions = commons.DownloadOptions.Metadata; | 1415 var _downloadOptions = commons.DownloadOptions.Metadata; |
1416 var _body = null; | 1416 var _body = null; |
1417 | 1417 |
1418 if (request != null) { | 1418 if (request != null) { |
1419 _body = convert.JSON.encode((request).toJson()); | 1419 _body = convert.JSON.encode((request).toJson()); |
1420 } | 1420 } |
1421 if (projectId == null) { | 1421 if (projectId == null) { |
1422 throw new core.ArgumentError("Parameter projectId is required."); | 1422 throw new core.ArgumentError("Parameter projectId is required."); |
1423 } | 1423 } |
| 1424 if (gcsPath != null) { |
| 1425 _queryParams["gcsPath"] = [gcsPath]; |
| 1426 } |
1424 if (dryRun != null) { | 1427 if (dryRun != null) { |
1425 _queryParams["dryRun"] = ["${dryRun}"]; | 1428 _queryParams["dryRun"] = ["${dryRun}"]; |
1426 } | 1429 } |
1427 if (gcsPath != null) { | |
1428 _queryParams["gcsPath"] = [gcsPath]; | |
1429 } | |
1430 | 1430 |
1431 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/te
mplates:launch'; | 1431 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/te
mplates:launch'; |
1432 | 1432 |
1433 var _response = _requester.request(_url, | 1433 var _response = _requester.request(_url, |
1434 "POST", | 1434 "POST", |
1435 body: _body, | 1435 body: _body, |
1436 queryParams: _queryParams, | 1436 queryParams: _queryParams, |
1437 uploadOptions: _uploadOptions, | 1437 uploadOptions: _uploadOptions, |
1438 uploadMedia: _uploadMedia, | 1438 uploadMedia: _uploadMedia, |
1439 downloadOptions: _downloadOptions); | 1439 downloadOptions: _downloadOptions); |
(...skipping 2396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3836 * This name is local to the Google Cloud Platform project and uniquely | 3836 * This name is local to the Google Cloud Platform project and uniquely |
3837 * identifies the disk within that project, for example | 3837 * identifies the disk within that project, for example |
3838 * "myproject-1014-104817-4c2-harness-0-disk-1". | 3838 * "myproject-1014-104817-4c2-harness-0-disk-1". |
3839 */ | 3839 */ |
3840 core.String dataDisk; | 3840 core.String dataDisk; |
3841 /** | 3841 /** |
3842 * The physical location of this range assignment to be used for | 3842 * The physical location of this range assignment to be used for |
3843 * streaming computation cross-worker message delivery. | 3843 * streaming computation cross-worker message delivery. |
3844 */ | 3844 */ |
3845 core.String deliveryEndpoint; | 3845 core.String deliveryEndpoint; |
| 3846 /** |
| 3847 * DEPRECATED. The location of the persistent state for this range, as a |
| 3848 * persistent directory in the worker local filesystem. |
| 3849 */ |
| 3850 core.String deprecatedPersistentDirectory; |
3846 /** The end (exclusive) of the key range. */ | 3851 /** The end (exclusive) of the key range. */ |
3847 core.String end; | 3852 core.String end; |
3848 /** | |
3849 * The location of the persistent state for this range, as a | |
3850 * persistent directory in the worker local filesystem. | |
3851 */ | |
3852 core.String persistentDirectory; | |
3853 /** The start (inclusive) of the key range. */ | 3853 /** The start (inclusive) of the key range. */ |
3854 core.String start; | 3854 core.String start; |
3855 | 3855 |
3856 KeyRangeLocation(); | 3856 KeyRangeLocation(); |
3857 | 3857 |
3858 KeyRangeLocation.fromJson(core.Map _json) { | 3858 KeyRangeLocation.fromJson(core.Map _json) { |
3859 if (_json.containsKey("dataDisk")) { | 3859 if (_json.containsKey("dataDisk")) { |
3860 dataDisk = _json["dataDisk"]; | 3860 dataDisk = _json["dataDisk"]; |
3861 } | 3861 } |
3862 if (_json.containsKey("deliveryEndpoint")) { | 3862 if (_json.containsKey("deliveryEndpoint")) { |
3863 deliveryEndpoint = _json["deliveryEndpoint"]; | 3863 deliveryEndpoint = _json["deliveryEndpoint"]; |
3864 } | 3864 } |
| 3865 if (_json.containsKey("deprecatedPersistentDirectory")) { |
| 3866 deprecatedPersistentDirectory = _json["deprecatedPersistentDirectory"]; |
| 3867 } |
3865 if (_json.containsKey("end")) { | 3868 if (_json.containsKey("end")) { |
3866 end = _json["end"]; | 3869 end = _json["end"]; |
3867 } | 3870 } |
3868 if (_json.containsKey("persistentDirectory")) { | |
3869 persistentDirectory = _json["persistentDirectory"]; | |
3870 } | |
3871 if (_json.containsKey("start")) { | 3871 if (_json.containsKey("start")) { |
3872 start = _json["start"]; | 3872 start = _json["start"]; |
3873 } | 3873 } |
3874 } | 3874 } |
3875 | 3875 |
3876 core.Map toJson() { | 3876 core.Map toJson() { |
3877 var _json = new core.Map(); | 3877 var _json = new core.Map(); |
3878 if (dataDisk != null) { | 3878 if (dataDisk != null) { |
3879 _json["dataDisk"] = dataDisk; | 3879 _json["dataDisk"] = dataDisk; |
3880 } | 3880 } |
3881 if (deliveryEndpoint != null) { | 3881 if (deliveryEndpoint != null) { |
3882 _json["deliveryEndpoint"] = deliveryEndpoint; | 3882 _json["deliveryEndpoint"] = deliveryEndpoint; |
3883 } | 3883 } |
| 3884 if (deprecatedPersistentDirectory != null) { |
| 3885 _json["deprecatedPersistentDirectory"] = deprecatedPersistentDirectory; |
| 3886 } |
3884 if (end != null) { | 3887 if (end != null) { |
3885 _json["end"] = end; | 3888 _json["end"] = end; |
3886 } | 3889 } |
3887 if (persistentDirectory != null) { | |
3888 _json["persistentDirectory"] = persistentDirectory; | |
3889 } | |
3890 if (start != null) { | 3890 if (start != null) { |
3891 _json["start"] = start; | 3891 _json["start"] = start; |
3892 } | 3892 } |
3893 return _json; | 3893 return _json; |
3894 } | 3894 } |
3895 } | 3895 } |
3896 | 3896 |
3897 /** Parameters to provide to the template being launched. */ | 3897 /** Parameters to provide to the template being launched. */ |
3898 class LaunchTemplateParameters { | 3898 class LaunchTemplateParameters { |
3899 /** The runtime environment for the job. */ | 3899 /** The runtime environment for the job. */ |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3932 } | 3932 } |
3933 } | 3933 } |
3934 | 3934 |
3935 /** Response to the request to launch a template. */ | 3935 /** Response to the request to launch a template. */ |
3936 class LaunchTemplateResponse { | 3936 class LaunchTemplateResponse { |
3937 /** | 3937 /** |
3938 * The job that was launched, if the request was not a dry run and | 3938 * The job that was launched, if the request was not a dry run and |
3939 * the job was successfully launched. | 3939 * the job was successfully launched. |
3940 */ | 3940 */ |
3941 Job job; | 3941 Job job; |
3942 /** | |
3943 * The status of the launch template request. Any problems with the request | |
3944 * will be indicated in the error_details. | |
3945 */ | |
3946 Status status; | |
3947 | 3942 |
3948 LaunchTemplateResponse(); | 3943 LaunchTemplateResponse(); |
3949 | 3944 |
3950 LaunchTemplateResponse.fromJson(core.Map _json) { | 3945 LaunchTemplateResponse.fromJson(core.Map _json) { |
3951 if (_json.containsKey("job")) { | 3946 if (_json.containsKey("job")) { |
3952 job = new Job.fromJson(_json["job"]); | 3947 job = new Job.fromJson(_json["job"]); |
3953 } | 3948 } |
3954 if (_json.containsKey("status")) { | |
3955 status = new Status.fromJson(_json["status"]); | |
3956 } | |
3957 } | 3949 } |
3958 | 3950 |
3959 core.Map toJson() { | 3951 core.Map toJson() { |
3960 var _json = new core.Map(); | 3952 var _json = new core.Map(); |
3961 if (job != null) { | 3953 if (job != null) { |
3962 _json["job"] = (job).toJson(); | 3954 _json["job"] = (job).toJson(); |
3963 } | 3955 } |
3964 if (status != null) { | |
3965 _json["status"] = (status).toJson(); | |
3966 } | |
3967 return _json; | 3956 return _json; |
3968 } | 3957 } |
3969 } | 3958 } |
3970 | 3959 |
3971 /** Request to lease WorkItems. */ | 3960 /** Request to lease WorkItems. */ |
3972 class LeaseWorkItemRequest { | 3961 class LeaseWorkItemRequest { |
3973 /** The current timestamp at the worker. */ | 3962 /** The current timestamp at the worker. */ |
3974 core.String currentWorkerTime; | 3963 core.String currentWorkerTime; |
3975 /** The location which contains the WorkItem's job. */ | 3964 /** The location which contains the WorkItem's job. */ |
3976 core.String location; | 3965 core.String location; |
(...skipping 4224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8201 var _json = new core.Map(); | 8190 var _json = new core.Map(); |
8202 if (input != null) { | 8191 if (input != null) { |
8203 _json["input"] = (input).toJson(); | 8192 _json["input"] = (input).toJson(); |
8204 } | 8193 } |
8205 if (sink != null) { | 8194 if (sink != null) { |
8206 _json["sink"] = (sink).toJson(); | 8195 _json["sink"] = (sink).toJson(); |
8207 } | 8196 } |
8208 return _json; | 8197 return _json; |
8209 } | 8198 } |
8210 } | 8199 } |
OLD | NEW |