OLD | NEW |
(Empty) | |
| 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 |
| 3 library googleapis.storagetransfer.v1; |
| 4 |
| 5 import 'dart:core' as core; |
| 6 import 'dart:async' as async; |
| 7 import 'dart:convert' as convert; |
| 8 |
| 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 10 import 'package:http/http.dart' as http; |
| 11 |
| 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
| 13 ApiRequestError, DetailedApiRequestError; |
| 14 |
| 15 const core.String USER_AGENT = 'dart-api-client storagetransfer/v1'; |
| 16 |
| 17 /** |
| 18 * Transfers data from external data sources to a Google Cloud Storage bucket or |
| 19 * between Google Cloud Storage buckets. |
| 20 */ |
| 21 class StoragetransferApi { |
| 22 /** View and manage your data across Google Cloud Platform services */ |
| 23 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; |
| 24 |
| 25 |
| 26 final commons.ApiRequester _requester; |
| 27 |
| 28 GoogleServiceAccountsResourceApi get googleServiceAccounts => new GoogleServic
eAccountsResourceApi(_requester); |
| 29 TransferJobsResourceApi get transferJobs => new TransferJobsResourceApi(_reque
ster); |
| 30 TransferOperationsResourceApi get transferOperations => new TransferOperations
ResourceApi(_requester); |
| 31 V1ResourceApi get v1 => new V1ResourceApi(_requester); |
| 32 |
| 33 StoragetransferApi(http.Client client, {core.String rootUrl: "https://storaget
ransfer.googleapis.com/", core.String servicePath: ""}) : |
| 34 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
| 35 } |
| 36 |
| 37 |
| 38 class GoogleServiceAccountsResourceApi { |
| 39 final commons.ApiRequester _requester; |
| 40 |
| 41 GoogleServiceAccountsResourceApi(commons.ApiRequester client) : |
| 42 _requester = client; |
| 43 |
| 44 /** |
| 45 * Returns the Google service account that is used by Storage Transfer Service |
| 46 * to access buckets in the project where transfers run or in other projects. |
| 47 * Each Google service account is associated with one Google Developers |
| 48 * Console project. Users should add this service account to the Google Cloud |
| 49 * Storage bucket ACLs to grant access to Storage Transfer Service. This |
| 50 * service account is created and owned by Storage Transfer Service and can |
| 51 * only be used by Storage Transfer Service. |
| 52 * |
| 53 * Request parameters: |
| 54 * |
| 55 * [projectId] - The ID of the Google Developers Console project that the |
| 56 * Google service account is associated with. Required. |
| 57 * |
| 58 * Completes with a [GoogleServiceAccount]. |
| 59 * |
| 60 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 61 * error. |
| 62 * |
| 63 * If the used [http.Client] completes with an error when making a REST call, |
| 64 * this method will complete with the same error. |
| 65 */ |
| 66 async.Future<GoogleServiceAccount> get(core.String projectId) { |
| 67 var _url = null; |
| 68 var _queryParams = new core.Map(); |
| 69 var _uploadMedia = null; |
| 70 var _uploadOptions = null; |
| 71 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 72 var _body = null; |
| 73 |
| 74 if (projectId == null) { |
| 75 throw new core.ArgumentError("Parameter projectId is required."); |
| 76 } |
| 77 |
| 78 _url = 'v1/googleServiceAccounts/' + commons.Escaper.ecapeVariable('$project
Id'); |
| 79 |
| 80 var _response = _requester.request(_url, |
| 81 "GET", |
| 82 body: _body, |
| 83 queryParams: _queryParams, |
| 84 uploadOptions: _uploadOptions, |
| 85 uploadMedia: _uploadMedia, |
| 86 downloadOptions: _downloadOptions); |
| 87 return _response.then((data) => new GoogleServiceAccount.fromJson(data)); |
| 88 } |
| 89 |
| 90 } |
| 91 |
| 92 |
| 93 class TransferJobsResourceApi { |
| 94 final commons.ApiRequester _requester; |
| 95 |
| 96 TransferJobsResourceApi(commons.ApiRequester client) : |
| 97 _requester = client; |
| 98 |
| 99 /** |
| 100 * Creates a transfer job that runs periodically. |
| 101 * |
| 102 * [request] - The metadata request object. |
| 103 * |
| 104 * Request parameters: |
| 105 * |
| 106 * Completes with a [TransferJob]. |
| 107 * |
| 108 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 109 * error. |
| 110 * |
| 111 * If the used [http.Client] completes with an error when making a REST call, |
| 112 * this method will complete with the same error. |
| 113 */ |
| 114 async.Future<TransferJob> create(TransferJob request) { |
| 115 var _url = null; |
| 116 var _queryParams = new core.Map(); |
| 117 var _uploadMedia = null; |
| 118 var _uploadOptions = null; |
| 119 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 120 var _body = null; |
| 121 |
| 122 if (request != null) { |
| 123 _body = convert.JSON.encode((request).toJson()); |
| 124 } |
| 125 |
| 126 _url = 'v1/transferJobs'; |
| 127 |
| 128 var _response = _requester.request(_url, |
| 129 "POST", |
| 130 body: _body, |
| 131 queryParams: _queryParams, |
| 132 uploadOptions: _uploadOptions, |
| 133 uploadMedia: _uploadMedia, |
| 134 downloadOptions: _downloadOptions); |
| 135 return _response.then((data) => new TransferJob.fromJson(data)); |
| 136 } |
| 137 |
| 138 /** |
| 139 * Gets a transfer job. |
| 140 * |
| 141 * Request parameters: |
| 142 * |
| 143 * [jobName] - The job to get. Required. |
| 144 * Value must have pattern "^transferJobs/.*$". |
| 145 * |
| 146 * [projectId] - The ID of the Google Developers Console project that owns the |
| 147 * job. Required. |
| 148 * |
| 149 * Completes with a [TransferJob]. |
| 150 * |
| 151 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 152 * error. |
| 153 * |
| 154 * If the used [http.Client] completes with an error when making a REST call, |
| 155 * this method will complete with the same error. |
| 156 */ |
| 157 async.Future<TransferJob> get(core.String jobName, {core.String projectId}) { |
| 158 var _url = null; |
| 159 var _queryParams = new core.Map(); |
| 160 var _uploadMedia = null; |
| 161 var _uploadOptions = null; |
| 162 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 163 var _body = null; |
| 164 |
| 165 if (jobName == null) { |
| 166 throw new core.ArgumentError("Parameter jobName is required."); |
| 167 } |
| 168 if (projectId != null) { |
| 169 _queryParams["projectId"] = [projectId]; |
| 170 } |
| 171 |
| 172 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$jobName'); |
| 173 |
| 174 var _response = _requester.request(_url, |
| 175 "GET", |
| 176 body: _body, |
| 177 queryParams: _queryParams, |
| 178 uploadOptions: _uploadOptions, |
| 179 uploadMedia: _uploadMedia, |
| 180 downloadOptions: _downloadOptions); |
| 181 return _response.then((data) => new TransferJob.fromJson(data)); |
| 182 } |
| 183 |
| 184 /** |
| 185 * Lists transfer jobs. |
| 186 * |
| 187 * Request parameters: |
| 188 * |
| 189 * [filter] - A list of query parameters specified as JSON text in the form of |
| 190 * {"`project_id`":"my_project_id", "`job_names`":["jobid1","jobid2",...], |
| 191 * "`job_statuses`":["status1","status2",...]}. Since `job_names` and |
| 192 * `job_statuses` support multiple values, their values must be specified with |
| 193 * array notation. `project_id` is required. `job_names` and `job_statuses` |
| 194 * are optional. The valid values for `job_statuses` are case-insensitive: |
| 195 * `ENABLED`, `DISABLED`, and `DELETED`. |
| 196 * |
| 197 * [pageSize] - The list page size. The max allowed value is 256. |
| 198 * |
| 199 * [pageToken] - The list page token. |
| 200 * |
| 201 * Completes with a [ListTransferJobsResponse]. |
| 202 * |
| 203 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 204 * error. |
| 205 * |
| 206 * If the used [http.Client] completes with an error when making a REST call, |
| 207 * this method will complete with the same error. |
| 208 */ |
| 209 async.Future<ListTransferJobsResponse> list({core.String filter, core.int page
Size, core.String pageToken}) { |
| 210 var _url = null; |
| 211 var _queryParams = new core.Map(); |
| 212 var _uploadMedia = null; |
| 213 var _uploadOptions = null; |
| 214 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 215 var _body = null; |
| 216 |
| 217 if (filter != null) { |
| 218 _queryParams["filter"] = [filter]; |
| 219 } |
| 220 if (pageSize != null) { |
| 221 _queryParams["pageSize"] = ["${pageSize}"]; |
| 222 } |
| 223 if (pageToken != null) { |
| 224 _queryParams["pageToken"] = [pageToken]; |
| 225 } |
| 226 |
| 227 _url = 'v1/transferJobs'; |
| 228 |
| 229 var _response = _requester.request(_url, |
| 230 "GET", |
| 231 body: _body, |
| 232 queryParams: _queryParams, |
| 233 uploadOptions: _uploadOptions, |
| 234 uploadMedia: _uploadMedia, |
| 235 downloadOptions: _downloadOptions); |
| 236 return _response.then((data) => new ListTransferJobsResponse.fromJson(data))
; |
| 237 } |
| 238 |
| 239 /** |
| 240 * Updates a transfer job. Updating a job's transfer spec does not affect |
| 241 * transfer operations that are running already. Updating the scheduling of a |
| 242 * job is not allowed. |
| 243 * |
| 244 * [request] - The metadata request object. |
| 245 * |
| 246 * Request parameters: |
| 247 * |
| 248 * [jobName] - The name of job to update. Required. |
| 249 * Value must have pattern "^transferJobs/.*$". |
| 250 * |
| 251 * Completes with a [TransferJob]. |
| 252 * |
| 253 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 254 * error. |
| 255 * |
| 256 * If the used [http.Client] completes with an error when making a REST call, |
| 257 * this method will complete with the same error. |
| 258 */ |
| 259 async.Future<TransferJob> patch(UpdateTransferJobRequest request, core.String
jobName) { |
| 260 var _url = null; |
| 261 var _queryParams = new core.Map(); |
| 262 var _uploadMedia = null; |
| 263 var _uploadOptions = null; |
| 264 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 265 var _body = null; |
| 266 |
| 267 if (request != null) { |
| 268 _body = convert.JSON.encode((request).toJson()); |
| 269 } |
| 270 if (jobName == null) { |
| 271 throw new core.ArgumentError("Parameter jobName is required."); |
| 272 } |
| 273 |
| 274 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$jobName'); |
| 275 |
| 276 var _response = _requester.request(_url, |
| 277 "PATCH", |
| 278 body: _body, |
| 279 queryParams: _queryParams, |
| 280 uploadOptions: _uploadOptions, |
| 281 uploadMedia: _uploadMedia, |
| 282 downloadOptions: _downloadOptions); |
| 283 return _response.then((data) => new TransferJob.fromJson(data)); |
| 284 } |
| 285 |
| 286 } |
| 287 |
| 288 |
| 289 class TransferOperationsResourceApi { |
| 290 final commons.ApiRequester _requester; |
| 291 |
| 292 TransferOperationsResourceApi(commons.ApiRequester client) : |
| 293 _requester = client; |
| 294 |
| 295 /** |
| 296 * Cancels a transfer. Use the get method to check whether the cancellation |
| 297 * succeeded or whether the operation completed despite cancellation. |
| 298 * |
| 299 * Request parameters: |
| 300 * |
| 301 * [name] - The name of the operation resource to be cancelled. |
| 302 * Value must have pattern "^transferOperations/.*$". |
| 303 * |
| 304 * Completes with a [Empty]. |
| 305 * |
| 306 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 307 * error. |
| 308 * |
| 309 * If the used [http.Client] completes with an error when making a REST call, |
| 310 * this method will complete with the same error. |
| 311 */ |
| 312 async.Future<Empty> cancel(core.String name) { |
| 313 var _url = null; |
| 314 var _queryParams = new core.Map(); |
| 315 var _uploadMedia = null; |
| 316 var _uploadOptions = null; |
| 317 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 318 var _body = null; |
| 319 |
| 320 if (name == null) { |
| 321 throw new core.ArgumentError("Parameter name is required."); |
| 322 } |
| 323 |
| 324 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':cancel'; |
| 325 |
| 326 var _response = _requester.request(_url, |
| 327 "POST", |
| 328 body: _body, |
| 329 queryParams: _queryParams, |
| 330 uploadOptions: _uploadOptions, |
| 331 uploadMedia: _uploadMedia, |
| 332 downloadOptions: _downloadOptions); |
| 333 return _response.then((data) => new Empty.fromJson(data)); |
| 334 } |
| 335 |
| 336 /** |
| 337 * This method is not supported and the server returns `UNIMPLEMENTED`. |
| 338 * |
| 339 * Request parameters: |
| 340 * |
| 341 * [name] - The name of the operation resource to be deleted. |
| 342 * Value must have pattern "^transferOperations/.*$". |
| 343 * |
| 344 * Completes with a [Empty]. |
| 345 * |
| 346 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 347 * error. |
| 348 * |
| 349 * If the used [http.Client] completes with an error when making a REST call, |
| 350 * this method will complete with the same error. |
| 351 */ |
| 352 async.Future<Empty> delete(core.String name) { |
| 353 var _url = null; |
| 354 var _queryParams = new core.Map(); |
| 355 var _uploadMedia = null; |
| 356 var _uploadOptions = null; |
| 357 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 358 var _body = null; |
| 359 |
| 360 if (name == null) { |
| 361 throw new core.ArgumentError("Parameter name is required."); |
| 362 } |
| 363 |
| 364 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 365 |
| 366 var _response = _requester.request(_url, |
| 367 "DELETE", |
| 368 body: _body, |
| 369 queryParams: _queryParams, |
| 370 uploadOptions: _uploadOptions, |
| 371 uploadMedia: _uploadMedia, |
| 372 downloadOptions: _downloadOptions); |
| 373 return _response.then((data) => new Empty.fromJson(data)); |
| 374 } |
| 375 |
| 376 /** |
| 377 * Gets the latest state of a long-running operation. Clients can use this |
| 378 * method to poll the operation result at intervals as recommended by the API |
| 379 * service. |
| 380 * |
| 381 * Request parameters: |
| 382 * |
| 383 * [name] - The name of the operation resource. |
| 384 * Value must have pattern "^transferOperations/.*$". |
| 385 * |
| 386 * Completes with a [Operation]. |
| 387 * |
| 388 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 389 * error. |
| 390 * |
| 391 * If the used [http.Client] completes with an error when making a REST call, |
| 392 * this method will complete with the same error. |
| 393 */ |
| 394 async.Future<Operation> get(core.String name) { |
| 395 var _url = null; |
| 396 var _queryParams = new core.Map(); |
| 397 var _uploadMedia = null; |
| 398 var _uploadOptions = null; |
| 399 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 400 var _body = null; |
| 401 |
| 402 if (name == null) { |
| 403 throw new core.ArgumentError("Parameter name is required."); |
| 404 } |
| 405 |
| 406 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 407 |
| 408 var _response = _requester.request(_url, |
| 409 "GET", |
| 410 body: _body, |
| 411 queryParams: _queryParams, |
| 412 uploadOptions: _uploadOptions, |
| 413 uploadMedia: _uploadMedia, |
| 414 downloadOptions: _downloadOptions); |
| 415 return _response.then((data) => new Operation.fromJson(data)); |
| 416 } |
| 417 |
| 418 /** |
| 419 * Lists operations that match the specified filter in the request. If the |
| 420 * server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the |
| 421 * `name` binding below allows API services to override the binding to use |
| 422 * different resource name schemes, such as `users / * /operations`. |
| 423 * |
| 424 * Request parameters: |
| 425 * |
| 426 * [name] - The value `transferOperations`. |
| 427 * Value must have pattern "^transferOperations$". |
| 428 * |
| 429 * [filter] - The standard list filter. |
| 430 * |
| 431 * [pageSize] - The standard list page size. |
| 432 * |
| 433 * [pageToken] - The standard list page token. |
| 434 * |
| 435 * Completes with a [ListOperationsResponse]. |
| 436 * |
| 437 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 438 * error. |
| 439 * |
| 440 * If the used [http.Client] completes with an error when making a REST call, |
| 441 * this method will complete with the same error. |
| 442 */ |
| 443 async.Future<ListOperationsResponse> list(core.String name, {core.String filte
r, core.int pageSize, core.String pageToken}) { |
| 444 var _url = null; |
| 445 var _queryParams = new core.Map(); |
| 446 var _uploadMedia = null; |
| 447 var _uploadOptions = null; |
| 448 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 449 var _body = null; |
| 450 |
| 451 if (name == null) { |
| 452 throw new core.ArgumentError("Parameter name is required."); |
| 453 } |
| 454 if (filter != null) { |
| 455 _queryParams["filter"] = [filter]; |
| 456 } |
| 457 if (pageSize != null) { |
| 458 _queryParams["pageSize"] = ["${pageSize}"]; |
| 459 } |
| 460 if (pageToken != null) { |
| 461 _queryParams["pageToken"] = [pageToken]; |
| 462 } |
| 463 |
| 464 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
| 465 |
| 466 var _response = _requester.request(_url, |
| 467 "GET", |
| 468 body: _body, |
| 469 queryParams: _queryParams, |
| 470 uploadOptions: _uploadOptions, |
| 471 uploadMedia: _uploadMedia, |
| 472 downloadOptions: _downloadOptions); |
| 473 return _response.then((data) => new ListOperationsResponse.fromJson(data)); |
| 474 } |
| 475 |
| 476 /** |
| 477 * Pauses a transfer operation. |
| 478 * |
| 479 * [request] - The metadata request object. |
| 480 * |
| 481 * Request parameters: |
| 482 * |
| 483 * [name] - The name of the transfer operation. Required. |
| 484 * Value must have pattern "^transferOperations/.*$". |
| 485 * |
| 486 * Completes with a [Empty]. |
| 487 * |
| 488 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 489 * error. |
| 490 * |
| 491 * If the used [http.Client] completes with an error when making a REST call, |
| 492 * this method will complete with the same error. |
| 493 */ |
| 494 async.Future<Empty> pause(PauseTransferOperationRequest request, core.String n
ame) { |
| 495 var _url = null; |
| 496 var _queryParams = new core.Map(); |
| 497 var _uploadMedia = null; |
| 498 var _uploadOptions = null; |
| 499 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 500 var _body = null; |
| 501 |
| 502 if (request != null) { |
| 503 _body = convert.JSON.encode((request).toJson()); |
| 504 } |
| 505 if (name == null) { |
| 506 throw new core.ArgumentError("Parameter name is required."); |
| 507 } |
| 508 |
| 509 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':pause'; |
| 510 |
| 511 var _response = _requester.request(_url, |
| 512 "POST", |
| 513 body: _body, |
| 514 queryParams: _queryParams, |
| 515 uploadOptions: _uploadOptions, |
| 516 uploadMedia: _uploadMedia, |
| 517 downloadOptions: _downloadOptions); |
| 518 return _response.then((data) => new Empty.fromJson(data)); |
| 519 } |
| 520 |
| 521 /** |
| 522 * Resumes a transfer operation that is paused. |
| 523 * |
| 524 * [request] - The metadata request object. |
| 525 * |
| 526 * Request parameters: |
| 527 * |
| 528 * [name] - The name of the transfer operation. Required. |
| 529 * Value must have pattern "^transferOperations/.*$". |
| 530 * |
| 531 * Completes with a [Empty]. |
| 532 * |
| 533 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 534 * error. |
| 535 * |
| 536 * If the used [http.Client] completes with an error when making a REST call, |
| 537 * this method will complete with the same error. |
| 538 */ |
| 539 async.Future<Empty> resume(ResumeTransferOperationRequest request, core.String
name) { |
| 540 var _url = null; |
| 541 var _queryParams = new core.Map(); |
| 542 var _uploadMedia = null; |
| 543 var _uploadOptions = null; |
| 544 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 545 var _body = null; |
| 546 |
| 547 if (request != null) { |
| 548 _body = convert.JSON.encode((request).toJson()); |
| 549 } |
| 550 if (name == null) { |
| 551 throw new core.ArgumentError("Parameter name is required."); |
| 552 } |
| 553 |
| 554 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':resume'; |
| 555 |
| 556 var _response = _requester.request(_url, |
| 557 "POST", |
| 558 body: _body, |
| 559 queryParams: _queryParams, |
| 560 uploadOptions: _uploadOptions, |
| 561 uploadMedia: _uploadMedia, |
| 562 downloadOptions: _downloadOptions); |
| 563 return _response.then((data) => new Empty.fromJson(data)); |
| 564 } |
| 565 |
| 566 } |
| 567 |
| 568 |
| 569 class V1ResourceApi { |
| 570 final commons.ApiRequester _requester; |
| 571 |
| 572 V1ResourceApi(commons.ApiRequester client) : |
| 573 _requester = client; |
| 574 |
| 575 /** |
| 576 * Returns the Google service account that is used by Storage Transfer Service |
| 577 * to access buckets in the project where transfers run or in other projects. |
| 578 * Each Google service account is associated with one Google Developers |
| 579 * Console project. Users should add this service account to the Google Cloud |
| 580 * Storage bucket ACLs to grant access to Storage Transfer Service. This |
| 581 * service account is created and owned by Storage Transfer Service and can |
| 582 * only be used by Storage Transfer Service. |
| 583 * |
| 584 * Request parameters: |
| 585 * |
| 586 * [projectId] - The ID of the Google Developers Console project that the |
| 587 * Google service account is associated with. Required. |
| 588 * |
| 589 * Completes with a [GoogleServiceAccount]. |
| 590 * |
| 591 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 592 * error. |
| 593 * |
| 594 * If the used [http.Client] completes with an error when making a REST call, |
| 595 * this method will complete with the same error. |
| 596 */ |
| 597 async.Future<GoogleServiceAccount> getGoogleServiceAccount({core.String projec
tId}) { |
| 598 var _url = null; |
| 599 var _queryParams = new core.Map(); |
| 600 var _uploadMedia = null; |
| 601 var _uploadOptions = null; |
| 602 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 603 var _body = null; |
| 604 |
| 605 if (projectId != null) { |
| 606 _queryParams["projectId"] = [projectId]; |
| 607 } |
| 608 |
| 609 _url = 'v1:getGoogleServiceAccount'; |
| 610 |
| 611 var _response = _requester.request(_url, |
| 612 "GET", |
| 613 body: _body, |
| 614 queryParams: _queryParams, |
| 615 uploadOptions: _uploadOptions, |
| 616 uploadMedia: _uploadMedia, |
| 617 downloadOptions: _downloadOptions); |
| 618 return _response.then((data) => new GoogleServiceAccount.fromJson(data)); |
| 619 } |
| 620 |
| 621 } |
| 622 |
| 623 |
| 624 |
| 625 /** |
| 626 * AWS access key (see [AWS Security |
| 627 * Credentials](http://docs.aws.amazon.com/general/latest/gr/aws-security-creden
tials.html)). |
| 628 */ |
| 629 class AwsAccessKey { |
| 630 /** AWS access key ID. Required. */ |
| 631 core.String accessKeyId; |
| 632 /** |
| 633 * AWS secret access key. This field is not returned in RPC responses. |
| 634 * Required. |
| 635 */ |
| 636 core.String secretAccessKey; |
| 637 |
| 638 AwsAccessKey(); |
| 639 |
| 640 AwsAccessKey.fromJson(core.Map _json) { |
| 641 if (_json.containsKey("accessKeyId")) { |
| 642 accessKeyId = _json["accessKeyId"]; |
| 643 } |
| 644 if (_json.containsKey("secretAccessKey")) { |
| 645 secretAccessKey = _json["secretAccessKey"]; |
| 646 } |
| 647 } |
| 648 |
| 649 core.Map toJson() { |
| 650 var _json = new core.Map(); |
| 651 if (accessKeyId != null) { |
| 652 _json["accessKeyId"] = accessKeyId; |
| 653 } |
| 654 if (secretAccessKey != null) { |
| 655 _json["secretAccessKey"] = secretAccessKey; |
| 656 } |
| 657 return _json; |
| 658 } |
| 659 } |
| 660 |
| 661 /** |
| 662 * An AwsS3Data can be a data source, but not a data sink. In an AwsS3Data, an |
| 663 * object's name is the S3 object's key name. |
| 664 */ |
| 665 class AwsS3Data { |
| 666 /** |
| 667 * AWS access key used to sign the API requests to the AWS S3 bucket. |
| 668 * Permissions on the bucket must be granted to the access ID of the AWS |
| 669 * access key. Required. |
| 670 */ |
| 671 AwsAccessKey awsAccessKey; |
| 672 /** |
| 673 * S3 Bucket name (see [Creating a |
| 674 * bucket](http://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-lo
cation-example.html)). |
| 675 * Required. |
| 676 */ |
| 677 core.String bucketName; |
| 678 |
| 679 AwsS3Data(); |
| 680 |
| 681 AwsS3Data.fromJson(core.Map _json) { |
| 682 if (_json.containsKey("awsAccessKey")) { |
| 683 awsAccessKey = new AwsAccessKey.fromJson(_json["awsAccessKey"]); |
| 684 } |
| 685 if (_json.containsKey("bucketName")) { |
| 686 bucketName = _json["bucketName"]; |
| 687 } |
| 688 } |
| 689 |
| 690 core.Map toJson() { |
| 691 var _json = new core.Map(); |
| 692 if (awsAccessKey != null) { |
| 693 _json["awsAccessKey"] = (awsAccessKey).toJson(); |
| 694 } |
| 695 if (bucketName != null) { |
| 696 _json["bucketName"] = bucketName; |
| 697 } |
| 698 return _json; |
| 699 } |
| 700 } |
| 701 |
| 702 /** |
| 703 * Represents a whole calendar date, e.g. date of birth. The time of day and |
| 704 * time zone are either specified elsewhere or are not significant. The date is |
| 705 * relative to the Proleptic Gregorian Calendar. The day may be 0 to represent a |
| 706 * year and month where the day is not significant, e.g. credit card expiration |
| 707 * date. The year may be 0 to represent a month and day independent of year, |
| 708 * e.g. anniversary date. Related types are |
| 709 * [google.type.TimeOfDay][google.type.TimeOfDay] and |
| 710 * `google.protobuf.Timestamp`. |
| 711 */ |
| 712 class Date { |
| 713 /** |
| 714 * Day of month. Must be from 1 to 31 and valid for the year and month, or 0 |
| 715 * if specifying a year/month where the day is not sigificant. |
| 716 */ |
| 717 core.int day; |
| 718 /** Month of year of date. Must be from 1 to 12. */ |
| 719 core.int month; |
| 720 /** |
| 721 * Year of date. Must be from 1 to 9,999, or 0 if specifying a date without a |
| 722 * year. |
| 723 */ |
| 724 core.int year; |
| 725 |
| 726 Date(); |
| 727 |
| 728 Date.fromJson(core.Map _json) { |
| 729 if (_json.containsKey("day")) { |
| 730 day = _json["day"]; |
| 731 } |
| 732 if (_json.containsKey("month")) { |
| 733 month = _json["month"]; |
| 734 } |
| 735 if (_json.containsKey("year")) { |
| 736 year = _json["year"]; |
| 737 } |
| 738 } |
| 739 |
| 740 core.Map toJson() { |
| 741 var _json = new core.Map(); |
| 742 if (day != null) { |
| 743 _json["day"] = day; |
| 744 } |
| 745 if (month != null) { |
| 746 _json["month"] = month; |
| 747 } |
| 748 if (year != null) { |
| 749 _json["year"] = year; |
| 750 } |
| 751 return _json; |
| 752 } |
| 753 } |
| 754 |
| 755 /** |
| 756 * A generic empty message that you can re-use to avoid defining duplicated |
| 757 * empty messages in your APIs. A typical example is to use it as the request or |
| 758 * the response type of an API method. For instance: service Foo { rpc |
| 759 * Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON |
| 760 * representation for `Empty` is empty JSON object `{}`. |
| 761 */ |
| 762 class Empty { |
| 763 |
| 764 Empty(); |
| 765 |
| 766 Empty.fromJson(core.Map _json) { |
| 767 } |
| 768 |
| 769 core.Map toJson() { |
| 770 var _json = new core.Map(); |
| 771 return _json; |
| 772 } |
| 773 } |
| 774 |
| 775 /** An entry describing an error that has occurred. */ |
| 776 class ErrorLogEntry { |
| 777 /** A list of messages that carry the error details. */ |
| 778 core.List<core.String> errorDetails; |
| 779 /** |
| 780 * A URL that refers to the target (a data source, a data sink, or an object) |
| 781 * with which the error is associated. Required. |
| 782 */ |
| 783 core.String url; |
| 784 |
| 785 ErrorLogEntry(); |
| 786 |
| 787 ErrorLogEntry.fromJson(core.Map _json) { |
| 788 if (_json.containsKey("errorDetails")) { |
| 789 errorDetails = _json["errorDetails"]; |
| 790 } |
| 791 if (_json.containsKey("url")) { |
| 792 url = _json["url"]; |
| 793 } |
| 794 } |
| 795 |
| 796 core.Map toJson() { |
| 797 var _json = new core.Map(); |
| 798 if (errorDetails != null) { |
| 799 _json["errorDetails"] = errorDetails; |
| 800 } |
| 801 if (url != null) { |
| 802 _json["url"] = url; |
| 803 } |
| 804 return _json; |
| 805 } |
| 806 } |
| 807 |
| 808 /** |
| 809 * A summary of errors by error code, plus a count and sample error log entries. |
| 810 */ |
| 811 class ErrorSummary { |
| 812 /** |
| 813 * Required. |
| 814 * Possible string values are: |
| 815 * - "OK" : A OK. |
| 816 * - "CANCELLED" : A CANCELLED. |
| 817 * - "UNKNOWN" : A UNKNOWN. |
| 818 * - "INVALID_ARGUMENT" : A INVALID_ARGUMENT. |
| 819 * - "DEADLINE_EXCEEDED" : A DEADLINE_EXCEEDED. |
| 820 * - "NOT_FOUND" : A NOT_FOUND. |
| 821 * - "ALREADY_EXISTS" : A ALREADY_EXISTS. |
| 822 * - "PERMISSION_DENIED" : A PERMISSION_DENIED. |
| 823 * - "UNAUTHENTICATED" : A UNAUTHENTICATED. |
| 824 * - "RESOURCE_EXHAUSTED" : A RESOURCE_EXHAUSTED. |
| 825 * - "FAILED_PRECONDITION" : A FAILED_PRECONDITION. |
| 826 * - "ABORTED" : A ABORTED. |
| 827 * - "OUT_OF_RANGE" : A OUT_OF_RANGE. |
| 828 * - "UNIMPLEMENTED" : A UNIMPLEMENTED. |
| 829 * - "INTERNAL" : A INTERNAL. |
| 830 * - "UNAVAILABLE" : A UNAVAILABLE. |
| 831 * - "DATA_LOSS" : A DATA_LOSS. |
| 832 */ |
| 833 core.String errorCode; |
| 834 /** Count of this type of error. Required. */ |
| 835 core.String errorCount; |
| 836 /** Error samples. */ |
| 837 core.List<ErrorLogEntry> errorLogEntries; |
| 838 |
| 839 ErrorSummary(); |
| 840 |
| 841 ErrorSummary.fromJson(core.Map _json) { |
| 842 if (_json.containsKey("errorCode")) { |
| 843 errorCode = _json["errorCode"]; |
| 844 } |
| 845 if (_json.containsKey("errorCount")) { |
| 846 errorCount = _json["errorCount"]; |
| 847 } |
| 848 if (_json.containsKey("errorLogEntries")) { |
| 849 errorLogEntries = _json["errorLogEntries"].map((value) => new ErrorLogEntr
y.fromJson(value)).toList(); |
| 850 } |
| 851 } |
| 852 |
| 853 core.Map toJson() { |
| 854 var _json = new core.Map(); |
| 855 if (errorCode != null) { |
| 856 _json["errorCode"] = errorCode; |
| 857 } |
| 858 if (errorCount != null) { |
| 859 _json["errorCount"] = errorCount; |
| 860 } |
| 861 if (errorLogEntries != null) { |
| 862 _json["errorLogEntries"] = errorLogEntries.map((value) => (value).toJson()
).toList(); |
| 863 } |
| 864 return _json; |
| 865 } |
| 866 } |
| 867 |
| 868 /** |
| 869 * In a GcsData, an object's name is the Google Cloud Storage object's name and |
| 870 * its `lastModificationTime` refers to the object's updated time, which changes |
| 871 * when the content or the metadata of the object is updated. |
| 872 */ |
| 873 class GcsData { |
| 874 /** |
| 875 * Google Cloud Storage bucket name (see [Bucket Name |
| 876 * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requireme
nts)). |
| 877 * Required. |
| 878 */ |
| 879 core.String bucketName; |
| 880 |
| 881 GcsData(); |
| 882 |
| 883 GcsData.fromJson(core.Map _json) { |
| 884 if (_json.containsKey("bucketName")) { |
| 885 bucketName = _json["bucketName"]; |
| 886 } |
| 887 } |
| 888 |
| 889 core.Map toJson() { |
| 890 var _json = new core.Map(); |
| 891 if (bucketName != null) { |
| 892 _json["bucketName"] = bucketName; |
| 893 } |
| 894 return _json; |
| 895 } |
| 896 } |
| 897 |
| 898 /** Google service account */ |
| 899 class GoogleServiceAccount { |
| 900 /** Required. */ |
| 901 core.String accountEmail; |
| 902 |
| 903 GoogleServiceAccount(); |
| 904 |
| 905 GoogleServiceAccount.fromJson(core.Map _json) { |
| 906 if (_json.containsKey("accountEmail")) { |
| 907 accountEmail = _json["accountEmail"]; |
| 908 } |
| 909 } |
| 910 |
| 911 core.Map toJson() { |
| 912 var _json = new core.Map(); |
| 913 if (accountEmail != null) { |
| 914 _json["accountEmail"] = accountEmail; |
| 915 } |
| 916 return _json; |
| 917 } |
| 918 } |
| 919 |
| 920 /** |
| 921 * An HttpData specifies a list of objects on the web to be transferred over |
| 922 * HTTP. The information of the objects to be transferred is contained in a file |
| 923 * referenced by a URL. The first line in the file must be "TsvHttpData-1.0", |
| 924 * which specifies the format of the file. Subsequent lines specify the |
| 925 * information of the list of objects, one object per list entry. Each entry has |
| 926 * the following tab-delimited fields: * HTTP URL * Length * MD5 - This field is |
| 927 * a base64-encoded MD5 hash of the object An HTTP URL that points to the object |
| 928 * to be transferred. It must be a valid URL with URL scheme HTTP or HTTPS. When |
| 929 * an object with URL `http(s)://hostname:port/` is transferred to the data |
| 930 * sink, the name of the object at the data sink is `/`. Length and MD5 provide |
| 931 * the size and the base64-encoded MD5 hash of the object. If Length does not |
| 932 * match the actual length of the object fetched, the object will not be |
| 933 * transferred. If MD5 does not match the MD5 computed from the transferred |
| 934 * bytes, the object transfer will fail. `lastModificationTime` is not available |
| 935 * in HttpData objects. The objects that the URL list points to must allow |
| 936 * public access. Storage Transfer Service obeys `robots.txt` rules and requires |
| 937 * the HTTP server to support Range requests and to return a Content-Length |
| 938 * header in each response. |
| 939 */ |
| 940 class HttpData { |
| 941 /** |
| 942 * The URL that points to the file that stores the object list entries. This |
| 943 * file must allow public access. Currently, only URLs with HTTP and HTTPS |
| 944 * schemes are supported. Required. |
| 945 */ |
| 946 core.String listUrl; |
| 947 |
| 948 HttpData(); |
| 949 |
| 950 HttpData.fromJson(core.Map _json) { |
| 951 if (_json.containsKey("listUrl")) { |
| 952 listUrl = _json["listUrl"]; |
| 953 } |
| 954 } |
| 955 |
| 956 core.Map toJson() { |
| 957 var _json = new core.Map(); |
| 958 if (listUrl != null) { |
| 959 _json["listUrl"] = listUrl; |
| 960 } |
| 961 return _json; |
| 962 } |
| 963 } |
| 964 |
| 965 /** |
| 966 * The response message for |
| 967 * [Operations.ListOperations][google.longrunning.Operations.ListOperations]. |
| 968 */ |
| 969 class ListOperationsResponse { |
| 970 /** The standard List next-page token. */ |
| 971 core.String nextPageToken; |
| 972 /** A list of operations that matches the specified filter in the request. */ |
| 973 core.List<Operation> operations; |
| 974 |
| 975 ListOperationsResponse(); |
| 976 |
| 977 ListOperationsResponse.fromJson(core.Map _json) { |
| 978 if (_json.containsKey("nextPageToken")) { |
| 979 nextPageToken = _json["nextPageToken"]; |
| 980 } |
| 981 if (_json.containsKey("operations")) { |
| 982 operations = _json["operations"].map((value) => new Operation.fromJson(val
ue)).toList(); |
| 983 } |
| 984 } |
| 985 |
| 986 core.Map toJson() { |
| 987 var _json = new core.Map(); |
| 988 if (nextPageToken != null) { |
| 989 _json["nextPageToken"] = nextPageToken; |
| 990 } |
| 991 if (operations != null) { |
| 992 _json["operations"] = operations.map((value) => (value).toJson()).toList()
; |
| 993 } |
| 994 return _json; |
| 995 } |
| 996 } |
| 997 |
| 998 /** Response from ListTransferJobs. */ |
| 999 class ListTransferJobsResponse { |
| 1000 /** The list next page token. */ |
| 1001 core.String nextPageToken; |
| 1002 /** A list of transfer jobs. */ |
| 1003 core.List<TransferJob> transferJobs; |
| 1004 |
| 1005 ListTransferJobsResponse(); |
| 1006 |
| 1007 ListTransferJobsResponse.fromJson(core.Map _json) { |
| 1008 if (_json.containsKey("nextPageToken")) { |
| 1009 nextPageToken = _json["nextPageToken"]; |
| 1010 } |
| 1011 if (_json.containsKey("transferJobs")) { |
| 1012 transferJobs = _json["transferJobs"].map((value) => new TransferJob.fromJs
on(value)).toList(); |
| 1013 } |
| 1014 } |
| 1015 |
| 1016 core.Map toJson() { |
| 1017 var _json = new core.Map(); |
| 1018 if (nextPageToken != null) { |
| 1019 _json["nextPageToken"] = nextPageToken; |
| 1020 } |
| 1021 if (transferJobs != null) { |
| 1022 _json["transferJobs"] = transferJobs.map((value) => (value).toJson()).toLi
st(); |
| 1023 } |
| 1024 return _json; |
| 1025 } |
| 1026 } |
| 1027 |
| 1028 /** Conditions that determine which objects will be transferred. */ |
| 1029 class ObjectConditions { |
| 1030 /** |
| 1031 * `excludePrefixes` must follow the constraints described for |
| 1032 * `includePrefixes`. The max size of `excludePrefixes` is 20. |
| 1033 */ |
| 1034 core.List<core.String> excludePrefixes; |
| 1035 /** |
| 1036 * If `includePrefixes` is specified, objects that satisfy the object |
| 1037 * conditions must have names that start with one of the `includePrefixes` and |
| 1038 * that do not start with any of the `excludePrefixes`. If `includePrefixes` |
| 1039 * is not specified, all objects except those that have names starting with |
| 1040 * one of the `excludePrefixes` must satisfy the object conditions. |
| 1041 * Requirements: * Each include-prefix and exclude-prefix can contain any |
| 1042 * sequence of Unicode characters, of max length 1024 bytes when UTF8-encoded, |
| 1043 * and must not contain Carriage Return or Line Feed characters. Wildcard |
| 1044 * matching and regular expression matching are not supported. * None of the |
| 1045 * include-prefix or the exclude-prefix can be empty, if specified. * Each |
| 1046 * include-prefix must include a distinct portion of the object namespace, |
| 1047 * i.e. no include-prefix may be a prefix of another include-prefix. * Each |
| 1048 * exclude-prefix must exclude a distinct portion of the bucket, i.e., no |
| 1049 * exclude-prefix may be a prefix of another exclude-prefix`. * If |
| 1050 * `includePrefixes` is specified, then each exclude-prefix must exclude paths |
| 1051 * that were explicitly included by `includePrefixes`. * The max size of |
| 1052 * `includePrefixes` is 20. |
| 1053 */ |
| 1054 core.List<core.String> includePrefixes; |
| 1055 /** |
| 1056 * `maxTimeElapsedSinceLastModification` is the complement to |
| 1057 * `minTimeElapsedSinceLastModification`. |
| 1058 */ |
| 1059 core.String maxTimeElapsedSinceLastModification; |
| 1060 /** |
| 1061 * If unspecified, `minTimeElapsedSinceLastModification` takes a zero value |
| 1062 * and `maxTimeElapsedSinceLastModification` takes the maximum possible value |
| 1063 * of Duration. Objects that satisfy the object conditions must either have a |
| 1064 * `lastModificationTime` greater or equal to `NOW` - |
| 1065 * `maxTimeElapsedSinceLastModification` and less than `NOW` - |
| 1066 * `minTimeElapsedSinceLastModification`, or not have a |
| 1067 * `lastModificationTime`. |
| 1068 */ |
| 1069 core.String minTimeElapsedSinceLastModification; |
| 1070 |
| 1071 ObjectConditions(); |
| 1072 |
| 1073 ObjectConditions.fromJson(core.Map _json) { |
| 1074 if (_json.containsKey("excludePrefixes")) { |
| 1075 excludePrefixes = _json["excludePrefixes"]; |
| 1076 } |
| 1077 if (_json.containsKey("includePrefixes")) { |
| 1078 includePrefixes = _json["includePrefixes"]; |
| 1079 } |
| 1080 if (_json.containsKey("maxTimeElapsedSinceLastModification")) { |
| 1081 maxTimeElapsedSinceLastModification = _json["maxTimeElapsedSinceLastModifi
cation"]; |
| 1082 } |
| 1083 if (_json.containsKey("minTimeElapsedSinceLastModification")) { |
| 1084 minTimeElapsedSinceLastModification = _json["minTimeElapsedSinceLastModifi
cation"]; |
| 1085 } |
| 1086 } |
| 1087 |
| 1088 core.Map toJson() { |
| 1089 var _json = new core.Map(); |
| 1090 if (excludePrefixes != null) { |
| 1091 _json["excludePrefixes"] = excludePrefixes; |
| 1092 } |
| 1093 if (includePrefixes != null) { |
| 1094 _json["includePrefixes"] = includePrefixes; |
| 1095 } |
| 1096 if (maxTimeElapsedSinceLastModification != null) { |
| 1097 _json["maxTimeElapsedSinceLastModification"] = maxTimeElapsedSinceLastModi
fication; |
| 1098 } |
| 1099 if (minTimeElapsedSinceLastModification != null) { |
| 1100 _json["minTimeElapsedSinceLastModification"] = minTimeElapsedSinceLastModi
fication; |
| 1101 } |
| 1102 return _json; |
| 1103 } |
| 1104 } |
| 1105 |
| 1106 /** |
| 1107 * This resource represents a long-running operation that is the result of a |
| 1108 * network API call. |
| 1109 */ |
| 1110 class Operation { |
| 1111 /** |
| 1112 * If the value is `false`, it means the operation is still in progress. If |
| 1113 * true, the operation is completed and the `result` is available. |
| 1114 */ |
| 1115 core.bool done; |
| 1116 /** The error result of the operation in case of failure. */ |
| 1117 Status error; |
| 1118 /** |
| 1119 * Represents the transfer operation object. |
| 1120 * |
| 1121 * The values for Object must be JSON objects. It can consist of `num`, |
| 1122 * `String`, `bool` and `null` as well as `Map` and `List` values. |
| 1123 */ |
| 1124 core.Map<core.String, core.Object> metadata; |
| 1125 /** |
| 1126 * The server-assigned name, which is only unique within the same service that |
| 1127 * originally returns it. If you use the default HTTP mapping above, the |
| 1128 * `name` should have the format of `operations/some/unique/name`. |
| 1129 */ |
| 1130 core.String name; |
| 1131 /** |
| 1132 * The normal response of the operation in case of success. If the original |
| 1133 * method returns no data on success, such as `Delete`, the response is |
| 1134 * `google.protobuf.Empty`. If the original method is standard |
| 1135 * `Get`/`Create`/`Update`, the response should be the resource. For other |
| 1136 * methods, the response should have the type `XxxResponse`, where `Xxx` is |
| 1137 * the original method name. For example, if the original method name is |
| 1138 * `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| 1139 * |
| 1140 * The values for Object must be JSON objects. It can consist of `num`, |
| 1141 * `String`, `bool` and `null` as well as `Map` and `List` values. |
| 1142 */ |
| 1143 core.Map<core.String, core.Object> response; |
| 1144 |
| 1145 Operation(); |
| 1146 |
| 1147 Operation.fromJson(core.Map _json) { |
| 1148 if (_json.containsKey("done")) { |
| 1149 done = _json["done"]; |
| 1150 } |
| 1151 if (_json.containsKey("error")) { |
| 1152 error = new Status.fromJson(_json["error"]); |
| 1153 } |
| 1154 if (_json.containsKey("metadata")) { |
| 1155 metadata = _json["metadata"]; |
| 1156 } |
| 1157 if (_json.containsKey("name")) { |
| 1158 name = _json["name"]; |
| 1159 } |
| 1160 if (_json.containsKey("response")) { |
| 1161 response = _json["response"]; |
| 1162 } |
| 1163 } |
| 1164 |
| 1165 core.Map toJson() { |
| 1166 var _json = new core.Map(); |
| 1167 if (done != null) { |
| 1168 _json["done"] = done; |
| 1169 } |
| 1170 if (error != null) { |
| 1171 _json["error"] = (error).toJson(); |
| 1172 } |
| 1173 if (metadata != null) { |
| 1174 _json["metadata"] = metadata; |
| 1175 } |
| 1176 if (name != null) { |
| 1177 _json["name"] = name; |
| 1178 } |
| 1179 if (response != null) { |
| 1180 _json["response"] = response; |
| 1181 } |
| 1182 return _json; |
| 1183 } |
| 1184 } |
| 1185 |
| 1186 /** Request passed to PauseTransferOperation. */ |
| 1187 class PauseTransferOperationRequest { |
| 1188 |
| 1189 PauseTransferOperationRequest(); |
| 1190 |
| 1191 PauseTransferOperationRequest.fromJson(core.Map _json) { |
| 1192 } |
| 1193 |
| 1194 core.Map toJson() { |
| 1195 var _json = new core.Map(); |
| 1196 return _json; |
| 1197 } |
| 1198 } |
| 1199 |
| 1200 /** Request passed to ResumeTransferOperation. */ |
| 1201 class ResumeTransferOperationRequest { |
| 1202 |
| 1203 ResumeTransferOperationRequest(); |
| 1204 |
| 1205 ResumeTransferOperationRequest.fromJson(core.Map _json) { |
| 1206 } |
| 1207 |
| 1208 core.Map toJson() { |
| 1209 var _json = new core.Map(); |
| 1210 return _json; |
| 1211 } |
| 1212 } |
| 1213 |
| 1214 /** Transfers can be scheduled to recur or to run just once. */ |
| 1215 class Schedule { |
| 1216 /** |
| 1217 * The last day the recurring transfer will be run. If `scheduleEndDate` is |
| 1218 * the same as `scheduleStartDate`, the transfer will be executed only once. |
| 1219 */ |
| 1220 Date scheduleEndDate; |
| 1221 /** The first day the recurring transfer is scheduled to run. Required. */ |
| 1222 Date scheduleStartDate; |
| 1223 /** |
| 1224 * The time in UTC at which the transfer will be scheduled to start in a day. |
| 1225 * Transfers may start later than this time. If not specified, transfers are |
| 1226 * scheduled to start at midnight UTC. |
| 1227 */ |
| 1228 TimeOfDay startTimeOfDay; |
| 1229 |
| 1230 Schedule(); |
| 1231 |
| 1232 Schedule.fromJson(core.Map _json) { |
| 1233 if (_json.containsKey("scheduleEndDate")) { |
| 1234 scheduleEndDate = new Date.fromJson(_json["scheduleEndDate"]); |
| 1235 } |
| 1236 if (_json.containsKey("scheduleStartDate")) { |
| 1237 scheduleStartDate = new Date.fromJson(_json["scheduleStartDate"]); |
| 1238 } |
| 1239 if (_json.containsKey("startTimeOfDay")) { |
| 1240 startTimeOfDay = new TimeOfDay.fromJson(_json["startTimeOfDay"]); |
| 1241 } |
| 1242 } |
| 1243 |
| 1244 core.Map toJson() { |
| 1245 var _json = new core.Map(); |
| 1246 if (scheduleEndDate != null) { |
| 1247 _json["scheduleEndDate"] = (scheduleEndDate).toJson(); |
| 1248 } |
| 1249 if (scheduleStartDate != null) { |
| 1250 _json["scheduleStartDate"] = (scheduleStartDate).toJson(); |
| 1251 } |
| 1252 if (startTimeOfDay != null) { |
| 1253 _json["startTimeOfDay"] = (startTimeOfDay).toJson(); |
| 1254 } |
| 1255 return _json; |
| 1256 } |
| 1257 } |
| 1258 |
| 1259 /** |
| 1260 * The `Status` type defines a logical error model that is suitable for |
| 1261 * different programming environments, including REST APIs and RPC APIs. It is |
| 1262 * used by [gRPC](https://github.com/grpc). The error model is designed to be: - |
| 1263 * Simple to use and understand for most users - Flexible enough to meet |
| 1264 * unexpected needs # Overview The `Status` message contains three pieces of |
| 1265 * data: error code, error message, and error details. The error code should be |
| 1266 * an enum value of [google.rpc.Code][google.rpc.Code], but it may accept |
| 1267 * additional error codes if needed. The error message should be a |
| 1268 * developer-facing English message that helps developers *understand* and |
| 1269 * *resolve* the error. If a localized user-facing error message is needed, put |
| 1270 * the localized message in the error details or localize it in the client. The |
| 1271 * optional error details may contain arbitrary information about the error. |
| 1272 * There is a predefined set of error detail types in the package `google.rpc` |
| 1273 * which can be used for common error conditions. # Language mapping The |
| 1274 * `Status` message is the logical representation of the error model, but it is |
| 1275 * not necessarily the actual wire format. When the `Status` message is exposed |
| 1276 * in different client libraries and different wire protocols, it can be mapped |
| 1277 * differently. For example, it will likely be mapped to some exceptions in |
| 1278 * Java, but more likely mapped to some error codes in C. # Other uses The error |
| 1279 * model and the `Status` message can be used in a variety of environments, |
| 1280 * either with or without APIs, to provide a consistent developer experience |
| 1281 * across different environments. Example uses of this error model include: - |
| 1282 * Partial errors. If a service needs to return partial errors to the client, it |
| 1283 * may embed the `Status` in the normal response to indicate the partial errors. |
| 1284 * - Workflow errors. A typical workflow has multiple steps. Each step may have |
| 1285 * a `Status` message for error reporting purpose. - Batch operations. If a |
| 1286 * client uses batch request and batch response, the `Status` message should be |
| 1287 * used directly inside batch response, one for each error sub-response. - |
| 1288 * Asynchronous operations. If an API call embeds asynchronous operation results |
| 1289 * in its response, the status of those operations should be represented |
| 1290 * directly using the `Status` message. - Logging. If some API errors are stored |
| 1291 * in logs, the message `Status` could be used directly after any stripping |
| 1292 * needed for security/privacy reasons. |
| 1293 */ |
| 1294 class Status { |
| 1295 /** |
| 1296 * The status code, which should be an enum value of |
| 1297 * [google.rpc.Code][google.rpc.Code]. |
| 1298 */ |
| 1299 core.int code; |
| 1300 /** |
| 1301 * A list of messages that carry the error details. There will be a common set |
| 1302 * of message types for APIs to use. |
| 1303 * |
| 1304 * The values for Object must be JSON objects. It can consist of `num`, |
| 1305 * `String`, `bool` and `null` as well as `Map` and `List` values. |
| 1306 */ |
| 1307 core.List<core.Map<core.String, core.Object>> details; |
| 1308 /** |
| 1309 * A developer-facing error message, which should be in English. Any |
| 1310 * user-facing error message should be localized and sent in the |
| 1311 * [google.rpc.Status.details][google.rpc.Status.details] field, or localized |
| 1312 * by the client. |
| 1313 */ |
| 1314 core.String message; |
| 1315 |
| 1316 Status(); |
| 1317 |
| 1318 Status.fromJson(core.Map _json) { |
| 1319 if (_json.containsKey("code")) { |
| 1320 code = _json["code"]; |
| 1321 } |
| 1322 if (_json.containsKey("details")) { |
| 1323 details = _json["details"]; |
| 1324 } |
| 1325 if (_json.containsKey("message")) { |
| 1326 message = _json["message"]; |
| 1327 } |
| 1328 } |
| 1329 |
| 1330 core.Map toJson() { |
| 1331 var _json = new core.Map(); |
| 1332 if (code != null) { |
| 1333 _json["code"] = code; |
| 1334 } |
| 1335 if (details != null) { |
| 1336 _json["details"] = details; |
| 1337 } |
| 1338 if (message != null) { |
| 1339 _json["message"] = message; |
| 1340 } |
| 1341 return _json; |
| 1342 } |
| 1343 } |
| 1344 |
| 1345 /** |
| 1346 * Represents a time of day. The date and time zone are either not significant |
| 1347 * or are specified elsewhere. An API may chose to allow leap seconds. Related |
| 1348 * types are [google.type.Date][google.type.Date] and |
| 1349 * `google.protobuf.Timestamp`. |
| 1350 */ |
| 1351 class TimeOfDay { |
| 1352 /** |
| 1353 * Hours of day in 24 hour format. Should be from 0 to 23. An API may choose |
| 1354 * to allow the value "24:00:00" for scenarios like business closing time. |
| 1355 */ |
| 1356 core.int hours; |
| 1357 /** Minutes of hour of day. Must be from 0 to 59. */ |
| 1358 core.int minutes; |
| 1359 /** Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. */ |
| 1360 core.int nanos; |
| 1361 /** |
| 1362 * Seconds of minutes of the time. Must normally be from 0 to 59. An API may |
| 1363 * allow the value 60 if it allows leap-seconds. |
| 1364 */ |
| 1365 core.int seconds; |
| 1366 |
| 1367 TimeOfDay(); |
| 1368 |
| 1369 TimeOfDay.fromJson(core.Map _json) { |
| 1370 if (_json.containsKey("hours")) { |
| 1371 hours = _json["hours"]; |
| 1372 } |
| 1373 if (_json.containsKey("minutes")) { |
| 1374 minutes = _json["minutes"]; |
| 1375 } |
| 1376 if (_json.containsKey("nanos")) { |
| 1377 nanos = _json["nanos"]; |
| 1378 } |
| 1379 if (_json.containsKey("seconds")) { |
| 1380 seconds = _json["seconds"]; |
| 1381 } |
| 1382 } |
| 1383 |
| 1384 core.Map toJson() { |
| 1385 var _json = new core.Map(); |
| 1386 if (hours != null) { |
| 1387 _json["hours"] = hours; |
| 1388 } |
| 1389 if (minutes != null) { |
| 1390 _json["minutes"] = minutes; |
| 1391 } |
| 1392 if (nanos != null) { |
| 1393 _json["nanos"] = nanos; |
| 1394 } |
| 1395 if (seconds != null) { |
| 1396 _json["seconds"] = seconds; |
| 1397 } |
| 1398 return _json; |
| 1399 } |
| 1400 } |
| 1401 |
| 1402 /** |
| 1403 * A collection of counters that report the progress of a transfer operation. |
| 1404 */ |
| 1405 class TransferCounters { |
| 1406 /** Bytes that are copied to the data sink. */ |
| 1407 core.String bytesCopiedToSink; |
| 1408 /** Bytes that are deleted from the data sink. */ |
| 1409 core.String bytesDeletedFromSink; |
| 1410 /** Bytes that are deleted from the data source. */ |
| 1411 core.String bytesDeletedFromSource; |
| 1412 /** Bytes that failed to be deleted from the data sink. */ |
| 1413 core.String bytesFailedToDeleteFromSink; |
| 1414 /** |
| 1415 * Bytes found in the data source that are scheduled to be transferred, which |
| 1416 * will be copied, excluded based on conditions, or skipped due to failures. |
| 1417 */ |
| 1418 core.String bytesFoundFromSource; |
| 1419 /** Bytes found only in the data sink that are scheduled to be deleted. */ |
| 1420 core.String bytesFoundOnlyFromSink; |
| 1421 /** Bytes in the data source that failed during the transfer. */ |
| 1422 core.String bytesFromSourceFailed; |
| 1423 /** |
| 1424 * Bytes in the data source that are not transferred because they already |
| 1425 * exist in the data sink. |
| 1426 */ |
| 1427 core.String bytesFromSourceSkippedBySync; |
| 1428 /** Objects that are copied to the data sink. */ |
| 1429 core.String objectsCopiedToSink; |
| 1430 /** Objects that are deleted from the data sink. */ |
| 1431 core.String objectsDeletedFromSink; |
| 1432 /** Objects that are deleted from the data source. */ |
| 1433 core.String objectsDeletedFromSource; |
| 1434 /** Objects that failed to be deleted from the data sink. */ |
| 1435 core.String objectsFailedToDeleteFromSink; |
| 1436 /** |
| 1437 * Objects found in the data source that are scheduled to be transferred, |
| 1438 * which will be copied, excluded based on conditions, or skipped due to |
| 1439 * failures. |
| 1440 */ |
| 1441 core.String objectsFoundFromSource; |
| 1442 /** Objects found only in the data sink that are scheduled to be deleted. */ |
| 1443 core.String objectsFoundOnlyFromSink; |
| 1444 /** Objects in the data source that failed during the transfer. */ |
| 1445 core.String objectsFromSourceFailed; |
| 1446 /** |
| 1447 * Objects in the data source that are not transferred because they already |
| 1448 * exist in the data sink. |
| 1449 */ |
| 1450 core.String objectsFromSourceSkippedBySync; |
| 1451 |
| 1452 TransferCounters(); |
| 1453 |
| 1454 TransferCounters.fromJson(core.Map _json) { |
| 1455 if (_json.containsKey("bytesCopiedToSink")) { |
| 1456 bytesCopiedToSink = _json["bytesCopiedToSink"]; |
| 1457 } |
| 1458 if (_json.containsKey("bytesDeletedFromSink")) { |
| 1459 bytesDeletedFromSink = _json["bytesDeletedFromSink"]; |
| 1460 } |
| 1461 if (_json.containsKey("bytesDeletedFromSource")) { |
| 1462 bytesDeletedFromSource = _json["bytesDeletedFromSource"]; |
| 1463 } |
| 1464 if (_json.containsKey("bytesFailedToDeleteFromSink")) { |
| 1465 bytesFailedToDeleteFromSink = _json["bytesFailedToDeleteFromSink"]; |
| 1466 } |
| 1467 if (_json.containsKey("bytesFoundFromSource")) { |
| 1468 bytesFoundFromSource = _json["bytesFoundFromSource"]; |
| 1469 } |
| 1470 if (_json.containsKey("bytesFoundOnlyFromSink")) { |
| 1471 bytesFoundOnlyFromSink = _json["bytesFoundOnlyFromSink"]; |
| 1472 } |
| 1473 if (_json.containsKey("bytesFromSourceFailed")) { |
| 1474 bytesFromSourceFailed = _json["bytesFromSourceFailed"]; |
| 1475 } |
| 1476 if (_json.containsKey("bytesFromSourceSkippedBySync")) { |
| 1477 bytesFromSourceSkippedBySync = _json["bytesFromSourceSkippedBySync"]; |
| 1478 } |
| 1479 if (_json.containsKey("objectsCopiedToSink")) { |
| 1480 objectsCopiedToSink = _json["objectsCopiedToSink"]; |
| 1481 } |
| 1482 if (_json.containsKey("objectsDeletedFromSink")) { |
| 1483 objectsDeletedFromSink = _json["objectsDeletedFromSink"]; |
| 1484 } |
| 1485 if (_json.containsKey("objectsDeletedFromSource")) { |
| 1486 objectsDeletedFromSource = _json["objectsDeletedFromSource"]; |
| 1487 } |
| 1488 if (_json.containsKey("objectsFailedToDeleteFromSink")) { |
| 1489 objectsFailedToDeleteFromSink = _json["objectsFailedToDeleteFromSink"]; |
| 1490 } |
| 1491 if (_json.containsKey("objectsFoundFromSource")) { |
| 1492 objectsFoundFromSource = _json["objectsFoundFromSource"]; |
| 1493 } |
| 1494 if (_json.containsKey("objectsFoundOnlyFromSink")) { |
| 1495 objectsFoundOnlyFromSink = _json["objectsFoundOnlyFromSink"]; |
| 1496 } |
| 1497 if (_json.containsKey("objectsFromSourceFailed")) { |
| 1498 objectsFromSourceFailed = _json["objectsFromSourceFailed"]; |
| 1499 } |
| 1500 if (_json.containsKey("objectsFromSourceSkippedBySync")) { |
| 1501 objectsFromSourceSkippedBySync = _json["objectsFromSourceSkippedBySync"]; |
| 1502 } |
| 1503 } |
| 1504 |
| 1505 core.Map toJson() { |
| 1506 var _json = new core.Map(); |
| 1507 if (bytesCopiedToSink != null) { |
| 1508 _json["bytesCopiedToSink"] = bytesCopiedToSink; |
| 1509 } |
| 1510 if (bytesDeletedFromSink != null) { |
| 1511 _json["bytesDeletedFromSink"] = bytesDeletedFromSink; |
| 1512 } |
| 1513 if (bytesDeletedFromSource != null) { |
| 1514 _json["bytesDeletedFromSource"] = bytesDeletedFromSource; |
| 1515 } |
| 1516 if (bytesFailedToDeleteFromSink != null) { |
| 1517 _json["bytesFailedToDeleteFromSink"] = bytesFailedToDeleteFromSink; |
| 1518 } |
| 1519 if (bytesFoundFromSource != null) { |
| 1520 _json["bytesFoundFromSource"] = bytesFoundFromSource; |
| 1521 } |
| 1522 if (bytesFoundOnlyFromSink != null) { |
| 1523 _json["bytesFoundOnlyFromSink"] = bytesFoundOnlyFromSink; |
| 1524 } |
| 1525 if (bytesFromSourceFailed != null) { |
| 1526 _json["bytesFromSourceFailed"] = bytesFromSourceFailed; |
| 1527 } |
| 1528 if (bytesFromSourceSkippedBySync != null) { |
| 1529 _json["bytesFromSourceSkippedBySync"] = bytesFromSourceSkippedBySync; |
| 1530 } |
| 1531 if (objectsCopiedToSink != null) { |
| 1532 _json["objectsCopiedToSink"] = objectsCopiedToSink; |
| 1533 } |
| 1534 if (objectsDeletedFromSink != null) { |
| 1535 _json["objectsDeletedFromSink"] = objectsDeletedFromSink; |
| 1536 } |
| 1537 if (objectsDeletedFromSource != null) { |
| 1538 _json["objectsDeletedFromSource"] = objectsDeletedFromSource; |
| 1539 } |
| 1540 if (objectsFailedToDeleteFromSink != null) { |
| 1541 _json["objectsFailedToDeleteFromSink"] = objectsFailedToDeleteFromSink; |
| 1542 } |
| 1543 if (objectsFoundFromSource != null) { |
| 1544 _json["objectsFoundFromSource"] = objectsFoundFromSource; |
| 1545 } |
| 1546 if (objectsFoundOnlyFromSink != null) { |
| 1547 _json["objectsFoundOnlyFromSink"] = objectsFoundOnlyFromSink; |
| 1548 } |
| 1549 if (objectsFromSourceFailed != null) { |
| 1550 _json["objectsFromSourceFailed"] = objectsFromSourceFailed; |
| 1551 } |
| 1552 if (objectsFromSourceSkippedBySync != null) { |
| 1553 _json["objectsFromSourceSkippedBySync"] = objectsFromSourceSkippedBySync; |
| 1554 } |
| 1555 return _json; |
| 1556 } |
| 1557 } |
| 1558 |
| 1559 /** |
| 1560 * This resource represents the configuration of a transfer job that runs |
| 1561 * periodically. |
| 1562 */ |
| 1563 class TransferJob { |
| 1564 /** This field cannot be changed by user requests. */ |
| 1565 core.String creationTime; |
| 1566 /** This field cannot be changed by user requests. */ |
| 1567 core.String deletionTime; |
| 1568 /** |
| 1569 * A description provided by the user for the job. Its max length is 1024 |
| 1570 * bytes when Unicode-encoded. |
| 1571 */ |
| 1572 core.String description; |
| 1573 /** This field cannot be changed by user requests. */ |
| 1574 core.String lastModificationTime; |
| 1575 /** |
| 1576 * A globally unique name assigned by Storage Transfer Service when the job is |
| 1577 * created. This field should be left empty in requests to create a new |
| 1578 * transfer job; otherwise, the requests result in an `INVALID_ARGUMENT` |
| 1579 * error. |
| 1580 */ |
| 1581 core.String name; |
| 1582 /** |
| 1583 * The ID of the Google Developers Console project that owns the job. |
| 1584 * Required. |
| 1585 */ |
| 1586 core.String projectId; |
| 1587 /** Schedule specification. Required. */ |
| 1588 Schedule schedule; |
| 1589 /** |
| 1590 * Status of the job. This value MUST be specified for |
| 1591 * `CreateTransferJobRequests`. NOTE: The effect of the new job status takes |
| 1592 * place during a subsequent job run. For example, if you change the job |
| 1593 * status from `ENABLED` to `DISABLED`, and an operation spawned by the |
| 1594 * transfer is running, the status change would not affect the current |
| 1595 * operation. |
| 1596 * Possible string values are: |
| 1597 * - "STATUS_UNSPECIFIED" : A STATUS_UNSPECIFIED. |
| 1598 * - "ENABLED" : A ENABLED. |
| 1599 * - "DISABLED" : A DISABLED. |
| 1600 * - "DELETED" : A DELETED. |
| 1601 */ |
| 1602 core.String status; |
| 1603 /** Transfer specification. Required. */ |
| 1604 TransferSpec transferSpec; |
| 1605 |
| 1606 TransferJob(); |
| 1607 |
| 1608 TransferJob.fromJson(core.Map _json) { |
| 1609 if (_json.containsKey("creationTime")) { |
| 1610 creationTime = _json["creationTime"]; |
| 1611 } |
| 1612 if (_json.containsKey("deletionTime")) { |
| 1613 deletionTime = _json["deletionTime"]; |
| 1614 } |
| 1615 if (_json.containsKey("description")) { |
| 1616 description = _json["description"]; |
| 1617 } |
| 1618 if (_json.containsKey("lastModificationTime")) { |
| 1619 lastModificationTime = _json["lastModificationTime"]; |
| 1620 } |
| 1621 if (_json.containsKey("name")) { |
| 1622 name = _json["name"]; |
| 1623 } |
| 1624 if (_json.containsKey("projectId")) { |
| 1625 projectId = _json["projectId"]; |
| 1626 } |
| 1627 if (_json.containsKey("schedule")) { |
| 1628 schedule = new Schedule.fromJson(_json["schedule"]); |
| 1629 } |
| 1630 if (_json.containsKey("status")) { |
| 1631 status = _json["status"]; |
| 1632 } |
| 1633 if (_json.containsKey("transferSpec")) { |
| 1634 transferSpec = new TransferSpec.fromJson(_json["transferSpec"]); |
| 1635 } |
| 1636 } |
| 1637 |
| 1638 core.Map toJson() { |
| 1639 var _json = new core.Map(); |
| 1640 if (creationTime != null) { |
| 1641 _json["creationTime"] = creationTime; |
| 1642 } |
| 1643 if (deletionTime != null) { |
| 1644 _json["deletionTime"] = deletionTime; |
| 1645 } |
| 1646 if (description != null) { |
| 1647 _json["description"] = description; |
| 1648 } |
| 1649 if (lastModificationTime != null) { |
| 1650 _json["lastModificationTime"] = lastModificationTime; |
| 1651 } |
| 1652 if (name != null) { |
| 1653 _json["name"] = name; |
| 1654 } |
| 1655 if (projectId != null) { |
| 1656 _json["projectId"] = projectId; |
| 1657 } |
| 1658 if (schedule != null) { |
| 1659 _json["schedule"] = (schedule).toJson(); |
| 1660 } |
| 1661 if (status != null) { |
| 1662 _json["status"] = status; |
| 1663 } |
| 1664 if (transferSpec != null) { |
| 1665 _json["transferSpec"] = (transferSpec).toJson(); |
| 1666 } |
| 1667 return _json; |
| 1668 } |
| 1669 } |
| 1670 |
| 1671 /** A description of the execution of a transfer. */ |
| 1672 class TransferOperation { |
| 1673 /** Information about the progress of the transfer operation. */ |
| 1674 TransferCounters counters; |
| 1675 /** End time of this transfer execution. */ |
| 1676 core.String endTime; |
| 1677 /** Summarizes errors encountered with sample error log entries. */ |
| 1678 core.List<ErrorSummary> errorBreakdowns; |
| 1679 /** A globally unique ID assigned by the system. */ |
| 1680 core.String name; |
| 1681 /** |
| 1682 * The ID of the Google Developers Console project that owns the operation. |
| 1683 * Required. |
| 1684 */ |
| 1685 core.String projectId; |
| 1686 /** Start time of this transfer execution. */ |
| 1687 core.String startTime; |
| 1688 /** |
| 1689 * Status of the transfer operation. |
| 1690 * Possible string values are: |
| 1691 * - "STATUS_UNSPECIFIED" : A STATUS_UNSPECIFIED. |
| 1692 * - "IN_PROGRESS" : A IN_PROGRESS. |
| 1693 * - "PAUSED" : A PAUSED. |
| 1694 * - "SUCCESS" : A SUCCESS. |
| 1695 * - "FAILED" : A FAILED. |
| 1696 * - "ABORTED" : A ABORTED. |
| 1697 */ |
| 1698 core.String status; |
| 1699 /** The name of the transfer job that triggers this transfer operation. */ |
| 1700 core.String transferJobName; |
| 1701 /** Transfer specification. Required. */ |
| 1702 TransferSpec transferSpec; |
| 1703 |
| 1704 TransferOperation(); |
| 1705 |
| 1706 TransferOperation.fromJson(core.Map _json) { |
| 1707 if (_json.containsKey("counters")) { |
| 1708 counters = new TransferCounters.fromJson(_json["counters"]); |
| 1709 } |
| 1710 if (_json.containsKey("endTime")) { |
| 1711 endTime = _json["endTime"]; |
| 1712 } |
| 1713 if (_json.containsKey("errorBreakdowns")) { |
| 1714 errorBreakdowns = _json["errorBreakdowns"].map((value) => new ErrorSummary
.fromJson(value)).toList(); |
| 1715 } |
| 1716 if (_json.containsKey("name")) { |
| 1717 name = _json["name"]; |
| 1718 } |
| 1719 if (_json.containsKey("projectId")) { |
| 1720 projectId = _json["projectId"]; |
| 1721 } |
| 1722 if (_json.containsKey("startTime")) { |
| 1723 startTime = _json["startTime"]; |
| 1724 } |
| 1725 if (_json.containsKey("status")) { |
| 1726 status = _json["status"]; |
| 1727 } |
| 1728 if (_json.containsKey("transferJobName")) { |
| 1729 transferJobName = _json["transferJobName"]; |
| 1730 } |
| 1731 if (_json.containsKey("transferSpec")) { |
| 1732 transferSpec = new TransferSpec.fromJson(_json["transferSpec"]); |
| 1733 } |
| 1734 } |
| 1735 |
| 1736 core.Map toJson() { |
| 1737 var _json = new core.Map(); |
| 1738 if (counters != null) { |
| 1739 _json["counters"] = (counters).toJson(); |
| 1740 } |
| 1741 if (endTime != null) { |
| 1742 _json["endTime"] = endTime; |
| 1743 } |
| 1744 if (errorBreakdowns != null) { |
| 1745 _json["errorBreakdowns"] = errorBreakdowns.map((value) => (value).toJson()
).toList(); |
| 1746 } |
| 1747 if (name != null) { |
| 1748 _json["name"] = name; |
| 1749 } |
| 1750 if (projectId != null) { |
| 1751 _json["projectId"] = projectId; |
| 1752 } |
| 1753 if (startTime != null) { |
| 1754 _json["startTime"] = startTime; |
| 1755 } |
| 1756 if (status != null) { |
| 1757 _json["status"] = status; |
| 1758 } |
| 1759 if (transferJobName != null) { |
| 1760 _json["transferJobName"] = transferJobName; |
| 1761 } |
| 1762 if (transferSpec != null) { |
| 1763 _json["transferSpec"] = (transferSpec).toJson(); |
| 1764 } |
| 1765 return _json; |
| 1766 } |
| 1767 } |
| 1768 |
| 1769 /** |
| 1770 * TransferOptions uses three boolean parameters to define the actions to be |
| 1771 * performed on objects in a transfer. |
| 1772 */ |
| 1773 class TransferOptions { |
| 1774 /** |
| 1775 * Whether objects should be deleted from the source after they are |
| 1776 * transferred to the sink. |
| 1777 */ |
| 1778 core.bool deleteObjectsFromSourceAfterTransfer; |
| 1779 /** Whether objects that exist only in the sink should be deleted. */ |
| 1780 core.bool deleteObjectsUniqueInSink; |
| 1781 /** Whether overwriting objects that already exist in the sink is allowed. */ |
| 1782 core.bool overwriteObjectsAlreadyExistingInSink; |
| 1783 |
| 1784 TransferOptions(); |
| 1785 |
| 1786 TransferOptions.fromJson(core.Map _json) { |
| 1787 if (_json.containsKey("deleteObjectsFromSourceAfterTransfer")) { |
| 1788 deleteObjectsFromSourceAfterTransfer = _json["deleteObjectsFromSourceAfter
Transfer"]; |
| 1789 } |
| 1790 if (_json.containsKey("deleteObjectsUniqueInSink")) { |
| 1791 deleteObjectsUniqueInSink = _json["deleteObjectsUniqueInSink"]; |
| 1792 } |
| 1793 if (_json.containsKey("overwriteObjectsAlreadyExistingInSink")) { |
| 1794 overwriteObjectsAlreadyExistingInSink = _json["overwriteObjectsAlreadyExis
tingInSink"]; |
| 1795 } |
| 1796 } |
| 1797 |
| 1798 core.Map toJson() { |
| 1799 var _json = new core.Map(); |
| 1800 if (deleteObjectsFromSourceAfterTransfer != null) { |
| 1801 _json["deleteObjectsFromSourceAfterTransfer"] = deleteObjectsFromSourceAft
erTransfer; |
| 1802 } |
| 1803 if (deleteObjectsUniqueInSink != null) { |
| 1804 _json["deleteObjectsUniqueInSink"] = deleteObjectsUniqueInSink; |
| 1805 } |
| 1806 if (overwriteObjectsAlreadyExistingInSink != null) { |
| 1807 _json["overwriteObjectsAlreadyExistingInSink"] = overwriteObjectsAlreadyEx
istingInSink; |
| 1808 } |
| 1809 return _json; |
| 1810 } |
| 1811 } |
| 1812 |
| 1813 /** Configuration for running a transfer. */ |
| 1814 class TransferSpec { |
| 1815 /** An AWS S3 data source. */ |
| 1816 AwsS3Data awsS3DataSource; |
| 1817 /** A Google Cloud Storage data sink. */ |
| 1818 GcsData gcsDataSink; |
| 1819 /** A Google Cloud Storage data source. */ |
| 1820 GcsData gcsDataSource; |
| 1821 /** An HTTP URL data source. */ |
| 1822 HttpData httpDataSource; |
| 1823 /** |
| 1824 * Only objects that satisfy these object conditions are included in the set |
| 1825 * of data source and data sink objects. Object conditions based on objects' |
| 1826 * `lastModificationTime` do not exclude objects in a data sink. |
| 1827 */ |
| 1828 ObjectConditions objectConditions; |
| 1829 /** |
| 1830 * If the option `deleteObjectsUniqueInSink` is `true`, object conditions |
| 1831 * based on objects' `lastModificationTime` are ignored and do not exclude |
| 1832 * objects in a data source or a data sink. |
| 1833 */ |
| 1834 TransferOptions transferOptions; |
| 1835 |
| 1836 TransferSpec(); |
| 1837 |
| 1838 TransferSpec.fromJson(core.Map _json) { |
| 1839 if (_json.containsKey("awsS3DataSource")) { |
| 1840 awsS3DataSource = new AwsS3Data.fromJson(_json["awsS3DataSource"]); |
| 1841 } |
| 1842 if (_json.containsKey("gcsDataSink")) { |
| 1843 gcsDataSink = new GcsData.fromJson(_json["gcsDataSink"]); |
| 1844 } |
| 1845 if (_json.containsKey("gcsDataSource")) { |
| 1846 gcsDataSource = new GcsData.fromJson(_json["gcsDataSource"]); |
| 1847 } |
| 1848 if (_json.containsKey("httpDataSource")) { |
| 1849 httpDataSource = new HttpData.fromJson(_json["httpDataSource"]); |
| 1850 } |
| 1851 if (_json.containsKey("objectConditions")) { |
| 1852 objectConditions = new ObjectConditions.fromJson(_json["objectConditions"]
); |
| 1853 } |
| 1854 if (_json.containsKey("transferOptions")) { |
| 1855 transferOptions = new TransferOptions.fromJson(_json["transferOptions"]); |
| 1856 } |
| 1857 } |
| 1858 |
| 1859 core.Map toJson() { |
| 1860 var _json = new core.Map(); |
| 1861 if (awsS3DataSource != null) { |
| 1862 _json["awsS3DataSource"] = (awsS3DataSource).toJson(); |
| 1863 } |
| 1864 if (gcsDataSink != null) { |
| 1865 _json["gcsDataSink"] = (gcsDataSink).toJson(); |
| 1866 } |
| 1867 if (gcsDataSource != null) { |
| 1868 _json["gcsDataSource"] = (gcsDataSource).toJson(); |
| 1869 } |
| 1870 if (httpDataSource != null) { |
| 1871 _json["httpDataSource"] = (httpDataSource).toJson(); |
| 1872 } |
| 1873 if (objectConditions != null) { |
| 1874 _json["objectConditions"] = (objectConditions).toJson(); |
| 1875 } |
| 1876 if (transferOptions != null) { |
| 1877 _json["transferOptions"] = (transferOptions).toJson(); |
| 1878 } |
| 1879 return _json; |
| 1880 } |
| 1881 } |
| 1882 |
| 1883 /** Request passed to UpdateTransferJob. */ |
| 1884 class UpdateTransferJobRequest { |
| 1885 /** |
| 1886 * The ID of the Google Developers Console project that owns the job. |
| 1887 * Required. |
| 1888 */ |
| 1889 core.String projectId; |
| 1890 /** The job to update. Required. */ |
| 1891 TransferJob transferJob; |
| 1892 /** |
| 1893 * The field mask of the fields in `transferJob` that are to be updated in |
| 1894 * this request. Fields in `transferJob` that can be updated are: |
| 1895 * `description`, `transferSpec`, and `status`. To update the `transferSpec` |
| 1896 * of the job, a complete transfer specification has to be provided. An |
| 1897 * incomplete specification which misses any required fields will be rejected |
| 1898 * with the error `INVALID_ARGUMENT`. |
| 1899 */ |
| 1900 core.String updateTransferJobFieldMask; |
| 1901 |
| 1902 UpdateTransferJobRequest(); |
| 1903 |
| 1904 UpdateTransferJobRequest.fromJson(core.Map _json) { |
| 1905 if (_json.containsKey("projectId")) { |
| 1906 projectId = _json["projectId"]; |
| 1907 } |
| 1908 if (_json.containsKey("transferJob")) { |
| 1909 transferJob = new TransferJob.fromJson(_json["transferJob"]); |
| 1910 } |
| 1911 if (_json.containsKey("updateTransferJobFieldMask")) { |
| 1912 updateTransferJobFieldMask = _json["updateTransferJobFieldMask"]; |
| 1913 } |
| 1914 } |
| 1915 |
| 1916 core.Map toJson() { |
| 1917 var _json = new core.Map(); |
| 1918 if (projectId != null) { |
| 1919 _json["projectId"] = projectId; |
| 1920 } |
| 1921 if (transferJob != null) { |
| 1922 _json["transferJob"] = (transferJob).toJson(); |
| 1923 } |
| 1924 if (updateTransferJobFieldMask != null) { |
| 1925 _json["updateTransferJobFieldMask"] = updateTransferJobFieldMask; |
| 1926 } |
| 1927 return _json; |
| 1928 } |
| 1929 } |
OLD | NEW |