@googleapis/storagetransfer 3.0.1 → 4.0.1

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
@@ -166,6 +166,31 @@ export namespace storagetransfer_v1 {
166
166
  */
167
167
  secretAccessKey?: string | null;
168
168
  }
169
+ /**
170
+ * An AwsS3CompatibleData resource.
171
+ */
172
+ export interface Schema$AwsS3CompatibleData {
173
+ /**
174
+ * Required. Specifies the name of the bucket.
175
+ */
176
+ bucketName?: string | null;
177
+ /**
178
+ * Required. Specifies the endpoint of the storage service.
179
+ */
180
+ endpoint?: string | null;
181
+ /**
182
+ * Specifies the 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 '/'.
183
+ */
184
+ path?: string | null;
185
+ /**
186
+ * Specifies the region to sign requests with. This can be left blank if requests should be signed with an empty region.
187
+ */
188
+ region?: string | null;
189
+ /**
190
+ * A S3 compatible metadata.
191
+ */
192
+ s3Metadata?: Schema$S3CompatibleMetadata;
193
+ }
169
194
  /**
170
195
  * An AwsS3Data resource can be a data source, but not a data sink. In an AwsS3Data resource, an object's name is the S3 object's key name.
171
196
  */
@@ -178,6 +203,10 @@ export namespace storagetransfer_v1 {
178
203
  * Required. S3 Bucket name (see [Creating a bucket](https://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)).
179
204
  */
180
205
  bucketName?: string | null;
206
+ /**
207
+ * 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. This feature is in [preview](https://cloud.google.com/terms/service-terms#1). Format: `projects/{project_number\}/secrets/{secret_name\}`
208
+ */
209
+ credentialsSecret?: string | null;
181
210
  /**
182
211
  * 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 '/'.
183
212
  */
@@ -199,6 +228,10 @@ export namespace storagetransfer_v1 {
199
228
  * Required. The container to transfer from the Azure Storage account.
200
229
  */
201
230
  container?: string | null;
231
+ /**
232
+ * 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. This feature is in [preview](https://cloud.google.com/terms/service-terms#1). Format: `projects/{project_number\}/secrets/{secret_name\}`
233
+ */
234
+ credentialsSecret?: string | null;
202
235
  /**
203
236
  * 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 '/'.
204
237
  */
@@ -281,6 +314,23 @@ export namespace storagetransfer_v1 {
281
314
  */
282
315
  errorLogEntries?: Schema$ErrorLogEntry[];
283
316
  }
317
+ /**
318
+ * Specifies the Event-driven transfer options. Event-driven transfers listen to an event stream to transfer updated files.
319
+ */
320
+ export interface Schema$EventStream {
321
+ /**
322
+ * Specifies the data and time at which Storage Transfer Service stops listening for events from this stream. After this time, any transfers in progress will complete, but no new transfers are initiated.
323
+ */
324
+ eventStreamExpirationTime?: string | null;
325
+ /**
326
+ * Specifies the date and time that Storage Transfer Service starts listening for events from this stream. If no start time is specified or start time is in the past, Storage Transfer Service starts listening immediately.
327
+ */
328
+ eventStreamStartTime?: string | null;
329
+ /**
330
+ * Required. Specifies a unique name of the resource such as AWS SQS ARN in the form 'arn:aws:sqs:region:account_id:queue_name', or Pub/Sub subscription resource name in the form 'projects/{project\}/subscriptions/{sub\}'.
331
+ */
332
+ name?: string | null;
333
+ }
284
334
  /**
285
335
  * 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.
286
336
  */
@@ -480,7 +530,7 @@ export namespace storagetransfer_v1 {
480
530
  */
481
531
  name?: string | null;
482
532
  /**
483
- * The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
533
+ * The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
484
534
  */
485
535
  response?: {[key: string]: any} | null;
486
536
  }
@@ -510,6 +560,27 @@ export namespace storagetransfer_v1 {
510
560
  */
511
561
  projectId?: string | null;
512
562
  }
563
+ /**
564
+ * S3CompatibleMetadata contains the metadata fields that apply to the basic types of S3-compatible data providers.
565
+ */
566
+ export interface Schema$S3CompatibleMetadata {
567
+ /**
568
+ * Specifies the authentication and authorization method used by the storage service. When not specified, Transfer Service will attempt to determine right auth method to use.
569
+ */
570
+ authMethod?: string | null;
571
+ /**
572
+ * The Listing API to use for discovering objects. When not specified, Transfer Service will attempt to determine the right API to use.
573
+ */
574
+ listApi?: string | null;
575
+ /**
576
+ * Specifies the network protocol of the agent. When not specified, the default value of NetworkProtocol NETWORK_PROTOCOL_HTTPS is used.
577
+ */
578
+ protocol?: string | null;
579
+ /**
580
+ * Specifies the API request model used to call the storage service. When not specified, the default value of RequestModel REQUEST_MODEL_VIRTUAL_HOSTED_STYLE is used.
581
+ */
582
+ requestModel?: string | null;
583
+ }
513
584
  /**
514
585
  * Transfers can be scheduled to recur or to run just once.
515
586
  */
@@ -678,6 +749,10 @@ export namespace storagetransfer_v1 {
678
749
  * A description provided by the user for the job. Its max length is 1024 bytes when Unicode-encoded.
679
750
  */
680
751
  description?: string | null;
752
+ /**
753
+ * Specifies the event stream for the transfer job for event-driven transfers. When EventStream is specified, the Schedule fields are ignored.
754
+ */
755
+ eventStream?: Schema$EventStream;
681
756
  /**
682
757
  * Output only. The time that the transfer job was last modified.
683
758
  */
@@ -740,6 +815,10 @@ export namespace storagetransfer_v1 {
740
815
  * Summarizes errors encountered with sample error log entries.
741
816
  */
742
817
  errorBreakdowns?: Schema$ErrorSummary[];
818
+ /**
819
+ * Cloud Logging configuration.
820
+ */
821
+ loggingConfig?: Schema$LoggingConfig;
743
822
  /**
744
823
  * A globally unique ID assigned by the system.
745
824
  */
@@ -782,7 +861,7 @@ export namespace storagetransfer_v1 {
782
861
  */
783
862
  deleteObjectsUniqueInSink?: boolean | null;
784
863
  /**
785
- * Represents the selected metadata options for a transfer job. This feature is in Preview.
864
+ * Represents the selected metadata options for a transfer job.
786
865
  */
787
866
  metadataOptions?: Schema$MetadataOptions;
788
867
  /**
@@ -798,6 +877,10 @@ export namespace storagetransfer_v1 {
798
877
  * Configuration for running a transfer.
799
878
  */
800
879
  export interface Schema$TransferSpec {
880
+ /**
881
+ * An AWS S3 compatible data source.
882
+ */
883
+ awsS3CompatibleDataSource?: Schema$AwsS3CompatibleData;
801
884
  /**
802
885
  * An AWS S3 data source.
803
886
  */
@@ -815,7 +898,7 @@ export namespace storagetransfer_v1 {
815
898
  */
816
899
  gcsDataSource?: Schema$GcsData;
817
900
  /**
818
- * Cloud Storage intermediate data location.
901
+ * For transfers between file systems, specifies a Cloud Storage bucket to be used as an intermediate location through which to transfer data. See [Transfer data between file systems](https://cloud.google.com/storage-transfer/docs/file-to-file) for more information.
819
902
  */
820
903
  gcsIntermediateDataLocation?: Schema$GcsData;
821
904
  /**
@@ -860,7 +943,7 @@ export namespace storagetransfer_v1 {
860
943
  */
861
944
  projectId?: string | null;
862
945
  /**
863
- * Required. The job to update. `transferJob` is expected to specify one or more of five fields: description, transfer_spec, notification_config, logging_config, and status. An `UpdateTransferJobRequest` that specifies other fields are rejected with the error INVALID_ARGUMENT. Updating a job status to DELETED requires `storagetransfer.jobs.delete` permissions.
946
+ * Required. The job to update. `transferJob` is expected to specify one or more of five fields: description, transfer_spec, notification_config, logging_config, and status. An `UpdateTransferJobRequest` that specifies other fields are rejected with the error INVALID_ARGUMENT. Updating a job status to DELETED requires `storagetransfer.jobs.delete` permission.
864
947
  */
865
948
  transferJob?: Schema$TransferJob;
866
949
  /**
@@ -877,49 +960,6 @@ export namespace storagetransfer_v1 {
877
960
 
878
961
  /**
879
962
  * 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.
880
- * @example
881
- * ```js
882
- * // Before running the sample:
883
- * // - Enable the API at:
884
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
885
- * // - Login into gcloud by running:
886
- * // `$ gcloud auth application-default login`
887
- * // - Install the npm module by running:
888
- * // `$ npm install googleapis`
889
- *
890
- * const {google} = require('googleapis');
891
- * const storagetransfer = google.storagetransfer('v1');
892
- *
893
- * async function main() {
894
- * const auth = new google.auth.GoogleAuth({
895
- * // Scopes can be specified either as an array or as a single, space-delimited string.
896
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
897
- * });
898
- *
899
- * // Acquire an auth client, and bind it to all future calls
900
- * const authClient = await auth.getClient();
901
- * google.options({auth: authClient});
902
- *
903
- * // Do the magic
904
- * const res = await storagetransfer.googleServiceAccounts.get({
905
- * // Required. The ID of the Google Cloud project that the Google service account is associated with.
906
- * projectId: 'placeholder-value',
907
- * });
908
- * console.log(res.data);
909
- *
910
- * // Example response
911
- * // {
912
- * // "accountEmail": "my_accountEmail",
913
- * // "subjectId": "my_subjectId"
914
- * // }
915
- * }
916
- *
917
- * main().catch(e => {
918
- * console.error(e);
919
- * throw e;
920
- * });
921
- *
922
- * ```
923
963
  *
924
964
  * @param params - Parameters for request
925
965
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1037,64 +1077,6 @@ export namespace storagetransfer_v1 {
1037
1077
 
1038
1078
  /**
1039
1079
  * Creates an agent pool resource.
1040
- * @example
1041
- * ```js
1042
- * // Before running the sample:
1043
- * // - Enable the API at:
1044
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
1045
- * // - Login into gcloud by running:
1046
- * // `$ gcloud auth application-default login`
1047
- * // - Install the npm module by running:
1048
- * // `$ npm install googleapis`
1049
- *
1050
- * const {google} = require('googleapis');
1051
- * const storagetransfer = google.storagetransfer('v1');
1052
- *
1053
- * async function main() {
1054
- * const auth = new google.auth.GoogleAuth({
1055
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1056
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1057
- * });
1058
- *
1059
- * // Acquire an auth client, and bind it to all future calls
1060
- * const authClient = await auth.getClient();
1061
- * google.options({auth: authClient});
1062
- *
1063
- * // Do the magic
1064
- * const res = await storagetransfer.projects.agentPools.create({
1065
- * // 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])?$`.
1066
- * agentPoolId: 'placeholder-value',
1067
- * // Required. The ID of the Google Cloud project that owns the agent pool.
1068
- * projectId: '[^/]+',
1069
- *
1070
- * // Request body metadata
1071
- * requestBody: {
1072
- * // request body parameters
1073
- * // {
1074
- * // "bandwidthLimit": {},
1075
- * // "displayName": "my_displayName",
1076
- * // "name": "my_name",
1077
- * // "state": "my_state"
1078
- * // }
1079
- * },
1080
- * });
1081
- * console.log(res.data);
1082
- *
1083
- * // Example response
1084
- * // {
1085
- * // "bandwidthLimit": {},
1086
- * // "displayName": "my_displayName",
1087
- * // "name": "my_name",
1088
- * // "state": "my_state"
1089
- * // }
1090
- * }
1091
- *
1092
- * main().catch(e => {
1093
- * console.error(e);
1094
- * throw e;
1095
- * });
1096
- *
1097
- * ```
1098
1080
  *
1099
1081
  * @param params - Parameters for request
1100
1082
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1183,46 +1165,6 @@ export namespace storagetransfer_v1 {
1183
1165
 
1184
1166
  /**
1185
1167
  * Deletes an agent pool.
1186
- * @example
1187
- * ```js
1188
- * // Before running the sample:
1189
- * // - Enable the API at:
1190
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
1191
- * // - Login into gcloud by running:
1192
- * // `$ gcloud auth application-default login`
1193
- * // - Install the npm module by running:
1194
- * // `$ npm install googleapis`
1195
- *
1196
- * const {google} = require('googleapis');
1197
- * const storagetransfer = google.storagetransfer('v1');
1198
- *
1199
- * async function main() {
1200
- * const auth = new google.auth.GoogleAuth({
1201
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1202
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1203
- * });
1204
- *
1205
- * // Acquire an auth client, and bind it to all future calls
1206
- * const authClient = await auth.getClient();
1207
- * google.options({auth: authClient});
1208
- *
1209
- * // Do the magic
1210
- * const res = await storagetransfer.projects.agentPools.delete({
1211
- * // Required. The name of the agent pool to delete.
1212
- * name: 'projects/my-project/agentPools/my-agentPool',
1213
- * });
1214
- * console.log(res.data);
1215
- *
1216
- * // Example response
1217
- * // {}
1218
- * }
1219
- *
1220
- * main().catch(e => {
1221
- * console.error(e);
1222
- * throw e;
1223
- * });
1224
- *
1225
- * ```
1226
1168
  *
1227
1169
  * @param params - Parameters for request
1228
1170
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1308,51 +1250,6 @@ export namespace storagetransfer_v1 {
1308
1250
 
1309
1251
  /**
1310
1252
  * Gets an agent pool.
1311
- * @example
1312
- * ```js
1313
- * // Before running the sample:
1314
- * // - Enable the API at:
1315
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
1316
- * // - Login into gcloud by running:
1317
- * // `$ gcloud auth application-default login`
1318
- * // - Install the npm module by running:
1319
- * // `$ npm install googleapis`
1320
- *
1321
- * const {google} = require('googleapis');
1322
- * const storagetransfer = google.storagetransfer('v1');
1323
- *
1324
- * async function main() {
1325
- * const auth = new google.auth.GoogleAuth({
1326
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1327
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1328
- * });
1329
- *
1330
- * // Acquire an auth client, and bind it to all future calls
1331
- * const authClient = await auth.getClient();
1332
- * google.options({auth: authClient});
1333
- *
1334
- * // Do the magic
1335
- * const res = await storagetransfer.projects.agentPools.get({
1336
- * // Required. The name of the agent pool to get.
1337
- * name: 'projects/my-project/agentPools/my-agentPool',
1338
- * });
1339
- * console.log(res.data);
1340
- *
1341
- * // Example response
1342
- * // {
1343
- * // "bandwidthLimit": {},
1344
- * // "displayName": "my_displayName",
1345
- * // "name": "my_name",
1346
- * // "state": "my_state"
1347
- * // }
1348
- * }
1349
- *
1350
- * main().catch(e => {
1351
- * console.error(e);
1352
- * throw e;
1353
- * });
1354
- *
1355
- * ```
1356
1253
  *
1357
1254
  * @param params - Parameters for request
1358
1255
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1438,55 +1335,6 @@ export namespace storagetransfer_v1 {
1438
1335
 
1439
1336
  /**
1440
1337
  * Lists agent pools.
1441
- * @example
1442
- * ```js
1443
- * // Before running the sample:
1444
- * // - Enable the API at:
1445
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
1446
- * // - Login into gcloud by running:
1447
- * // `$ gcloud auth application-default login`
1448
- * // - Install the npm module by running:
1449
- * // `$ npm install googleapis`
1450
- *
1451
- * const {google} = require('googleapis');
1452
- * const storagetransfer = google.storagetransfer('v1');
1453
- *
1454
- * async function main() {
1455
- * const auth = new google.auth.GoogleAuth({
1456
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1457
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1458
- * });
1459
- *
1460
- * // Acquire an auth client, and bind it to all future calls
1461
- * const authClient = await auth.getClient();
1462
- * google.options({auth: authClient});
1463
- *
1464
- * // Do the magic
1465
- * const res = await storagetransfer.projects.agentPools.list({
1466
- * // 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.
1467
- * filter: 'placeholder-value',
1468
- * // The list page size. The max allowed value is `256`.
1469
- * pageSize: 'placeholder-value',
1470
- * // The list page token.
1471
- * pageToken: 'placeholder-value',
1472
- * // Required. The ID of the Google Cloud project that owns the job.
1473
- * projectId: '[^/]+',
1474
- * });
1475
- * console.log(res.data);
1476
- *
1477
- * // Example response
1478
- * // {
1479
- * // "agentPools": [],
1480
- * // "nextPageToken": "my_nextPageToken"
1481
- * // }
1482
- * }
1483
- *
1484
- * main().catch(e => {
1485
- * console.error(e);
1486
- * throw e;
1487
- * });
1488
- *
1489
- * ```
1490
1338
  *
1491
1339
  * @param params - Parameters for request
1492
1340
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1580,64 +1428,6 @@ export namespace storagetransfer_v1 {
1580
1428
 
1581
1429
  /**
1582
1430
  * Updates an existing agent pool resource.
1583
- * @example
1584
- * ```js
1585
- * // Before running the sample:
1586
- * // - Enable the API at:
1587
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
1588
- * // - Login into gcloud by running:
1589
- * // `$ gcloud auth application-default login`
1590
- * // - Install the npm module by running:
1591
- * // `$ npm install googleapis`
1592
- *
1593
- * const {google} = require('googleapis');
1594
- * const storagetransfer = google.storagetransfer('v1');
1595
- *
1596
- * async function main() {
1597
- * const auth = new google.auth.GoogleAuth({
1598
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1599
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1600
- * });
1601
- *
1602
- * // Acquire an auth client, and bind it to all future calls
1603
- * const authClient = await auth.getClient();
1604
- * google.options({auth: authClient});
1605
- *
1606
- * // Do the magic
1607
- * const res = await storagetransfer.projects.agentPools.patch({
1608
- * // Required. Specifies a unique string that identifies the agent pool. Format: `projects/{project_id\}/agentPools/{agent_pool_id\}`
1609
- * name: 'projects/my-project/agentPools/my-agentPool',
1610
- * // 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
1611
- * updateMask: 'placeholder-value',
1612
- *
1613
- * // Request body metadata
1614
- * requestBody: {
1615
- * // request body parameters
1616
- * // {
1617
- * // "bandwidthLimit": {},
1618
- * // "displayName": "my_displayName",
1619
- * // "name": "my_name",
1620
- * // "state": "my_state"
1621
- * // }
1622
- * },
1623
- * });
1624
- * console.log(res.data);
1625
- *
1626
- * // Example response
1627
- * // {
1628
- * // "bandwidthLimit": {},
1629
- * // "displayName": "my_displayName",
1630
- * // "name": "my_name",
1631
- * // "state": "my_state"
1632
- * // }
1633
- * }
1634
- *
1635
- * main().catch(e => {
1636
- * console.error(e);
1637
- * throw e;
1638
- * });
1639
- *
1640
- * ```
1641
1431
  *
1642
1432
  * @param params - Parameters for request
1643
1433
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1796,75 +1586,6 @@ export namespace storagetransfer_v1 {
1796
1586
 
1797
1587
  /**
1798
1588
  * Creates a transfer job that runs periodically.
1799
- * @example
1800
- * ```js
1801
- * // Before running the sample:
1802
- * // - Enable the API at:
1803
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
1804
- * // - Login into gcloud by running:
1805
- * // `$ gcloud auth application-default login`
1806
- * // - Install the npm module by running:
1807
- * // `$ npm install googleapis`
1808
- *
1809
- * const {google} = require('googleapis');
1810
- * const storagetransfer = google.storagetransfer('v1');
1811
- *
1812
- * async function main() {
1813
- * const auth = new google.auth.GoogleAuth({
1814
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1815
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1816
- * });
1817
- *
1818
- * // Acquire an auth client, and bind it to all future calls
1819
- * const authClient = await auth.getClient();
1820
- * google.options({auth: authClient});
1821
- *
1822
- * // Do the magic
1823
- * const res = await storagetransfer.transferJobs.create({
1824
- * // Request body metadata
1825
- * requestBody: {
1826
- * // request body parameters
1827
- * // {
1828
- * // "creationTime": "my_creationTime",
1829
- * // "deletionTime": "my_deletionTime",
1830
- * // "description": "my_description",
1831
- * // "lastModificationTime": "my_lastModificationTime",
1832
- * // "latestOperationName": "my_latestOperationName",
1833
- * // "loggingConfig": {},
1834
- * // "name": "my_name",
1835
- * // "notificationConfig": {},
1836
- * // "projectId": "my_projectId",
1837
- * // "schedule": {},
1838
- * // "status": "my_status",
1839
- * // "transferSpec": {}
1840
- * // }
1841
- * },
1842
- * });
1843
- * console.log(res.data);
1844
- *
1845
- * // Example response
1846
- * // {
1847
- * // "creationTime": "my_creationTime",
1848
- * // "deletionTime": "my_deletionTime",
1849
- * // "description": "my_description",
1850
- * // "lastModificationTime": "my_lastModificationTime",
1851
- * // "latestOperationName": "my_latestOperationName",
1852
- * // "loggingConfig": {},
1853
- * // "name": "my_name",
1854
- * // "notificationConfig": {},
1855
- * // "projectId": "my_projectId",
1856
- * // "schedule": {},
1857
- * // "status": "my_status",
1858
- * // "transferSpec": {}
1859
- * // }
1860
- * }
1861
- *
1862
- * main().catch(e => {
1863
- * console.error(e);
1864
- * throw e;
1865
- * });
1866
- *
1867
- * ```
1868
1589
  *
1869
1590
  * @param params - Parameters for request
1870
1591
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -1949,62 +1670,92 @@ export namespace storagetransfer_v1 {
1949
1670
  }
1950
1671
 
1951
1672
  /**
1952
- * Gets a transfer job.
1953
- * @example
1954
- * ```js
1955
- * // Before running the sample:
1956
- * // - Enable the API at:
1957
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
1958
- * // - Login into gcloud by running:
1959
- * // `$ gcloud auth application-default login`
1960
- * // - Install the npm module by running:
1961
- * // `$ npm install googleapis`
1962
- *
1963
- * const {google} = require('googleapis');
1964
- * const storagetransfer = google.storagetransfer('v1');
1965
- *
1966
- * async function main() {
1967
- * const auth = new google.auth.GoogleAuth({
1968
- * // Scopes can be specified either as an array or as a single, space-delimited string.
1969
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
1970
- * });
1971
- *
1972
- * // Acquire an auth client, and bind it to all future calls
1973
- * const authClient = await auth.getClient();
1974
- * google.options({auth: authClient});
1975
- *
1976
- * // Do the magic
1977
- * const res = await storagetransfer.transferJobs.get({
1978
- * // Required. The job to get.
1979
- * jobName: 'transferJobs/.*',
1980
- * // Required. The ID of the Google Cloud project that owns the job.
1981
- * projectId: 'placeholder-value',
1982
- * });
1983
- * console.log(res.data);
1673
+ * Deletes a transfer job. Deleting a transfer job sets its status to DELETED.
1984
1674
  *
1985
- * // Example response
1986
- * // {
1987
- * // "creationTime": "my_creationTime",
1988
- * // "deletionTime": "my_deletionTime",
1989
- * // "description": "my_description",
1990
- * // "lastModificationTime": "my_lastModificationTime",
1991
- * // "latestOperationName": "my_latestOperationName",
1992
- * // "loggingConfig": {},
1993
- * // "name": "my_name",
1994
- * // "notificationConfig": {},
1995
- * // "projectId": "my_projectId",
1996
- * // "schedule": {},
1997
- * // "status": "my_status",
1998
- * // "transferSpec": {}
1999
- * // }
2000
- * }
2001
- *
2002
- * main().catch(e => {
2003
- * console.error(e);
2004
- * throw e;
2005
- * });
2006
- *
2007
- * ```
1675
+ * @param params - Parameters for request
1676
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1677
+ * @param callback - Optional callback that handles the response.
1678
+ * @returns A promise if used with async/await, or void if used with a callback.
1679
+ */
1680
+ delete(
1681
+ params: Params$Resource$Transferjobs$Delete,
1682
+ options: StreamMethodOptions
1683
+ ): GaxiosPromise<Readable>;
1684
+ delete(
1685
+ params?: Params$Resource$Transferjobs$Delete,
1686
+ options?: MethodOptions
1687
+ ): GaxiosPromise<Schema$Empty>;
1688
+ delete(
1689
+ params: Params$Resource$Transferjobs$Delete,
1690
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1691
+ callback: BodyResponseCallback<Readable>
1692
+ ): void;
1693
+ delete(
1694
+ params: Params$Resource$Transferjobs$Delete,
1695
+ options: MethodOptions | BodyResponseCallback<Schema$Empty>,
1696
+ callback: BodyResponseCallback<Schema$Empty>
1697
+ ): void;
1698
+ delete(
1699
+ params: Params$Resource$Transferjobs$Delete,
1700
+ callback: BodyResponseCallback<Schema$Empty>
1701
+ ): void;
1702
+ delete(callback: BodyResponseCallback<Schema$Empty>): void;
1703
+ delete(
1704
+ paramsOrCallback?:
1705
+ | Params$Resource$Transferjobs$Delete
1706
+ | BodyResponseCallback<Schema$Empty>
1707
+ | BodyResponseCallback<Readable>,
1708
+ optionsOrCallback?:
1709
+ | MethodOptions
1710
+ | StreamMethodOptions
1711
+ | BodyResponseCallback<Schema$Empty>
1712
+ | BodyResponseCallback<Readable>,
1713
+ callback?:
1714
+ | BodyResponseCallback<Schema$Empty>
1715
+ | BodyResponseCallback<Readable>
1716
+ ): void | GaxiosPromise<Schema$Empty> | GaxiosPromise<Readable> {
1717
+ let params = (paramsOrCallback ||
1718
+ {}) as Params$Resource$Transferjobs$Delete;
1719
+ let options = (optionsOrCallback || {}) as MethodOptions;
1720
+
1721
+ if (typeof paramsOrCallback === 'function') {
1722
+ callback = paramsOrCallback;
1723
+ params = {} as Params$Resource$Transferjobs$Delete;
1724
+ options = {};
1725
+ }
1726
+
1727
+ if (typeof optionsOrCallback === 'function') {
1728
+ callback = optionsOrCallback;
1729
+ options = {};
1730
+ }
1731
+
1732
+ const rootUrl =
1733
+ options.rootUrl || 'https://storagetransfer.googleapis.com/';
1734
+ const parameters = {
1735
+ options: Object.assign(
1736
+ {
1737
+ url: (rootUrl + '/v1/{+jobName}').replace(/([^:]\/)\/+/g, '$1'),
1738
+ method: 'DELETE',
1739
+ },
1740
+ options
1741
+ ),
1742
+ params,
1743
+ requiredParams: ['jobName', 'projectId'],
1744
+ pathParams: ['jobName'],
1745
+ context: this.context,
1746
+ };
1747
+ if (callback) {
1748
+ createAPIRequest<Schema$Empty>(
1749
+ parameters,
1750
+ callback as BodyResponseCallback<unknown>
1751
+ );
1752
+ } else {
1753
+ return createAPIRequest<Schema$Empty>(parameters);
1754
+ }
1755
+ }
1756
+
1757
+ /**
1758
+ * Gets a transfer job.
2008
1759
  *
2009
1760
  * @param params - Parameters for request
2010
1761
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2089,53 +1840,6 @@ export namespace storagetransfer_v1 {
2089
1840
 
2090
1841
  /**
2091
1842
  * Lists transfer jobs.
2092
- * @example
2093
- * ```js
2094
- * // Before running the sample:
2095
- * // - Enable the API at:
2096
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
2097
- * // - Login into gcloud by running:
2098
- * // `$ gcloud auth application-default login`
2099
- * // - Install the npm module by running:
2100
- * // `$ npm install googleapis`
2101
- *
2102
- * const {google} = require('googleapis');
2103
- * const storagetransfer = google.storagetransfer('v1');
2104
- *
2105
- * async function main() {
2106
- * const auth = new google.auth.GoogleAuth({
2107
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2108
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2109
- * });
2110
- *
2111
- * // Acquire an auth client, and bind it to all future calls
2112
- * const authClient = await auth.getClient();
2113
- * google.options({auth: authClient});
2114
- *
2115
- * // Do the magic
2116
- * const res = await storagetransfer.transferJobs.list({
2117
- * // Required. A list of query parameters specified as JSON text in the form of: `{"projectId":"my_project_id", "jobNames":["jobid1","jobid2",...], "jobStatuses":["status1","status2",...]\}` Since `jobNames` and `jobStatuses` support multiple values, their values must be specified with array notation. `projectId` is required. `jobNames` and `jobStatuses` are optional. The valid values for `jobStatuses` are case-insensitive: ENABLED, DISABLED, and DELETED.
2118
- * filter: 'placeholder-value',
2119
- * // The list page size. The max allowed value is 256.
2120
- * pageSize: 'placeholder-value',
2121
- * // The list page token.
2122
- * pageToken: 'placeholder-value',
2123
- * });
2124
- * console.log(res.data);
2125
- *
2126
- * // Example response
2127
- * // {
2128
- * // "nextPageToken": "my_nextPageToken",
2129
- * // "transferJobs": []
2130
- * // }
2131
- * }
2132
- *
2133
- * main().catch(e => {
2134
- * console.error(e);
2135
- * throw e;
2136
- * });
2137
- *
2138
- * ```
2139
1843
  *
2140
1844
  * @param params - Parameters for request
2141
1845
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2226,69 +1930,6 @@ export namespace storagetransfer_v1 {
2226
1930
 
2227
1931
  /**
2228
1932
  * 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).
2229
- * @example
2230
- * ```js
2231
- * // Before running the sample:
2232
- * // - Enable the API at:
2233
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
2234
- * // - Login into gcloud by running:
2235
- * // `$ gcloud auth application-default login`
2236
- * // - Install the npm module by running:
2237
- * // `$ npm install googleapis`
2238
- *
2239
- * const {google} = require('googleapis');
2240
- * const storagetransfer = google.storagetransfer('v1');
2241
- *
2242
- * async function main() {
2243
- * const auth = new google.auth.GoogleAuth({
2244
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2245
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2246
- * });
2247
- *
2248
- * // Acquire an auth client, and bind it to all future calls
2249
- * const authClient = await auth.getClient();
2250
- * google.options({auth: authClient});
2251
- *
2252
- * // Do the magic
2253
- * const res = await storagetransfer.transferJobs.patch({
2254
- * // Required. The name of job to update.
2255
- * jobName: 'transferJobs/.*',
2256
- *
2257
- * // Request body metadata
2258
- * requestBody: {
2259
- * // request body parameters
2260
- * // {
2261
- * // "projectId": "my_projectId",
2262
- * // "transferJob": {},
2263
- * // "updateTransferJobFieldMask": "my_updateTransferJobFieldMask"
2264
- * // }
2265
- * },
2266
- * });
2267
- * console.log(res.data);
2268
- *
2269
- * // Example response
2270
- * // {
2271
- * // "creationTime": "my_creationTime",
2272
- * // "deletionTime": "my_deletionTime",
2273
- * // "description": "my_description",
2274
- * // "lastModificationTime": "my_lastModificationTime",
2275
- * // "latestOperationName": "my_latestOperationName",
2276
- * // "loggingConfig": {},
2277
- * // "name": "my_name",
2278
- * // "notificationConfig": {},
2279
- * // "projectId": "my_projectId",
2280
- * // "schedule": {},
2281
- * // "status": "my_status",
2282
- * // "transferSpec": {}
2283
- * // }
2284
- * }
2285
- *
2286
- * main().catch(e => {
2287
- * console.error(e);
2288
- * throw e;
2289
- * });
2290
- *
2291
- * ```
2292
1933
  *
2293
1934
  * @param params - Parameters for request
2294
1935
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2373,61 +2014,7 @@ export namespace storagetransfer_v1 {
2373
2014
  }
2374
2015
 
2375
2016
  /**
2376
- * Attempts to start a new TransferOperation for the current TransferJob. A TransferJob has a maximum of one active TransferOperation. If this method is called while a TransferOperation is active, an error will be returned.
2377
- * @example
2378
- * ```js
2379
- * // Before running the sample:
2380
- * // - Enable the API at:
2381
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
2382
- * // - Login into gcloud by running:
2383
- * // `$ gcloud auth application-default login`
2384
- * // - Install the npm module by running:
2385
- * // `$ npm install googleapis`
2386
- *
2387
- * const {google} = require('googleapis');
2388
- * const storagetransfer = google.storagetransfer('v1');
2389
- *
2390
- * async function main() {
2391
- * const auth = new google.auth.GoogleAuth({
2392
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2393
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2394
- * });
2395
- *
2396
- * // Acquire an auth client, and bind it to all future calls
2397
- * const authClient = await auth.getClient();
2398
- * google.options({auth: authClient});
2399
- *
2400
- * // Do the magic
2401
- * const res = await storagetransfer.transferJobs.run({
2402
- * // Required. The name of the transfer job.
2403
- * jobName: 'transferJobs/.*',
2404
- *
2405
- * // Request body metadata
2406
- * requestBody: {
2407
- * // request body parameters
2408
- * // {
2409
- * // "projectId": "my_projectId"
2410
- * // }
2411
- * },
2412
- * });
2413
- * console.log(res.data);
2414
- *
2415
- * // Example response
2416
- * // {
2417
- * // "done": false,
2418
- * // "error": {},
2419
- * // "metadata": {},
2420
- * // "name": "my_name",
2421
- * // "response": {}
2422
- * // }
2423
- * }
2424
- *
2425
- * main().catch(e => {
2426
- * console.error(e);
2427
- * throw e;
2428
- * });
2429
- *
2430
- * ```
2017
+ * 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.
2431
2018
  *
2432
2019
  * @param params - Parameters for request
2433
2020
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2518,6 +2105,17 @@ export namespace storagetransfer_v1 {
2518
2105
  */
2519
2106
  requestBody?: Schema$TransferJob;
2520
2107
  }
2108
+ export interface Params$Resource$Transferjobs$Delete
2109
+ extends StandardParameters {
2110
+ /**
2111
+ * Required. The job to delete.
2112
+ */
2113
+ jobName?: string;
2114
+ /**
2115
+ * Required. The ID of the Google Cloud project that owns the job.
2116
+ */
2117
+ projectId?: string;
2118
+ }
2521
2119
  export interface Params$Resource$Transferjobs$Get extends StandardParameters {
2522
2120
  /**
2523
2121
  * Required. The job to get.
@@ -2575,52 +2173,6 @@ export namespace storagetransfer_v1 {
2575
2173
 
2576
2174
  /**
2577
2175
  * 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.
2578
- * @example
2579
- * ```js
2580
- * // Before running the sample:
2581
- * // - Enable the API at:
2582
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
2583
- * // - Login into gcloud by running:
2584
- * // `$ gcloud auth application-default login`
2585
- * // - Install the npm module by running:
2586
- * // `$ npm install googleapis`
2587
- *
2588
- * const {google} = require('googleapis');
2589
- * const storagetransfer = google.storagetransfer('v1');
2590
- *
2591
- * async function main() {
2592
- * const auth = new google.auth.GoogleAuth({
2593
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2594
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2595
- * });
2596
- *
2597
- * // Acquire an auth client, and bind it to all future calls
2598
- * const authClient = await auth.getClient();
2599
- * google.options({auth: authClient});
2600
- *
2601
- * // Do the magic
2602
- * const res = await storagetransfer.transferOperations.cancel({
2603
- * // The name of the operation resource to be cancelled.
2604
- * name: 'transferOperations/.*',
2605
- *
2606
- * // Request body metadata
2607
- * requestBody: {
2608
- * // request body parameters
2609
- * // {}
2610
- * },
2611
- * });
2612
- * console.log(res.data);
2613
- *
2614
- * // Example response
2615
- * // {}
2616
- * }
2617
- *
2618
- * main().catch(e => {
2619
- * console.error(e);
2620
- * throw e;
2621
- * });
2622
- *
2623
- * ```
2624
2176
  *
2625
2177
  * @param params - Parameters for request
2626
2178
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2706,52 +2258,6 @@ export namespace storagetransfer_v1 {
2706
2258
 
2707
2259
  /**
2708
2260
  * 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.
2709
- * @example
2710
- * ```js
2711
- * // Before running the sample:
2712
- * // - Enable the API at:
2713
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
2714
- * // - Login into gcloud by running:
2715
- * // `$ gcloud auth application-default login`
2716
- * // - Install the npm module by running:
2717
- * // `$ npm install googleapis`
2718
- *
2719
- * const {google} = require('googleapis');
2720
- * const storagetransfer = google.storagetransfer('v1');
2721
- *
2722
- * async function main() {
2723
- * const auth = new google.auth.GoogleAuth({
2724
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2725
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2726
- * });
2727
- *
2728
- * // Acquire an auth client, and bind it to all future calls
2729
- * const authClient = await auth.getClient();
2730
- * google.options({auth: authClient});
2731
- *
2732
- * // Do the magic
2733
- * const res = await storagetransfer.transferOperations.get({
2734
- * // The name of the operation resource.
2735
- * name: 'transferOperations/.*',
2736
- * });
2737
- * console.log(res.data);
2738
- *
2739
- * // Example response
2740
- * // {
2741
- * // "done": false,
2742
- * // "error": {},
2743
- * // "metadata": {},
2744
- * // "name": "my_name",
2745
- * // "response": {}
2746
- * // }
2747
- * }
2748
- *
2749
- * main().catch(e => {
2750
- * console.error(e);
2751
- * throw e;
2752
- * });
2753
- *
2754
- * ```
2755
2261
  *
2756
2262
  * @param params - Parameters for request
2757
2263
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2837,55 +2343,6 @@ export namespace storagetransfer_v1 {
2837
2343
 
2838
2344
  /**
2839
2345
  * Lists transfer operations. Operations are ordered by their creation time in reverse chronological order.
2840
- * @example
2841
- * ```js
2842
- * // Before running the sample:
2843
- * // - Enable the API at:
2844
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
2845
- * // - Login into gcloud by running:
2846
- * // `$ gcloud auth application-default login`
2847
- * // - Install the npm module by running:
2848
- * // `$ npm install googleapis`
2849
- *
2850
- * const {google} = require('googleapis');
2851
- * const storagetransfer = google.storagetransfer('v1');
2852
- *
2853
- * async function main() {
2854
- * const auth = new google.auth.GoogleAuth({
2855
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2856
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2857
- * });
2858
- *
2859
- * // Acquire an auth client, and bind it to all future calls
2860
- * const authClient = await auth.getClient();
2861
- * google.options({auth: authClient});
2862
- *
2863
- * // Do the magic
2864
- * const res = await storagetransfer.transferOperations.list({
2865
- * // Required. A list of query parameters specified as JSON text in the form of: `{"projectId":"my_project_id", "jobNames":["jobid1","jobid2",...], "operationNames":["opid1","opid2",...], "transferStatuses":["status1","status2",...]\}` Since `jobNames`, `operationNames`, and `transferStatuses` support multiple values, they must be specified with array notation. `projectId` is required. `jobNames`, `operationNames`, and `transferStatuses` are optional. The valid values for `transferStatuses` are case-insensitive: IN_PROGRESS, PAUSED, SUCCESS, FAILED, and ABORTED.
2866
- * filter: 'placeholder-value',
2867
- * // Required. The name of the type being listed; must be `transferOperations`.
2868
- * name: 'transferOperations',
2869
- * // The list page size. The max allowed value is 256.
2870
- * pageSize: 'placeholder-value',
2871
- * // The list page token.
2872
- * pageToken: 'placeholder-value',
2873
- * });
2874
- * console.log(res.data);
2875
- *
2876
- * // Example response
2877
- * // {
2878
- * // "nextPageToken": "my_nextPageToken",
2879
- * // "operations": []
2880
- * // }
2881
- * }
2882
- *
2883
- * main().catch(e => {
2884
- * console.error(e);
2885
- * throw e;
2886
- * });
2887
- *
2888
- * ```
2889
2346
  *
2890
2347
  * @param params - Parameters for request
2891
2348
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -2976,52 +2433,6 @@ export namespace storagetransfer_v1 {
2976
2433
 
2977
2434
  /**
2978
2435
  * Pauses a transfer operation.
2979
- * @example
2980
- * ```js
2981
- * // Before running the sample:
2982
- * // - Enable the API at:
2983
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
2984
- * // - Login into gcloud by running:
2985
- * // `$ gcloud auth application-default login`
2986
- * // - Install the npm module by running:
2987
- * // `$ npm install googleapis`
2988
- *
2989
- * const {google} = require('googleapis');
2990
- * const storagetransfer = google.storagetransfer('v1');
2991
- *
2992
- * async function main() {
2993
- * const auth = new google.auth.GoogleAuth({
2994
- * // Scopes can be specified either as an array or as a single, space-delimited string.
2995
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
2996
- * });
2997
- *
2998
- * // Acquire an auth client, and bind it to all future calls
2999
- * const authClient = await auth.getClient();
3000
- * google.options({auth: authClient});
3001
- *
3002
- * // Do the magic
3003
- * const res = await storagetransfer.transferOperations.pause({
3004
- * // Required. The name of the transfer operation.
3005
- * name: 'transferOperations/.*',
3006
- *
3007
- * // Request body metadata
3008
- * requestBody: {
3009
- * // request body parameters
3010
- * // {}
3011
- * },
3012
- * });
3013
- * console.log(res.data);
3014
- *
3015
- * // Example response
3016
- * // {}
3017
- * }
3018
- *
3019
- * main().catch(e => {
3020
- * console.error(e);
3021
- * throw e;
3022
- * });
3023
- *
3024
- * ```
3025
2436
  *
3026
2437
  * @param params - Parameters for request
3027
2438
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
@@ -3107,52 +2518,6 @@ export namespace storagetransfer_v1 {
3107
2518
 
3108
2519
  /**
3109
2520
  * Resumes a transfer operation that is paused.
3110
- * @example
3111
- * ```js
3112
- * // Before running the sample:
3113
- * // - Enable the API at:
3114
- * // https://console.developers.google.com/apis/api/storagetransfer.googleapis.com
3115
- * // - Login into gcloud by running:
3116
- * // `$ gcloud auth application-default login`
3117
- * // - Install the npm module by running:
3118
- * // `$ npm install googleapis`
3119
- *
3120
- * const {google} = require('googleapis');
3121
- * const storagetransfer = google.storagetransfer('v1');
3122
- *
3123
- * async function main() {
3124
- * const auth = new google.auth.GoogleAuth({
3125
- * // Scopes can be specified either as an array or as a single, space-delimited string.
3126
- * scopes: ['https://www.googleapis.com/auth/cloud-platform'],
3127
- * });
3128
- *
3129
- * // Acquire an auth client, and bind it to all future calls
3130
- * const authClient = await auth.getClient();
3131
- * google.options({auth: authClient});
3132
- *
3133
- * // Do the magic
3134
- * const res = await storagetransfer.transferOperations.resume({
3135
- * // Required. The name of the transfer operation.
3136
- * name: 'transferOperations/.*',
3137
- *
3138
- * // Request body metadata
3139
- * requestBody: {
3140
- * // request body parameters
3141
- * // {}
3142
- * },
3143
- * });
3144
- * console.log(res.data);
3145
- *
3146
- * // Example response
3147
- * // {}
3148
- * }
3149
- *
3150
- * main().catch(e => {
3151
- * console.error(e);
3152
- * throw e;
3153
- * });
3154
- *
3155
- * ```
3156
2521
  *
3157
2522
  * @param params - Parameters for request
3158
2523
  * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.