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.storagetransfer.v1; | 3 library googleapis.storagetransfer.v1; |
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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 uploadMedia: _uploadMedia, | 183 uploadMedia: _uploadMedia, |
184 downloadOptions: _downloadOptions); | 184 downloadOptions: _downloadOptions); |
185 return _response.then((data) => new TransferJob.fromJson(data)); | 185 return _response.then((data) => new TransferJob.fromJson(data)); |
186 } | 186 } |
187 | 187 |
188 /** | 188 /** |
189 * Lists transfer jobs. | 189 * Lists transfer jobs. |
190 * | 190 * |
191 * Request parameters: | 191 * Request parameters: |
192 * | 192 * |
| 193 * [pageToken] - The list page token. |
| 194 * |
193 * [pageSize] - The list page size. The max allowed value is 256. | 195 * [pageSize] - The list page size. The max allowed value is 256. |
194 * | 196 * |
195 * [filter] - A list of query parameters specified as JSON text in the form of | 197 * [filter] - A list of query parameters specified as JSON text in the form of |
196 * {"project_id":"my_project_id", | 198 * {"project_id":"my_project_id", |
197 * "job_names":["jobid1","jobid2",...], | 199 * "job_names":["jobid1","jobid2",...], |
198 * "job_statuses":["status1","status2",...]}. | 200 * "job_statuses":["status1","status2",...]}. |
199 * Since `job_names` and `job_statuses` support multiple values, their values | 201 * Since `job_names` and `job_statuses` support multiple values, their values |
200 * must be specified with array notation. `project_id` is required. | 202 * must be specified with array notation. `project_id` is required. |
201 * `job_names` | 203 * `job_names` |
202 * and `job_statuses` are optional. The valid values for `job_statuses` are | 204 * and `job_statuses` are optional. The valid values for `job_statuses` are |
203 * case-insensitive: `ENABLED`, `DISABLED`, and `DELETED`. | 205 * case-insensitive: `ENABLED`, `DISABLED`, and `DELETED`. |
204 * | 206 * |
205 * [pageToken] - The list page token. | |
206 * | |
207 * Completes with a [ListTransferJobsResponse]. | 207 * Completes with a [ListTransferJobsResponse]. |
208 * | 208 * |
209 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 209 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
210 * error. | 210 * error. |
211 * | 211 * |
212 * If the used [http.Client] completes with an error when making a REST call, | 212 * If the used [http.Client] completes with an error when making a REST call, |
213 * this method will complete with the same error. | 213 * this method will complete with the same error. |
214 */ | 214 */ |
215 async.Future<ListTransferJobsResponse> list({core.int pageSize, core.String fi
lter, core.String pageToken}) { | 215 async.Future<ListTransferJobsResponse> list({core.String pageToken, core.int p
ageSize, core.String filter}) { |
216 var _url = null; | 216 var _url = null; |
217 var _queryParams = new core.Map(); | 217 var _queryParams = new core.Map(); |
218 var _uploadMedia = null; | 218 var _uploadMedia = null; |
219 var _uploadOptions = null; | 219 var _uploadOptions = null; |
220 var _downloadOptions = commons.DownloadOptions.Metadata; | 220 var _downloadOptions = commons.DownloadOptions.Metadata; |
221 var _body = null; | 221 var _body = null; |
222 | 222 |
| 223 if (pageToken != null) { |
| 224 _queryParams["pageToken"] = [pageToken]; |
| 225 } |
223 if (pageSize != null) { | 226 if (pageSize != null) { |
224 _queryParams["pageSize"] = ["${pageSize}"]; | 227 _queryParams["pageSize"] = ["${pageSize}"]; |
225 } | 228 } |
226 if (filter != null) { | 229 if (filter != null) { |
227 _queryParams["filter"] = [filter]; | 230 _queryParams["filter"] = [filter]; |
228 } | 231 } |
229 if (pageToken != null) { | |
230 _queryParams["pageToken"] = [pageToken]; | |
231 } | |
232 | 232 |
233 _url = 'v1/transferJobs'; | 233 _url = 'v1/transferJobs'; |
234 | 234 |
235 var _response = _requester.request(_url, | 235 var _response = _requester.request(_url, |
236 "GET", | 236 "GET", |
237 body: _body, | 237 body: _body, |
238 queryParams: _queryParams, | 238 queryParams: _queryParams, |
239 uploadOptions: _uploadOptions, | 239 uploadOptions: _uploadOptions, |
240 uploadMedia: _uploadMedia, | 240 uploadMedia: _uploadMedia, |
241 downloadOptions: _downloadOptions); | 241 downloadOptions: _downloadOptions); |
(...skipping 1217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1459 * results in its response, the status of those operations should be | 1459 * results in its response, the status of those operations should be |
1460 * represented directly using the `Status` message. | 1460 * represented directly using the `Status` message. |
1461 * | 1461 * |
1462 * - Logging. If some API errors are stored in logs, the message `Status` could | 1462 * - Logging. If some API errors are stored in logs, the message `Status` could |
1463 * be used directly after any stripping needed for security/privacy reasons. | 1463 * be used directly after any stripping needed for security/privacy reasons. |
1464 */ | 1464 */ |
1465 class Status { | 1465 class Status { |
1466 /** The status code, which should be an enum value of google.rpc.Code. */ | 1466 /** The status code, which should be an enum value of google.rpc.Code. */ |
1467 core.int code; | 1467 core.int code; |
1468 /** | 1468 /** |
1469 * A list of messages that carry the error details. There will be a | 1469 * A list of messages that carry the error details. There is a common set of |
1470 * common set of message types for APIs to use. | 1470 * message types for APIs to use. |
1471 * | 1471 * |
1472 * The values for Object must be JSON objects. It can consist of `num`, | 1472 * The values for Object must be JSON objects. It can consist of `num`, |
1473 * `String`, `bool` and `null` as well as `Map` and `List` values. | 1473 * `String`, `bool` and `null` as well as `Map` and `List` values. |
1474 */ | 1474 */ |
1475 core.List<core.Map<core.String, core.Object>> details; | 1475 core.List<core.Map<core.String, core.Object>> details; |
1476 /** | 1476 /** |
1477 * A developer-facing error message, which should be in English. Any | 1477 * A developer-facing error message, which should be in English. Any |
1478 * user-facing error message should be localized and sent in the | 1478 * user-facing error message should be localized and sent in the |
1479 * google.rpc.Status.details field, or localized by the client. | 1479 * google.rpc.Status.details field, or localized by the client. |
1480 */ | 1480 */ |
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2109 } | 2109 } |
2110 if (transferJob != null) { | 2110 if (transferJob != null) { |
2111 _json["transferJob"] = (transferJob).toJson(); | 2111 _json["transferJob"] = (transferJob).toJson(); |
2112 } | 2112 } |
2113 if (updateTransferJobFieldMask != null) { | 2113 if (updateTransferJobFieldMask != null) { |
2114 _json["updateTransferJobFieldMask"] = updateTransferJobFieldMask; | 2114 _json["updateTransferJobFieldMask"] = updateTransferJobFieldMask; |
2115 } | 2115 } |
2116 return _json; | 2116 return _json; |
2117 } | 2117 } |
2118 } | 2118 } |
OLD | NEW |