@googleapis/storagetransfer 7.2.2 → 9.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/v1.ts CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  Compute,
24
24
  UserRefreshClient,
25
25
  BaseExternalAccountClient,
26
- GaxiosPromise,
26
+ GaxiosResponseWithHTTP2,
27
27
  GoogleConfigurable,
28
28
  createAPIRequest,
29
29
  MethodOptions,
@@ -240,6 +240,10 @@ export namespace storagetransfer_v1 {
240
240
  * Optional. The Resource name of a secret in Secret Manager. The Azure SAS token must be stored in Secret Manager in JSON format: { "sas_token" : "SAS_TOKEN" \} GoogleServiceAccount must be granted `roles/secretmanager.secretAccessor` for the resource. See [Configure access to a source: Microsoft Azure Blob Storage] (https://cloud.google.com/storage-transfer/docs/source-microsoft-azure#secret_manager) for more information. If `credentials_secret` is specified, do not specify azure_credentials. Format: `projects/{project_number\}/secrets/{secret_name\}`
241
241
  */
242
242
  credentialsSecret?: string | null;
243
+ /**
244
+ * Optional. Federated identity config of a user registered Azure application. If `federated_identity_config` is specified, do not specify azure_credentials or credentials_secret.
245
+ */
246
+ federatedIdentityConfig?: Schema$FederatedIdentityConfig;
243
247
  /**
244
248
  * Root path to transfer objects. Must be an empty string or full path name that ends with a '/'. This field is treated as an object prefix. As such, it should generally not begin with a '/'.
245
249
  */
@@ -339,6 +343,19 @@ export namespace storagetransfer_v1 {
339
343
  */
340
344
  name?: string | null;
341
345
  }
346
+ /**
347
+ * The identity of an Azure application through which Storage Transfer Service can authenticate requests using Azure workload identity federation. Storage Transfer Service can issue requests to Azure Storage through registered Azure applications, eliminating the need to pass credentials to Storage Transfer Service directly. To configure federated identity, see [Configure access to Microsoft Azure Storage](https://cloud.google.com/storage-transfer/docs/source-microsoft-azure#option_3_authenticate_using_federated_identity).
348
+ */
349
+ export interface Schema$FederatedIdentityConfig {
350
+ /**
351
+ * Required. The client (application) ID of the application with federated credentials.
352
+ */
353
+ clientId?: string | null;
354
+ /**
355
+ * Required. The tenant (directory) ID of the application with federated credentials.
356
+ */
357
+ tenantId?: string | null;
358
+ }
342
359
  /**
343
360
  * In a GcsData resource, an object's name is the Cloud Storage object's name and its "last modification time" refers to the object's `updated` property of Cloud Storage objects, which changes when the content or the metadata of the object is updated.
344
361
  */
@@ -383,7 +400,7 @@ export namespace storagetransfer_v1 {
383
400
  */
384
401
  export interface Schema$HttpData {
385
402
  /**
386
- * Required. The URL that points to the file that stores the object list entries. This file must allow public access. Currently, only URLs with HTTP and HTTPS schemes are supported.
403
+ * Required. The URL that points to the file that stores the object list entries. This file must allow public access. The URL is either an HTTP/HTTPS address (e.g. `https://example.com/urllist.tsv`) or a Cloud Storage path (e.g. `gs://my-bucket/urllist.tsv`).
387
404
  */
388
405
  listUrl?: string | null;
389
406
  }
@@ -502,7 +519,7 @@ export namespace storagetransfer_v1 {
502
519
  pubsubTopic?: string | null;
503
520
  }
504
521
  /**
505
- * Conditions that determine which objects are transferred. Applies only to Cloud Data Sources such as S3, Azure, and Cloud Storage. The "last modification time" refers to the time of the last change to the object's content or metadata — specifically, this is the `updated` property of Cloud Storage objects, the `LastModified` field of S3 objects, and the `Last-Modified` header of Azure blobs. Transfers with a PosixFilesystem source or destination don't support `ObjectConditions`.
522
+ * Conditions that determine which objects are transferred. Applies only to Cloud Data Sources such as S3, Azure, and Cloud Storage. The "last modification time" refers to the time of the last change to the object's content or metadata — specifically, this is the `updated` property of Cloud Storage objects, the `LastModified` field of S3 objects, and the `Last-Modified` header of Azure blobs. For S3 objects, the `LastModified` value is the time the object begins uploading. If the object meets your "last modification time" criteria, but has not finished uploading, the object is not transferred. See [Transfer from Amazon S3 to Cloud Storage](https://cloud.google.com/storage-transfer/docs/create-transfers/agentless/s3#transfer_options) for more information. Transfers with a PosixFilesystem source or destination don't support `ObjectConditions`.
506
523
  */
507
524
  export interface Schema$ObjectConditions {
508
525
  /**
@@ -628,7 +645,7 @@ export namespace storagetransfer_v1 {
628
645
  */
629
646
  export interface Schema$Schedule {
630
647
  /**
631
- * The time in UTC that no further transfer operations are scheduled. Combined with schedule_end_date, `end_time_of_day` specifies the end date and time for starting new transfer operations. This field must be greater than or equal to the timestamp corresponding to the combintation of schedule_start_date and start_time_of_day, and is subject to the following: * If `end_time_of_day` is not set and `schedule_end_date` is set, then a default value of `23:59:59` is used for `end_time_of_day`. * If `end_time_of_day` is set and `schedule_end_date` is not set, then INVALID_ARGUMENT is returned.
648
+ * The time in UTC that no further transfer operations are scheduled. Combined with schedule_end_date, `end_time_of_day` specifies the end date and time for starting new transfer operations. This field must be greater than or equal to the timestamp corresponding to the combination of schedule_start_date and start_time_of_day, and is subject to the following: * If `end_time_of_day` is not set and `schedule_end_date` is set, then a default value of `23:59:59` is used for `end_time_of_day`. * If `end_time_of_day` is set and `schedule_end_date` is not set, then INVALID_ARGUMENT is returned.
632
649
  */
633
650
  endTimeOfDay?: Schema$TimeOfDay;
634
651
  /**
@@ -827,6 +844,10 @@ export namespace storagetransfer_v1 {
827
844
  * Specifies schedule for the transfer job. This is an optional field. When the field is not set, the job never executes a transfer, unless you invoke RunTransferJob or update the job to have a non-empty schedule.
828
845
  */
829
846
  schedule?: Schema$Schedule;
847
+ /**
848
+ * Optional. The user-managed service account to which to delegate service agent permissions. You can grant Cloud Storage bucket permissions to this service account instead of to the Transfer Service service agent. Format is `projects/-/serviceAccounts/ACCOUNT_EMAIL_OR_UNIQUEID` Either the service account email (`SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com`) or the unique ID (`123456789012345678901`) are accepted in the string. The `-` wildcard character is required; replacing it with a project ID is invalid. See https://cloud.google.com//storage-transfer/docs/delegate-service-agent-permissions for required permissions.
849
+ */
850
+ serviceAccount?: string | null;
830
851
  /**
831
852
  * Status of the job. This value MUST be specified for `CreateTransferJobRequests`. **Note:** The effect of the new job status takes place during a subsequent job run. For example, if you change the job status from ENABLED to DISABLED, and an operation spawned by the transfer is running, the status change would not affect the current operation.
832
853
  */
@@ -911,7 +932,7 @@ export namespace storagetransfer_v1 {
911
932
  */
912
933
  metadataOptions?: Schema$MetadataOptions;
913
934
  /**
914
- * When to overwrite objects that already exist in the sink. The default is that only objects that are different from the source are ovewritten. If true, all objects in the sink whose name matches an object in the source are overwritten with the source object.
935
+ * When to overwrite objects that already exist in the sink. The default is that only objects that are different from the source are overwritten. If true, all objects in the sink whose name matches an object in the source are overwritten with the source object.
915
936
  */
916
937
  overwriteObjectsAlreadyExistingInSink?: boolean | null;
917
938
  /**
@@ -1010,6 +1031,53 @@ export namespace storagetransfer_v1 {
1010
1031
 
1011
1032
  /**
1012
1033
  * Returns the Google service account that is used by Storage Transfer Service to access buckets in the project where transfers run or in other projects. Each Google service account is associated with one Google Cloud project. Users should add this service account to the Google Cloud Storage bucket ACLs to grant access to Storage Transfer Service. This service account is created and owned by Storage Transfer Service and can only be used by Storage Transfer Service.
1034
+ * @example
1035
+ * ```js
1036
+ * // Before running the sample:
1037
+ * // - Enable the API at:
1038
+ * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
1039
+ * // - Login into gcloud by running:
1040
+ * // ```sh
1041
+ * // $ gcloud auth application-default login
1042
+ * // ```
1043
+ * // - Install the npm module by running:
1044
+ * // ```sh
1045
+ * // $ npm install googleapis
1046
+ * // ```
1047
+ *
1048
+ * const {google} = require('googleapis');
1049
+ * const storagetransfer = google.storagetransfer('v1');
1050
+ *
1051
+ * async function main() {
1052
+ * const auth = new google.auth.GoogleAuth({
1053
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1054
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1055
+ * });
1056
+ *
1057
+ * // Acquire an auth client, and bind it to all future calls
1058
+ * const authClient = await auth.getClient();
1059
+ * google.options({auth: authClient});
1060
+ *
1061
+ * // Do the magic
1062
+ * const res = await storagetransfer.googleServiceAccounts.get({
1063
+ * // Required. The ID of the Google Cloud project that the Google service account is associated with.
1064
+ * projectId: 'placeholder-value',
1065
+ * });
1066
+ * console.log(res.data);
1067
+ *
1068
+ * // Example response
1069
+ * // {
1070
+ * // "accountEmail": "my_accountEmail",
1071
+ * // "subjectId": "my_subjectId"
1072
+ * // }
1073
+ * }
1074
+ *
1075
+ * main().catch(e => {
1076
+ * console.error(e);
1077
+ * throw e;
1078
+ * });
1079
+ *
1080
+ * ```
1013
1081
  *
1014
1082
  * @param params - Parameters for request
1015
1083
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1019,11 +1087,11 @@ export namespace storagetransfer_v1 {
1019
1087
  get(
1020
1088
  params: Params$Resource$Googleserviceaccounts$Get,
1021
1089
  options: StreamMethodOptions
1022
- ): GaxiosPromise<Readable>;
1090
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1023
1091
  get(
1024
1092
  params?: Params$Resource$Googleserviceaccounts$Get,
1025
1093
  options?: MethodOptions
1026
- ): GaxiosPromise<Schema$GoogleServiceAccount>;
1094
+ ): Promise<GaxiosResponseWithHTTP2<Schema$GoogleServiceAccount>>;
1027
1095
  get(
1028
1096
  params: Params$Resource$Googleserviceaccounts$Get,
1029
1097
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1056,8 +1124,8 @@ export namespace storagetransfer_v1 {
1056
1124
  | BodyResponseCallback<Readable>
1057
1125
  ):
1058
1126
  | void
1059
- | GaxiosPromise<Schema$GoogleServiceAccount>
1060
- | GaxiosPromise<Readable> {
1127
+ | Promise<GaxiosResponseWithHTTP2<Schema$GoogleServiceAccount>>
1128
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1061
1129
  let params = (paramsOrCallback ||
1062
1130
  {}) as Params$Resource$Googleserviceaccounts$Get;
1063
1131
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -1128,6 +1196,68 @@ export namespace storagetransfer_v1 {
1128
1196
 
1129
1197
  /**
1130
1198
  * Creates an agent pool resource.
1199
+ * @example
1200
+ * ```js
1201
+ * // Before running the sample:
1202
+ * // - Enable the API at:
1203
+ * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
1204
+ * // - Login into gcloud by running:
1205
+ * // ```sh
1206
+ * // $ gcloud auth application-default login
1207
+ * // ```
1208
+ * // - Install the npm module by running:
1209
+ * // ```sh
1210
+ * // $ npm install googleapis
1211
+ * // ```
1212
+ *
1213
+ * const {google} = require('googleapis');
1214
+ * const storagetransfer = google.storagetransfer('v1');
1215
+ *
1216
+ * async function main() {
1217
+ * const auth = new google.auth.GoogleAuth({
1218
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1219
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1220
+ * });
1221
+ *
1222
+ * // Acquire an auth client, and bind it to all future calls
1223
+ * const authClient = await auth.getClient();
1224
+ * google.options({auth: authClient});
1225
+ *
1226
+ * // Do the magic
1227
+ * const res = await storagetransfer.projects.agentPools.create({
1228
+ * // Required. The ID of the agent pool to create. The `agent_pool_id` must meet the following requirements: * Length of 128 characters or less. * Not start with the string `goog`. * Start with a lowercase ASCII character, followed by: * Zero or more: lowercase Latin alphabet characters, numerals, hyphens (`-`), periods (`.`), underscores (`_`), or tildes (`~`). * One or more numerals or lowercase ASCII characters. As expressed by the regular expression: `^(?!goog)[a-z]([a-z0-9-._~]*[a-z0-9])?$`.
1229
+ * agentPoolId: 'placeholder-value',
1230
+ * // Required. The ID of the Google Cloud project that owns the agent pool.
1231
+ * projectId: '[^/]+',
1232
+ *
1233
+ * // Request body metadata
1234
+ * requestBody: {
1235
+ * // request body parameters
1236
+ * // {
1237
+ * // "bandwidthLimit": {},
1238
+ * // "displayName": "my_displayName",
1239
+ * // "name": "my_name",
1240
+ * // "state": "my_state"
1241
+ * // }
1242
+ * },
1243
+ * });
1244
+ * console.log(res.data);
1245
+ *
1246
+ * // Example response
1247
+ * // {
1248
+ * // "bandwidthLimit": {},
1249
+ * // "displayName": "my_displayName",
1250
+ * // "name": "my_name",
1251
+ * // "state": "my_state"
1252
+ * // }
1253
+ * }
1254
+ *
1255
+ * main().catch(e => {
1256
+ * console.error(e);
1257
+ * throw e;
1258
+ * });
1259
+ *
1260
+ * ```
1131
1261
  *
1132
1262
  * @param params - Parameters for request
1133
1263
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1137,11 +1267,11 @@ export namespace storagetransfer_v1 {
1137
1267
  create(
1138
1268
  params: Params$Resource$Projects$Agentpools$Create,
1139
1269
  options: StreamMethodOptions
1140
- ): GaxiosPromise<Readable>;
1270
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1141
1271
  create(
1142
1272
  params?: Params$Resource$Projects$Agentpools$Create,
1143
1273
  options?: MethodOptions
1144
- ): GaxiosPromise<Schema$AgentPool>;
1274
+ ): Promise<GaxiosResponseWithHTTP2<Schema$AgentPool>>;
1145
1275
  create(
1146
1276
  params: Params$Resource$Projects$Agentpools$Create,
1147
1277
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1170,7 +1300,10 @@ export namespace storagetransfer_v1 {
1170
1300
  callback?:
1171
1301
  | BodyResponseCallback<Schema$AgentPool>
1172
1302
  | BodyResponseCallback<Readable>
1173
- ): void | GaxiosPromise<Schema$AgentPool> | GaxiosPromise<Readable> {
1303
+ ):
1304
+ | void
1305
+ | Promise<GaxiosResponseWithHTTP2<Schema$AgentPool>>
1306
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1174
1307
  let params = (paramsOrCallback ||
1175
1308
  {}) as Params$Resource$Projects$Agentpools$Create;
1176
1309
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -1217,6 +1350,50 @@ export namespace storagetransfer_v1 {
1217
1350
 
1218
1351
  /**
1219
1352
  * Deletes an agent pool.
1353
+ * @example
1354
+ * ```js
1355
+ * // Before running the sample:
1356
+ * // - Enable the API at:
1357
+ * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
1358
+ * // - Login into gcloud by running:
1359
+ * // ```sh
1360
+ * // $ gcloud auth application-default login
1361
+ * // ```
1362
+ * // - Install the npm module by running:
1363
+ * // ```sh
1364
+ * // $ npm install googleapis
1365
+ * // ```
1366
+ *
1367
+ * const {google} = require('googleapis');
1368
+ * const storagetransfer = google.storagetransfer('v1');
1369
+ *
1370
+ * async function main() {
1371
+ * const auth = new google.auth.GoogleAuth({
1372
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1373
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1374
+ * });
1375
+ *
1376
+ * // Acquire an auth client, and bind it to all future calls
1377
+ * const authClient = await auth.getClient();
1378
+ * google.options({auth: authClient});
1379
+ *
1380
+ * // Do the magic
1381
+ * const res = await storagetransfer.projects.agentPools.delete({
1382
+ * // Required. The name of the agent pool to delete.
1383
+ * name: 'projects/my-project/agentPools/my-agentPool',
1384
+ * });
1385
+ * console.log(res.data);
1386
+ *
1387
+ * // Example response
1388
+ * // {}
1389
+ * }
1390
+ *
1391
+ * main().catch(e => {
1392
+ * console.error(e);
1393
+ * throw e;
1394
+ * });
1395
+ *
1396
+ * ```
1220
1397
  *
1221
1398
  * @param params - Parameters for request
1222
1399
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1226,11 +1403,11 @@ export namespace storagetransfer_v1 {
1226
1403
  delete(
1227
1404
  params: Params$Resource$Projects$Agentpools$Delete,
1228
1405
  options: StreamMethodOptions
1229
- ): GaxiosPromise<Readable>;
1406
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1230
1407
  delete(
1231
1408
  params?: Params$Resource$Projects$Agentpools$Delete,
1232
1409
  options?: MethodOptions
1233
- ): GaxiosPromise<Schema$Empty>;
1410
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
1234
1411
  delete(
1235
1412
  params: Params$Resource$Projects$Agentpools$Delete,
1236
1413
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1259,7 +1436,10 @@ export namespace storagetransfer_v1 {
1259
1436
  callback?:
1260
1437
  | BodyResponseCallback<Schema$Empty>
1261
1438
  | BodyResponseCallback<Readable>
1262
- ): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
1439
+ ):
1440
+ | void
1441
+ | Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
1442
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1263
1443
  let params = (paramsOrCallback ||
1264
1444
  {}) as Params$Resource$Projects$Agentpools$Delete;
1265
1445
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -1303,6 +1483,55 @@ export namespace storagetransfer_v1 {
1303
1483
 
1304
1484
  /**
1305
1485
  * Gets an agent pool.
1486
+ * @example
1487
+ * ```js
1488
+ * // Before running the sample:
1489
+ * // - Enable the API at:
1490
+ * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
1491
+ * // - Login into gcloud by running:
1492
+ * // ```sh
1493
+ * // $ gcloud auth application-default login
1494
+ * // ```
1495
+ * // - Install the npm module by running:
1496
+ * // ```sh
1497
+ * // $ npm install googleapis
1498
+ * // ```
1499
+ *
1500
+ * const {google} = require('googleapis');
1501
+ * const storagetransfer = google.storagetransfer('v1');
1502
+ *
1503
+ * async function main() {
1504
+ * const auth = new google.auth.GoogleAuth({
1505
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1506
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1507
+ * });
1508
+ *
1509
+ * // Acquire an auth client, and bind it to all future calls
1510
+ * const authClient = await auth.getClient();
1511
+ * google.options({auth: authClient});
1512
+ *
1513
+ * // Do the magic
1514
+ * const res = await storagetransfer.projects.agentPools.get({
1515
+ * // Required. The name of the agent pool to get.
1516
+ * name: 'projects/my-project/agentPools/my-agentPool',
1517
+ * });
1518
+ * console.log(res.data);
1519
+ *
1520
+ * // Example response
1521
+ * // {
1522
+ * // "bandwidthLimit": {},
1523
+ * // "displayName": "my_displayName",
1524
+ * // "name": "my_name",
1525
+ * // "state": "my_state"
1526
+ * // }
1527
+ * }
1528
+ *
1529
+ * main().catch(e => {
1530
+ * console.error(e);
1531
+ * throw e;
1532
+ * });
1533
+ *
1534
+ * ```
1306
1535
  *
1307
1536
  * @param params - Parameters for request
1308
1537
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1312,11 +1541,11 @@ export namespace storagetransfer_v1 {
1312
1541
  get(
1313
1542
  params: Params$Resource$Projects$Agentpools$Get,
1314
1543
  options: StreamMethodOptions
1315
- ): GaxiosPromise<Readable>;
1544
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1316
1545
  get(
1317
1546
  params?: Params$Resource$Projects$Agentpools$Get,
1318
1547
  options?: MethodOptions
1319
- ): GaxiosPromise<Schema$AgentPool>;
1548
+ ): Promise<GaxiosResponseWithHTTP2<Schema$AgentPool>>;
1320
1549
  get(
1321
1550
  params: Params$Resource$Projects$Agentpools$Get,
1322
1551
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1345,7 +1574,10 @@ export namespace storagetransfer_v1 {
1345
1574
  callback?:
1346
1575
  | BodyResponseCallback<Schema$AgentPool>
1347
1576
  | BodyResponseCallback<Readable>
1348
- ): void | GaxiosPromise<Schema$AgentPool> | GaxiosPromise<Readable> {
1577
+ ):
1578
+ | void
1579
+ | Promise<GaxiosResponseWithHTTP2<Schema$AgentPool>>
1580
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1349
1581
  let params = (paramsOrCallback ||
1350
1582
  {}) as Params$Resource$Projects$Agentpools$Get;
1351
1583
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -1389,6 +1621,59 @@ export namespace storagetransfer_v1 {
1389
1621
 
1390
1622
  /**
1391
1623
  * Lists agent pools.
1624
+ * @example
1625
+ * ```js
1626
+ * // Before running the sample:
1627
+ * // - Enable the API at:
1628
+ * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
1629
+ * // - Login into gcloud by running:
1630
+ * // ```sh
1631
+ * // $ gcloud auth application-default login
1632
+ * // ```
1633
+ * // - Install the npm module by running:
1634
+ * // ```sh
1635
+ * // $ npm install googleapis
1636
+ * // ```
1637
+ *
1638
+ * const {google} = require('googleapis');
1639
+ * const storagetransfer = google.storagetransfer('v1');
1640
+ *
1641
+ * async function main() {
1642
+ * const auth = new google.auth.GoogleAuth({
1643
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1644
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1645
+ * });
1646
+ *
1647
+ * // Acquire an auth client, and bind it to all future calls
1648
+ * const authClient = await auth.getClient();
1649
+ * google.options({auth: authClient});
1650
+ *
1651
+ * // Do the magic
1652
+ * const res = await storagetransfer.projects.agentPools.list({
1653
+ * // An optional list of query parameters specified as JSON text in the form of: `{"agentPoolNames":["agentpool1","agentpool2",...]\}` Since `agentPoolNames` support multiple values, its values must be specified with array notation. When the filter is either empty or not provided, the list returns all agent pools for the project.
1654
+ * filter: 'placeholder-value',
1655
+ * // The list page size. The max allowed value is `256`.
1656
+ * pageSize: 'placeholder-value',
1657
+ * // The list page token.
1658
+ * pageToken: 'placeholder-value',
1659
+ * // Required. The ID of the Google Cloud project that owns the job.
1660
+ * projectId: '[^/]+',
1661
+ * });
1662
+ * console.log(res.data);
1663
+ *
1664
+ * // Example response
1665
+ * // {
1666
+ * // "agentPools": [],
1667
+ * // "nextPageToken": "my_nextPageToken"
1668
+ * // }
1669
+ * }
1670
+ *
1671
+ * main().catch(e => {
1672
+ * console.error(e);
1673
+ * throw e;
1674
+ * });
1675
+ *
1676
+ * ```
1392
1677
  *
1393
1678
  * @param params - Parameters for request
1394
1679
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1398,11 +1683,11 @@ export namespace storagetransfer_v1 {
1398
1683
  list(
1399
1684
  params: Params$Resource$Projects$Agentpools$List,
1400
1685
  options: StreamMethodOptions
1401
- ): GaxiosPromise<Readable>;
1686
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1402
1687
  list(
1403
1688
  params?: Params$Resource$Projects$Agentpools$List,
1404
1689
  options?: MethodOptions
1405
- ): GaxiosPromise<Schema$ListAgentPoolsResponse>;
1690
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListAgentPoolsResponse>>;
1406
1691
  list(
1407
1692
  params: Params$Resource$Projects$Agentpools$List,
1408
1693
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1435,8 +1720,8 @@ export namespace storagetransfer_v1 {
1435
1720
  | BodyResponseCallback<Readable>
1436
1721
  ):
1437
1722
  | void
1438
- | GaxiosPromise<Schema$ListAgentPoolsResponse>
1439
- | GaxiosPromise<Readable> {
1723
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListAgentPoolsResponse>>
1724
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1440
1725
  let params = (paramsOrCallback ||
1441
1726
  {}) as Params$Resource$Projects$Agentpools$List;
1442
1727
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -1483,6 +1768,68 @@ export namespace storagetransfer_v1 {
1483
1768
 
1484
1769
  /**
1485
1770
  * Updates an existing agent pool resource.
1771
+ * @example
1772
+ * ```js
1773
+ * // Before running the sample:
1774
+ * // - Enable the API at:
1775
+ * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
1776
+ * // - Login into gcloud by running:
1777
+ * // ```sh
1778
+ * // $ gcloud auth application-default login
1779
+ * // ```
1780
+ * // - Install the npm module by running:
1781
+ * // ```sh
1782
+ * // $ npm install googleapis
1783
+ * // ```
1784
+ *
1785
+ * const {google} = require('googleapis');
1786
+ * const storagetransfer = google.storagetransfer('v1');
1787
+ *
1788
+ * async function main() {
1789
+ * const auth = new google.auth.GoogleAuth({
1790
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1791
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1792
+ * });
1793
+ *
1794
+ * // Acquire an auth client, and bind it to all future calls
1795
+ * const authClient = await auth.getClient();
1796
+ * google.options({auth: authClient});
1797
+ *
1798
+ * // Do the magic
1799
+ * const res = await storagetransfer.projects.agentPools.patch({
1800
+ * // Required. Specifies a unique string that identifies the agent pool. Format: `projects/{project_id\}/agentPools/{agent_pool_id\}`
1801
+ * name: 'projects/my-project/agentPools/my-agentPool',
1802
+ * // The [field mask] (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf) of the fields in `agentPool` to update in this request. The following `agentPool` fields can be updated: * display_name * bandwidth_limit
1803
+ * updateMask: 'placeholder-value',
1804
+ *
1805
+ * // Request body metadata
1806
+ * requestBody: {
1807
+ * // request body parameters
1808
+ * // {
1809
+ * // "bandwidthLimit": {},
1810
+ * // "displayName": "my_displayName",
1811
+ * // "name": "my_name",
1812
+ * // "state": "my_state"
1813
+ * // }
1814
+ * },
1815
+ * });
1816
+ * console.log(res.data);
1817
+ *
1818
+ * // Example response
1819
+ * // {
1820
+ * // "bandwidthLimit": {},
1821
+ * // "displayName": "my_displayName",
1822
+ * // "name": "my_name",
1823
+ * // "state": "my_state"
1824
+ * // }
1825
+ * }
1826
+ *
1827
+ * main().catch(e => {
1828
+ * console.error(e);
1829
+ * throw e;
1830
+ * });
1831
+ *
1832
+ * ```
1486
1833
  *
1487
1834
  * @param params - Parameters for request
1488
1835
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1492,11 +1839,11 @@ export namespace storagetransfer_v1 {
1492
1839
  patch(
1493
1840
  params: Params$Resource$Projects$Agentpools$Patch,
1494
1841
  options: StreamMethodOptions
1495
- ): GaxiosPromise<Readable>;
1842
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1496
1843
  patch(
1497
1844
  params?: Params$Resource$Projects$Agentpools$Patch,
1498
1845
  options?: MethodOptions
1499
- ): GaxiosPromise<Schema$AgentPool>;
1846
+ ): Promise<GaxiosResponseWithHTTP2<Schema$AgentPool>>;
1500
1847
  patch(
1501
1848
  params: Params$Resource$Projects$Agentpools$Patch,
1502
1849
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1525,7 +1872,10 @@ export namespace storagetransfer_v1 {
1525
1872
  callback?:
1526
1873
  | BodyResponseCallback<Schema$AgentPool>
1527
1874
  | BodyResponseCallback<Readable>
1528
- ): void | GaxiosPromise<Schema$AgentPool> | GaxiosPromise<Readable> {
1875
+ ):
1876
+ | void
1877
+ | Promise<GaxiosResponseWithHTTP2<Schema$AgentPool>>
1878
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1529
1879
  let params = (paramsOrCallback ||
1530
1880
  {}) as Params$Resource$Projects$Agentpools$Patch;
1531
1881
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -1642,6 +1992,85 @@ export namespace storagetransfer_v1 {
1642
1992
 
1643
1993
  /**
1644
1994
  * Creates a transfer job that runs periodically.
1995
+ * @example
1996
+ * ```js
1997
+ * // Before running the sample:
1998
+ * // - Enable the API at:
1999
+ * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
2000
+ * // - Login into gcloud by running:
2001
+ * // ```sh
2002
+ * // $ gcloud auth application-default login
2003
+ * // ```
2004
+ * // - Install the npm module by running:
2005
+ * // ```sh
2006
+ * // $ npm install googleapis
2007
+ * // ```
2008
+ *
2009
+ * const {google} = require('googleapis');
2010
+ * const storagetransfer = google.storagetransfer('v1');
2011
+ *
2012
+ * async function main() {
2013
+ * const auth = new google.auth.GoogleAuth({
2014
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2015
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2016
+ * });
2017
+ *
2018
+ * // Acquire an auth client, and bind it to all future calls
2019
+ * const authClient = await auth.getClient();
2020
+ * google.options({auth: authClient});
2021
+ *
2022
+ * // Do the magic
2023
+ * const res = await storagetransfer.transferJobs.create({
2024
+ * // Request body metadata
2025
+ * requestBody: {
2026
+ * // request body parameters
2027
+ * // {
2028
+ * // "creationTime": "my_creationTime",
2029
+ * // "deletionTime": "my_deletionTime",
2030
+ * // "description": "my_description",
2031
+ * // "eventStream": {},
2032
+ * // "lastModificationTime": "my_lastModificationTime",
2033
+ * // "latestOperationName": "my_latestOperationName",
2034
+ * // "loggingConfig": {},
2035
+ * // "name": "my_name",
2036
+ * // "notificationConfig": {},
2037
+ * // "projectId": "my_projectId",
2038
+ * // "replicationSpec": {},
2039
+ * // "schedule": {},
2040
+ * // "serviceAccount": "my_serviceAccount",
2041
+ * // "status": "my_status",
2042
+ * // "transferSpec": {}
2043
+ * // }
2044
+ * },
2045
+ * });
2046
+ * console.log(res.data);
2047
+ *
2048
+ * // Example response
2049
+ * // {
2050
+ * // "creationTime": "my_creationTime",
2051
+ * // "deletionTime": "my_deletionTime",
2052
+ * // "description": "my_description",
2053
+ * // "eventStream": {},
2054
+ * // "lastModificationTime": "my_lastModificationTime",
2055
+ * // "latestOperationName": "my_latestOperationName",
2056
+ * // "loggingConfig": {},
2057
+ * // "name": "my_name",
2058
+ * // "notificationConfig": {},
2059
+ * // "projectId": "my_projectId",
2060
+ * // "replicationSpec": {},
2061
+ * // "schedule": {},
2062
+ * // "serviceAccount": "my_serviceAccount",
2063
+ * // "status": "my_status",
2064
+ * // "transferSpec": {}
2065
+ * // }
2066
+ * }
2067
+ *
2068
+ * main().catch(e => {
2069
+ * console.error(e);
2070
+ * throw e;
2071
+ * });
2072
+ *
2073
+ * ```
1645
2074
  *
1646
2075
  * @param params - Parameters for request
1647
2076
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1651,11 +2080,11 @@ export namespace storagetransfer_v1 {
1651
2080
  create(
1652
2081
  params: Params$Resource$Transferjobs$Create,
1653
2082
  options: StreamMethodOptions
1654
- ): GaxiosPromise<Readable>;
2083
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1655
2084
  create(
1656
2085
  params?: Params$Resource$Transferjobs$Create,
1657
2086
  options?: MethodOptions
1658
- ): GaxiosPromise<Schema$TransferJob>;
2087
+ ): Promise<GaxiosResponseWithHTTP2<Schema$TransferJob>>;
1659
2088
  create(
1660
2089
  params: Params$Resource$Transferjobs$Create,
1661
2090
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1684,7 +2113,10 @@ export namespace storagetransfer_v1 {
1684
2113
  callback?:
1685
2114
  | BodyResponseCallback<Schema$TransferJob>
1686
2115
  | BodyResponseCallback<Readable>
1687
- ): void | GaxiosPromise<Schema$TransferJob> | GaxiosPromise<Readable> {
2116
+ ):
2117
+ | void
2118
+ | Promise<GaxiosResponseWithHTTP2<Schema$TransferJob>>
2119
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1688
2120
  let params = (paramsOrCallback ||
1689
2121
  {}) as Params$Resource$Transferjobs$Create;
1690
2122
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -1728,6 +2160,52 @@ export namespace storagetransfer_v1 {
1728
2160
 
1729
2161
  /**
1730
2162
  * Deletes a transfer job. Deleting a transfer job sets its status to DELETED.
2163
+ * @example
2164
+ * ```js
2165
+ * // Before running the sample:
2166
+ * // - Enable the API at:
2167
+ * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
2168
+ * // - Login into gcloud by running:
2169
+ * // ```sh
2170
+ * // $ gcloud auth application-default login
2171
+ * // ```
2172
+ * // - Install the npm module by running:
2173
+ * // ```sh
2174
+ * // $ npm install googleapis
2175
+ * // ```
2176
+ *
2177
+ * const {google} = require('googleapis');
2178
+ * const storagetransfer = google.storagetransfer('v1');
2179
+ *
2180
+ * async function main() {
2181
+ * const auth = new google.auth.GoogleAuth({
2182
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2183
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2184
+ * });
2185
+ *
2186
+ * // Acquire an auth client, and bind it to all future calls
2187
+ * const authClient = await auth.getClient();
2188
+ * google.options({auth: authClient});
2189
+ *
2190
+ * // Do the magic
2191
+ * const res = await storagetransfer.transferJobs.delete({
2192
+ * // Required. The job to delete.
2193
+ * jobName: 'transferJobs/.*',
2194
+ * // Required. The ID of the Google Cloud project that owns the job.
2195
+ * projectId: 'placeholder-value',
2196
+ * });
2197
+ * console.log(res.data);
2198
+ *
2199
+ * // Example response
2200
+ * // {}
2201
+ * }
2202
+ *
2203
+ * main().catch(e => {
2204
+ * console.error(e);
2205
+ * throw e;
2206
+ * });
2207
+ *
2208
+ * ```
1731
2209
  *
1732
2210
  * @param params - Parameters for request
1733
2211
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1737,11 +2215,11 @@ export namespace storagetransfer_v1 {
1737
2215
  delete(
1738
2216
  params: Params$Resource$Transferjobs$Delete,
1739
2217
  options: StreamMethodOptions
1740
- ): GaxiosPromise<Readable>;
2218
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1741
2219
  delete(
1742
2220
  params?: Params$Resource$Transferjobs$Delete,
1743
2221
  options?: MethodOptions
1744
- ): GaxiosPromise<Schema$Empty>;
2222
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
1745
2223
  delete(
1746
2224
  params: Params$Resource$Transferjobs$Delete,
1747
2225
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1770,7 +2248,10 @@ export namespace storagetransfer_v1 {
1770
2248
  callback?:
1771
2249
  | BodyResponseCallback<Schema$Empty>
1772
2250
  | BodyResponseCallback<Readable>
1773
- ): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
2251
+ ):
2252
+ | void
2253
+ | Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
2254
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1774
2255
  let params = (paramsOrCallback ||
1775
2256
  {}) as Params$Resource$Transferjobs$Delete;
1776
2257
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -1814,6 +2295,68 @@ export namespace storagetransfer_v1 {
1814
2295
 
1815
2296
  /**
1816
2297
  * Gets a transfer job.
2298
+ * @example
2299
+ * ```js
2300
+ * // Before running the sample:
2301
+ * // - Enable the API at:
2302
+ * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
2303
+ * // - Login into gcloud by running:
2304
+ * // ```sh
2305
+ * // $ gcloud auth application-default login
2306
+ * // ```
2307
+ * // - Install the npm module by running:
2308
+ * // ```sh
2309
+ * // $ npm install googleapis
2310
+ * // ```
2311
+ *
2312
+ * const {google} = require('googleapis');
2313
+ * const storagetransfer = google.storagetransfer('v1');
2314
+ *
2315
+ * async function main() {
2316
+ * const auth = new google.auth.GoogleAuth({
2317
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2318
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2319
+ * });
2320
+ *
2321
+ * // Acquire an auth client, and bind it to all future calls
2322
+ * const authClient = await auth.getClient();
2323
+ * google.options({auth: authClient});
2324
+ *
2325
+ * // Do the magic
2326
+ * const res = await storagetransfer.transferJobs.get({
2327
+ * // Required. The job to get.
2328
+ * jobName: 'transferJobs/.*',
2329
+ * // Required. The ID of the Google Cloud project that owns the job.
2330
+ * projectId: 'placeholder-value',
2331
+ * });
2332
+ * console.log(res.data);
2333
+ *
2334
+ * // Example response
2335
+ * // {
2336
+ * // "creationTime": "my_creationTime",
2337
+ * // "deletionTime": "my_deletionTime",
2338
+ * // "description": "my_description",
2339
+ * // "eventStream": {},
2340
+ * // "lastModificationTime": "my_lastModificationTime",
2341
+ * // "latestOperationName": "my_latestOperationName",
2342
+ * // "loggingConfig": {},
2343
+ * // "name": "my_name",
2344
+ * // "notificationConfig": {},
2345
+ * // "projectId": "my_projectId",
2346
+ * // "replicationSpec": {},
2347
+ * // "schedule": {},
2348
+ * // "serviceAccount": "my_serviceAccount",
2349
+ * // "status": "my_status",
2350
+ * // "transferSpec": {}
2351
+ * // }
2352
+ * }
2353
+ *
2354
+ * main().catch(e => {
2355
+ * console.error(e);
2356
+ * throw e;
2357
+ * });
2358
+ *
2359
+ * ```
1817
2360
  *
1818
2361
  * @param params - Parameters for request
1819
2362
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1823,11 +2366,11 @@ export namespace storagetransfer_v1 {
1823
2366
  get(
1824
2367
  params: Params$Resource$Transferjobs$Get,
1825
2368
  options: StreamMethodOptions
1826
- ): GaxiosPromise<Readable>;
2369
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1827
2370
  get(
1828
2371
  params?: Params$Resource$Transferjobs$Get,
1829
2372
  options?: MethodOptions
1830
- ): GaxiosPromise<Schema$TransferJob>;
2373
+ ): Promise<GaxiosResponseWithHTTP2<Schema$TransferJob>>;
1831
2374
  get(
1832
2375
  params: Params$Resource$Transferjobs$Get,
1833
2376
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1856,7 +2399,10 @@ export namespace storagetransfer_v1 {
1856
2399
  callback?:
1857
2400
  | BodyResponseCallback<Schema$TransferJob>
1858
2401
  | BodyResponseCallback<Readable>
1859
- ): void | GaxiosPromise<Schema$TransferJob> | GaxiosPromise<Readable> {
2402
+ ):
2403
+ | void
2404
+ | Promise<GaxiosResponseWithHTTP2<Schema$TransferJob>>
2405
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1860
2406
  let params = (paramsOrCallback || {}) as Params$Resource$Transferjobs$Get;
1861
2407
  let options = (optionsOrCallback || {}) as MethodOptions;
1862
2408
 
@@ -1899,6 +2445,57 @@ export namespace storagetransfer_v1 {
1899
2445
 
1900
2446
  /**
1901
2447
  * Lists transfer jobs.
2448
+ * @example
2449
+ * ```js
2450
+ * // Before running the sample:
2451
+ * // - Enable the API at:
2452
+ * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
2453
+ * // - Login into gcloud by running:
2454
+ * // ```sh
2455
+ * // $ gcloud auth application-default login
2456
+ * // ```
2457
+ * // - Install the npm module by running:
2458
+ * // ```sh
2459
+ * // $ npm install googleapis
2460
+ * // ```
2461
+ *
2462
+ * const {google} = require('googleapis');
2463
+ * const storagetransfer = google.storagetransfer('v1');
2464
+ *
2465
+ * async function main() {
2466
+ * const auth = new google.auth.GoogleAuth({
2467
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2468
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2469
+ * });
2470
+ *
2471
+ * // Acquire an auth client, and bind it to all future calls
2472
+ * const authClient = await auth.getClient();
2473
+ * google.options({auth: authClient});
2474
+ *
2475
+ * // Do the magic
2476
+ * const res = await storagetransfer.transferJobs.list({
2477
+ * // Required. A list of query parameters specified as JSON text in the form of: ``` { "projectId":"my_project_id", "jobNames":["jobid1","jobid2",...], "jobStatuses":["status1","status2",...], "dataBackend":"QUERY_REPLICATION_CONFIGS", "sourceBucket":"source-bucket-name", "sinkBucket":"sink-bucket-name", \} ``` The JSON formatting in the example is for display only; provide the query parameters without spaces or line breaks. * `projectId` is required. * Since `jobNames` and `jobStatuses` support multiple values, their values must be specified with array notation. `jobNames` and `jobStatuses` are optional. Valid values are case-insensitive: * ENABLED * DISABLED * DELETED * Specify `"dataBackend":"QUERY_REPLICATION_CONFIGS"` to return a list of cross-bucket replication jobs. * Limit the results to jobs from a particular bucket with `sourceBucket` and/or to a particular bucket with `sinkBucket`.
2478
+ * filter: 'placeholder-value',
2479
+ * // The list page size. The max allowed value is 256.
2480
+ * pageSize: 'placeholder-value',
2481
+ * // The list page token.
2482
+ * pageToken: 'placeholder-value',
2483
+ * });
2484
+ * console.log(res.data);
2485
+ *
2486
+ * // Example response
2487
+ * // {
2488
+ * // "nextPageToken": "my_nextPageToken",
2489
+ * // "transferJobs": []
2490
+ * // }
2491
+ * }
2492
+ *
2493
+ * main().catch(e => {
2494
+ * console.error(e);
2495
+ * throw e;
2496
+ * });
2497
+ *
2498
+ * ```
1902
2499
  *
1903
2500
  * @param params - Parameters for request
1904
2501
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1908,11 +2505,11 @@ export namespace storagetransfer_v1 {
1908
2505
  list(
1909
2506
  params: Params$Resource$Transferjobs$List,
1910
2507
  options: StreamMethodOptions
1911
- ): GaxiosPromise<Readable>;
2508
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
1912
2509
  list(
1913
2510
  params?: Params$Resource$Transferjobs$List,
1914
2511
  options?: MethodOptions
1915
- ): GaxiosPromise<Schema$ListTransferJobsResponse>;
2512
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListTransferJobsResponse>>;
1916
2513
  list(
1917
2514
  params: Params$Resource$Transferjobs$List,
1918
2515
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -1945,8 +2542,8 @@ export namespace storagetransfer_v1 {
1945
2542
  | BodyResponseCallback<Readable>
1946
2543
  ):
1947
2544
  | void
1948
- | GaxiosPromise<Schema$ListTransferJobsResponse>
1949
- | GaxiosPromise<Readable> {
2545
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListTransferJobsResponse>>
2546
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
1950
2547
  let params = (paramsOrCallback ||
1951
2548
  {}) as Params$Resource$Transferjobs$List;
1952
2549
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -1990,6 +2587,76 @@ export namespace storagetransfer_v1 {
1990
2587
 
1991
2588
  /**
1992
2589
  * Updates a transfer job. Updating a job's transfer spec does not affect transfer operations that are running already. **Note:** The job's status field can be modified using this RPC (for example, to set a job's status to DELETED, DISABLED, or ENABLED).
2590
+ * @example
2591
+ * ```js
2592
+ * // Before running the sample:
2593
+ * // - Enable the API at:
2594
+ * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
2595
+ * // - Login into gcloud by running:
2596
+ * // ```sh
2597
+ * // $ gcloud auth application-default login
2598
+ * // ```
2599
+ * // - Install the npm module by running:
2600
+ * // ```sh
2601
+ * // $ npm install googleapis
2602
+ * // ```
2603
+ *
2604
+ * const {google} = require('googleapis');
2605
+ * const storagetransfer = google.storagetransfer('v1');
2606
+ *
2607
+ * async function main() {
2608
+ * const auth = new google.auth.GoogleAuth({
2609
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2610
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2611
+ * });
2612
+ *
2613
+ * // Acquire an auth client, and bind it to all future calls
2614
+ * const authClient = await auth.getClient();
2615
+ * google.options({auth: authClient});
2616
+ *
2617
+ * // Do the magic
2618
+ * const res = await storagetransfer.transferJobs.patch({
2619
+ * // Required. The name of job to update.
2620
+ * jobName: 'transferJobs/.*',
2621
+ *
2622
+ * // Request body metadata
2623
+ * requestBody: {
2624
+ * // request body parameters
2625
+ * // {
2626
+ * // "projectId": "my_projectId",
2627
+ * // "transferJob": {},
2628
+ * // "updateTransferJobFieldMask": "my_updateTransferJobFieldMask"
2629
+ * // }
2630
+ * },
2631
+ * });
2632
+ * console.log(res.data);
2633
+ *
2634
+ * // Example response
2635
+ * // {
2636
+ * // "creationTime": "my_creationTime",
2637
+ * // "deletionTime": "my_deletionTime",
2638
+ * // "description": "my_description",
2639
+ * // "eventStream": {},
2640
+ * // "lastModificationTime": "my_lastModificationTime",
2641
+ * // "latestOperationName": "my_latestOperationName",
2642
+ * // "loggingConfig": {},
2643
+ * // "name": "my_name",
2644
+ * // "notificationConfig": {},
2645
+ * // "projectId": "my_projectId",
2646
+ * // "replicationSpec": {},
2647
+ * // "schedule": {},
2648
+ * // "serviceAccount": "my_serviceAccount",
2649
+ * // "status": "my_status",
2650
+ * // "transferSpec": {}
2651
+ * // }
2652
+ * }
2653
+ *
2654
+ * main().catch(e => {
2655
+ * console.error(e);
2656
+ * throw e;
2657
+ * });
2658
+ *
2659
+ * ```
1993
2660
  *
1994
2661
  * @param params - Parameters for request
1995
2662
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1999,11 +2666,11 @@ export namespace storagetransfer_v1 {
1999
2666
  patch(
2000
2667
  params: Params$Resource$Transferjobs$Patch,
2001
2668
  options: StreamMethodOptions
2002
- ): GaxiosPromise<Readable>;
2669
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2003
2670
  patch(
2004
2671
  params?: Params$Resource$Transferjobs$Patch,
2005
2672
  options?: MethodOptions
2006
- ): GaxiosPromise<Schema$TransferJob>;
2673
+ ): Promise<GaxiosResponseWithHTTP2<Schema$TransferJob>>;
2007
2674
  patch(
2008
2675
  params: Params$Resource$Transferjobs$Patch,
2009
2676
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -2032,7 +2699,10 @@ export namespace storagetransfer_v1 {
2032
2699
  callback?:
2033
2700
  | BodyResponseCallback<Schema$TransferJob>
2034
2701
  | BodyResponseCallback<Readable>
2035
- ): void | GaxiosPromise<Schema$TransferJob> | GaxiosPromise<Readable> {
2702
+ ):
2703
+ | void
2704
+ | Promise<GaxiosResponseWithHTTP2<Schema$TransferJob>>
2705
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2036
2706
  let params = (paramsOrCallback ||
2037
2707
  {}) as Params$Resource$Transferjobs$Patch;
2038
2708
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -2076,6 +2746,64 @@ export namespace storagetransfer_v1 {
2076
2746
 
2077
2747
  /**
2078
2748
  * Starts a new operation for the specified transfer job. A `TransferJob` has a maximum of one active `TransferOperation`. If this method is called while a `TransferOperation` is active, an error is returned.
2749
+ * @example
2750
+ * ```js
2751
+ * // Before running the sample:
2752
+ * // - Enable the API at:
2753
+ * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
2754
+ * // - Login into gcloud by running:
2755
+ * // ```sh
2756
+ * // $ gcloud auth application-default login
2757
+ * // ```
2758
+ * // - Install the npm module by running:
2759
+ * // ```sh
2760
+ * // $ npm install googleapis
2761
+ * // ```
2762
+ *
2763
+ * const {google} = require('googleapis');
2764
+ * const storagetransfer = google.storagetransfer('v1');
2765
+ *
2766
+ * async function main() {
2767
+ * const auth = new google.auth.GoogleAuth({
2768
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2769
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2770
+ * });
2771
+ *
2772
+ * // Acquire an auth client, and bind it to all future calls
2773
+ * const authClient = await auth.getClient();
2774
+ * google.options({auth: authClient});
2775
+ *
2776
+ * // Do the magic
2777
+ * const res = await storagetransfer.transferJobs.run({
2778
+ * // Required. The name of the transfer job.
2779
+ * jobName: 'transferJobs/.*',
2780
+ *
2781
+ * // Request body metadata
2782
+ * requestBody: {
2783
+ * // request body parameters
2784
+ * // {
2785
+ * // "projectId": "my_projectId"
2786
+ * // }
2787
+ * },
2788
+ * });
2789
+ * console.log(res.data);
2790
+ *
2791
+ * // Example response
2792
+ * // {
2793
+ * // "done": false,
2794
+ * // "error": {},
2795
+ * // "metadata": {},
2796
+ * // "name": "my_name",
2797
+ * // "response": {}
2798
+ * // }
2799
+ * }
2800
+ *
2801
+ * main().catch(e => {
2802
+ * console.error(e);
2803
+ * throw e;
2804
+ * });
2805
+ *
2806
+ * ```
2079
2807
  *
2080
2808
  * @param params - Parameters for request
2081
2809
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2085,11 +2813,11 @@ export namespace storagetransfer_v1 {
2085
2813
  run(
2086
2814
  params: Params$Resource$Transferjobs$Run,
2087
2815
  options: StreamMethodOptions
2088
- ): GaxiosPromise<Readable>;
2816
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2089
2817
  run(
2090
2818
  params?: Params$Resource$Transferjobs$Run,
2091
2819
  options?: MethodOptions
2092
- ): GaxiosPromise<Schema$Operation>;
2820
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2093
2821
  run(
2094
2822
  params: Params$Resource$Transferjobs$Run,
2095
2823
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -2118,7 +2846,10 @@ export namespace storagetransfer_v1 {
2118
2846
  callback?:
2119
2847
  | BodyResponseCallback<Schema$Operation>
2120
2848
  | BodyResponseCallback<Readable>
2121
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
2849
+ ):
2850
+ | void
2851
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
2852
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2122
2853
  let params = (paramsOrCallback || {}) as Params$Resource$Transferjobs$Run;
2123
2854
  let options = (optionsOrCallback || {}) as MethodOptions;
2124
2855
 
@@ -2235,6 +2966,56 @@ export namespace storagetransfer_v1 {
2235
2966
 
2236
2967
  /**
2237
2968
  * Cancels a transfer. Use the transferOperations.get method to check if the cancellation succeeded or if the operation completed despite the `cancel` request. When you cancel an operation, the currently running transfer is interrupted. For recurring transfer jobs, the next instance of the transfer job will still run. For example, if your job is configured to run every day at 1pm and you cancel Monday's operation at 1:05pm, Monday's transfer will stop. However, a transfer job will still be attempted on Tuesday. This applies only to currently running operations. If an operation is not currently running, `cancel` does nothing. *Caution:* Canceling a transfer job can leave your data in an unknown state. We recommend that you restore the state at both the destination and the source after the `cancel` request completes so that your data is in a consistent state. When you cancel a job, the next job computes a delta of files and may repair any inconsistent state. For instance, if you run a job every day, and today's job found 10 new files and transferred five files before you canceled the job, tomorrow's transfer operation will compute a new delta with the five files that were not copied today plus any new files discovered tomorrow.
2969
+ * @example
2970
+ * ```js
2971
+ * // Before running the sample:
2972
+ * // - Enable the API at:
2973
+ * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
2974
+ * // - Login into gcloud by running:
2975
+ * // ```sh
2976
+ * // $ gcloud auth application-default login
2977
+ * // ```
2978
+ * // - Install the npm module by running:
2979
+ * // ```sh
2980
+ * // $ npm install googleapis
2981
+ * // ```
2982
+ *
2983
+ * const {google} = require('googleapis');
2984
+ * const storagetransfer = google.storagetransfer('v1');
2985
+ *
2986
+ * async function main() {
2987
+ * const auth = new google.auth.GoogleAuth({
2988
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
2989
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2990
+ * });
2991
+ *
2992
+ * // Acquire an auth client, and bind it to all future calls
2993
+ * const authClient = await auth.getClient();
2994
+ * google.options({auth: authClient});
2995
+ *
2996
+ * // Do the magic
2997
+ * const res = await storagetransfer.transferOperations.cancel({
2998
+ * // The name of the operation resource to be cancelled.
2999
+ * name: 'transferOperations/.*',
3000
+ *
3001
+ * // Request body metadata
3002
+ * requestBody: {
3003
+ * // request body parameters
3004
+ * // {}
3005
+ * },
3006
+ * });
3007
+ * console.log(res.data);
3008
+ *
3009
+ * // Example response
3010
+ * // {}
3011
+ * }
3012
+ *
3013
+ * main().catch(e => {
3014
+ * console.error(e);
3015
+ * throw e;
3016
+ * });
3017
+ *
3018
+ * ```
2238
3019
  *
2239
3020
  * @param params - Parameters for request
2240
3021
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2244,11 +3025,11 @@ export namespace storagetransfer_v1 {
2244
3025
  cancel(
2245
3026
  params: Params$Resource$Transferoperations$Cancel,
2246
3027
  options: StreamMethodOptions
2247
- ): GaxiosPromise<Readable>;
3028
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2248
3029
  cancel(
2249
3030
  params?: Params$Resource$Transferoperations$Cancel,
2250
3031
  options?: MethodOptions
2251
- ): GaxiosPromise<Schema$Empty>;
3032
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
2252
3033
  cancel(
2253
3034
  params: Params$Resource$Transferoperations$Cancel,
2254
3035
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -2277,7 +3058,10 @@ export namespace storagetransfer_v1 {
2277
3058
  callback?:
2278
3059
  | BodyResponseCallback<Schema$Empty>
2279
3060
  | BodyResponseCallback<Readable>
2280
- ): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
3061
+ ):
3062
+ | void
3063
+ | Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
3064
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2281
3065
  let params = (paramsOrCallback ||
2282
3066
  {}) as Params$Resource$Transferoperations$Cancel;
2283
3067
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -2321,6 +3105,56 @@ export namespace storagetransfer_v1 {
2321
3105
 
2322
3106
  /**
2323
3107
  * Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
3108
+ * @example
3109
+ * ```js
3110
+ * // Before running the sample:
3111
+ * // - Enable the API at:
3112
+ * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
3113
+ * // - Login into gcloud by running:
3114
+ * // ```sh
3115
+ * // $ gcloud auth application-default login
3116
+ * // ```
3117
+ * // - Install the npm module by running:
3118
+ * // ```sh
3119
+ * // $ npm install googleapis
3120
+ * // ```
3121
+ *
3122
+ * const {google} = require('googleapis');
3123
+ * const storagetransfer = google.storagetransfer('v1');
3124
+ *
3125
+ * async function main() {
3126
+ * const auth = new google.auth.GoogleAuth({
3127
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3128
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3129
+ * });
3130
+ *
3131
+ * // Acquire an auth client, and bind it to all future calls
3132
+ * const authClient = await auth.getClient();
3133
+ * google.options({auth: authClient});
3134
+ *
3135
+ * // Do the magic
3136
+ * const res = await storagetransfer.transferOperations.get({
3137
+ * // The name of the operation resource.
3138
+ * name: 'transferOperations/.*',
3139
+ * });
3140
+ * console.log(res.data);
3141
+ *
3142
+ * // Example response
3143
+ * // {
3144
+ * // "done": false,
3145
+ * // "error": {},
3146
+ * // "metadata": {},
3147
+ * // "name": "my_name",
3148
+ * // "response": {}
3149
+ * // }
3150
+ * }
3151
+ *
3152
+ * main().catch(e => {
3153
+ * console.error(e);
3154
+ * throw e;
3155
+ * });
3156
+ *
3157
+ * ```
2324
3158
  *
2325
3159
  * @param params - Parameters for request
2326
3160
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2330,11 +3164,11 @@ export namespace storagetransfer_v1 {
2330
3164
  get(
2331
3165
  params: Params$Resource$Transferoperations$Get,
2332
3166
  options: StreamMethodOptions
2333
- ): GaxiosPromise<Readable>;
3167
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2334
3168
  get(
2335
3169
  params?: Params$Resource$Transferoperations$Get,
2336
3170
  options?: MethodOptions
2337
- ): GaxiosPromise<Schema$Operation>;
3171
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Operation>>;
2338
3172
  get(
2339
3173
  params: Params$Resource$Transferoperations$Get,
2340
3174
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -2363,7 +3197,10 @@ export namespace storagetransfer_v1 {
2363
3197
  callback?:
2364
3198
  | BodyResponseCallback<Schema$Operation>
2365
3199
  | BodyResponseCallback<Readable>
2366
- ): void | GaxiosPromise<Schema$Operation> | GaxiosPromise<Readable> {
3200
+ ):
3201
+ | void
3202
+ | Promise<GaxiosResponseWithHTTP2<Schema$Operation>>
3203
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2367
3204
  let params = (paramsOrCallback ||
2368
3205
  {}) as Params$Resource$Transferoperations$Get;
2369
3206
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -2407,6 +3244,59 @@ export namespace storagetransfer_v1 {
2407
3244
 
2408
3245
  /**
2409
3246
  * Lists transfer operations. Operations are ordered by their creation time in reverse chronological order.
3247
+ * @example
3248
+ * ```js
3249
+ * // Before running the sample:
3250
+ * // - Enable the API at:
3251
+ * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
3252
+ * // - Login into gcloud by running:
3253
+ * // ```sh
3254
+ * // $ gcloud auth application-default login
3255
+ * // ```
3256
+ * // - Install the npm module by running:
3257
+ * // ```sh
3258
+ * // $ npm install googleapis
3259
+ * // ```
3260
+ *
3261
+ * const {google} = require('googleapis');
3262
+ * const storagetransfer = google.storagetransfer('v1');
3263
+ *
3264
+ * async function main() {
3265
+ * const auth = new google.auth.GoogleAuth({
3266
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3267
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3268
+ * });
3269
+ *
3270
+ * // Acquire an auth client, and bind it to all future calls
3271
+ * const authClient = await auth.getClient();
3272
+ * google.options({auth: authClient});
3273
+ *
3274
+ * // Do the magic
3275
+ * const res = await storagetransfer.transferOperations.list({
3276
+ * // Required. A list of query parameters specified as JSON text in the form of: `{"projectId":"my_project_id", "jobNames":["jobid1","jobid2",...], "jobNamePattern": "job_name_pattern", "operationNames":["opid1","opid2",...], "operationNamePattern": "operation_name_pattern", "minCreationTime": "min_creation_time", "maxCreationTime": "max_creation_time", "transferStatuses":["status1","status2",...]\}` Since `jobNames`, `operationNames`, and `transferStatuses` support multiple values, they must be specified with array notation. `projectId` is the only argument that is required. If specified, `jobNamePattern` and `operationNamePattern` must match the full job or operation name respectively. '*' is a wildcard matching 0 or more characters. `minCreationTime` and `maxCreationTime` should be timestamps encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. The valid values for `transferStatuses` are case-insensitive: IN_PROGRESS, PAUSED, SUCCESS, FAILED, and ABORTED.
3277
+ * filter: 'placeholder-value',
3278
+ * // Required. The name of the type being listed; must be `transferOperations`.
3279
+ * name: 'transferOperations',
3280
+ * // The list page size. The max allowed value is 256.
3281
+ * pageSize: 'placeholder-value',
3282
+ * // The list page token.
3283
+ * pageToken: 'placeholder-value',
3284
+ * });
3285
+ * console.log(res.data);
3286
+ *
3287
+ * // Example response
3288
+ * // {
3289
+ * // "nextPageToken": "my_nextPageToken",
3290
+ * // "operations": []
3291
+ * // }
3292
+ * }
3293
+ *
3294
+ * main().catch(e => {
3295
+ * console.error(e);
3296
+ * throw e;
3297
+ * });
3298
+ *
3299
+ * ```
2410
3300
  *
2411
3301
  * @param params - Parameters for request
2412
3302
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2416,11 +3306,11 @@ export namespace storagetransfer_v1 {
2416
3306
  list(
2417
3307
  params: Params$Resource$Transferoperations$List,
2418
3308
  options: StreamMethodOptions
2419
- ): GaxiosPromise<Readable>;
3309
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2420
3310
  list(
2421
3311
  params?: Params$Resource$Transferoperations$List,
2422
3312
  options?: MethodOptions
2423
- ): GaxiosPromise<Schema$ListOperationsResponse>;
3313
+ ): Promise<GaxiosResponseWithHTTP2<Schema$ListOperationsResponse>>;
2424
3314
  list(
2425
3315
  params: Params$Resource$Transferoperations$List,
2426
3316
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -2453,8 +3343,8 @@ export namespace storagetransfer_v1 {
2453
3343
  | BodyResponseCallback<Readable>
2454
3344
  ):
2455
3345
  | void
2456
- | GaxiosPromise<Schema$ListOperationsResponse>
2457
- | GaxiosPromise<Readable> {
3346
+ | Promise<GaxiosResponseWithHTTP2<Schema$ListOperationsResponse>>
3347
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2458
3348
  let params = (paramsOrCallback ||
2459
3349
  {}) as Params$Resource$Transferoperations$List;
2460
3350
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -2498,6 +3388,56 @@ export namespace storagetransfer_v1 {
2498
3388
 
2499
3389
  /**
2500
3390
  * Pauses a transfer operation.
3391
+ * @example
3392
+ * ```js
3393
+ * // Before running the sample:
3394
+ * // - Enable the API at:
3395
+ * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
3396
+ * // - Login into gcloud by running:
3397
+ * // ```sh
3398
+ * // $ gcloud auth application-default login
3399
+ * // ```
3400
+ * // - Install the npm module by running:
3401
+ * // ```sh
3402
+ * // $ npm install googleapis
3403
+ * // ```
3404
+ *
3405
+ * const {google} = require('googleapis');
3406
+ * const storagetransfer = google.storagetransfer('v1');
3407
+ *
3408
+ * async function main() {
3409
+ * const auth = new google.auth.GoogleAuth({
3410
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3411
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3412
+ * });
3413
+ *
3414
+ * // Acquire an auth client, and bind it to all future calls
3415
+ * const authClient = await auth.getClient();
3416
+ * google.options({auth: authClient});
3417
+ *
3418
+ * // Do the magic
3419
+ * const res = await storagetransfer.transferOperations.pause({
3420
+ * // Required. The name of the transfer operation.
3421
+ * name: 'transferOperations/.*',
3422
+ *
3423
+ * // Request body metadata
3424
+ * requestBody: {
3425
+ * // request body parameters
3426
+ * // {}
3427
+ * },
3428
+ * });
3429
+ * console.log(res.data);
3430
+ *
3431
+ * // Example response
3432
+ * // {}
3433
+ * }
3434
+ *
3435
+ * main().catch(e => {
3436
+ * console.error(e);
3437
+ * throw e;
3438
+ * });
3439
+ *
3440
+ * ```
2501
3441
  *
2502
3442
  * @param params - Parameters for request
2503
3443
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2507,11 +3447,11 @@ export namespace storagetransfer_v1 {
2507
3447
  pause(
2508
3448
  params: Params$Resource$Transferoperations$Pause,
2509
3449
  options: StreamMethodOptions
2510
- ): GaxiosPromise<Readable>;
3450
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2511
3451
  pause(
2512
3452
  params?: Params$Resource$Transferoperations$Pause,
2513
3453
  options?: MethodOptions
2514
- ): GaxiosPromise<Schema$Empty>;
3454
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
2515
3455
  pause(
2516
3456
  params: Params$Resource$Transferoperations$Pause,
2517
3457
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -2540,7 +3480,10 @@ export namespace storagetransfer_v1 {
2540
3480
  callback?:
2541
3481
  | BodyResponseCallback<Schema$Empty>
2542
3482
  | BodyResponseCallback<Readable>
2543
- ): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
3483
+ ):
3484
+ | void
3485
+ | Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
3486
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2544
3487
  let params = (paramsOrCallback ||
2545
3488
  {}) as Params$Resource$Transferoperations$Pause;
2546
3489
  let options = (optionsOrCallback || {}) as MethodOptions;
@@ -2584,6 +3527,56 @@ export namespace storagetransfer_v1 {
2584
3527
 
2585
3528
  /**
2586
3529
  * Resumes a transfer operation that is paused.
3530
+ * @example
3531
+ * ```js
3532
+ * // Before running the sample:
3533
+ * // - Enable the API at:
3534
+ * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
3535
+ * // - Login into gcloud by running:
3536
+ * // ```sh
3537
+ * // $ gcloud auth application-default login
3538
+ * // ```
3539
+ * // - Install the npm module by running:
3540
+ * // ```sh
3541
+ * // $ npm install googleapis
3542
+ * // ```
3543
+ *
3544
+ * const {google} = require('googleapis');
3545
+ * const storagetransfer = google.storagetransfer('v1');
3546
+ *
3547
+ * async function main() {
3548
+ * const auth = new google.auth.GoogleAuth({
3549
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
3550
+ * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3551
+ * });
3552
+ *
3553
+ * // Acquire an auth client, and bind it to all future calls
3554
+ * const authClient = await auth.getClient();
3555
+ * google.options({auth: authClient});
3556
+ *
3557
+ * // Do the magic
3558
+ * const res = await storagetransfer.transferOperations.resume({
3559
+ * // Required. The name of the transfer operation.
3560
+ * name: 'transferOperations/.*',
3561
+ *
3562
+ * // Request body metadata
3563
+ * requestBody: {
3564
+ * // request body parameters
3565
+ * // {}
3566
+ * },
3567
+ * });
3568
+ * console.log(res.data);
3569
+ *
3570
+ * // Example response
3571
+ * // {}
3572
+ * }
3573
+ *
3574
+ * main().catch(e => {
3575
+ * console.error(e);
3576
+ * throw e;
3577
+ * });
3578
+ *
3579
+ * ```
2587
3580
  *
2588
3581
  * @param params - Parameters for request
2589
3582
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2593,11 +3586,11 @@ export namespace storagetransfer_v1 {
2593
3586
  resume(
2594
3587
  params: Params$Resource$Transferoperations$Resume,
2595
3588
  options: StreamMethodOptions
2596
- ): GaxiosPromise<Readable>;
3589
+ ): Promise<GaxiosResponseWithHTTP2<Readable>>;
2597
3590
  resume(
2598
3591
  params?: Params$Resource$Transferoperations$Resume,
2599
3592
  options?: MethodOptions
2600
- ): GaxiosPromise<Schema$Empty>;
3593
+ ): Promise<GaxiosResponseWithHTTP2<Schema$Empty>>;
2601
3594
  resume(
2602
3595
  params: Params$Resource$Transferoperations$Resume,
2603
3596
  options: StreamMethodOptions | BodyResponseCallback<Readable>,
@@ -2626,7 +3619,10 @@ export namespace storagetransfer_v1 {
2626
3619
  callback?:
2627
3620
  | BodyResponseCallback<Schema$Empty>
2628
3621
  | BodyResponseCallback<Readable>
2629
- ): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
3622
+ ):
3623
+ | void
3624
+ | Promise<GaxiosResponseWithHTTP2<Schema$Empty>>
3625
+ | Promise<GaxiosResponseWithHTTP2<Readable>> {
2630
3626
  let params = (paramsOrCallback ||
2631
3627
  {}) as Params$Resource$Transferoperations$Resume;
2632
3628
  let options = (optionsOrCallback || {}) as MethodOptions;