@google-cloud/dms 2.2.2 → 2.3.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.
@@ -115,6 +115,8 @@ class DataMigrationServiceClient {
115
115
  if (servicePath === staticMembers.servicePath) {
116
116
  this.auth.defaultScopes = staticMembers.scopes;
117
117
  }
118
+ this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts);
119
+ this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
118
120
  // Determine the client header string.
119
121
  const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
120
122
  if (typeof process !== 'undefined' && 'versions' in process) {
@@ -139,8 +141,10 @@ class DataMigrationServiceClient {
139
141
  // Create useful helper objects for these.
140
142
  this.pathTemplates = {
141
143
  connectionProfilePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/connectionProfiles/{connection_profile}'),
144
+ conversionWorkspacePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}'),
142
145
  locationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}'),
143
146
  migrationJobPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/migrationJobs/{migration_job}'),
147
+ privateConnectionPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/privateConnections/{private_connection}'),
144
148
  projectPathTemplate: new this._gaxModule.PathTemplate('projects/{project}'),
145
149
  };
146
150
  // Some of the methods on this service return "paged" results,
@@ -149,6 +153,10 @@ class DataMigrationServiceClient {
149
153
  this.descriptors.page = {
150
154
  listMigrationJobs: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'migrationJobs'),
151
155
  listConnectionProfiles: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'connectionProfiles'),
156
+ listPrivateConnections: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'privateConnections'),
157
+ listConversionWorkspaces: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'conversionWorkspaces'),
158
+ describeDatabaseEntities: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'databaseEntities'),
159
+ fetchStaticIps: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'staticIps'),
152
160
  };
153
161
  const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
154
162
  // This API contains "long-running operations", which return a
@@ -176,6 +184,12 @@ class DataMigrationServiceClient {
176
184
  {
177
185
  get: '/v1/{resource=projects/*/locations/*/migrationJobs/*}:getIamPolicy',
178
186
  },
187
+ {
188
+ get: '/v1/{resource=projects/*/locations/*/conversionWorkspaces/*}:getIamPolicy',
189
+ },
190
+ {
191
+ get: '/v1/{resource=projects/*/locations/*/privateConnections/*}:getIamPolicy',
192
+ },
179
193
  ],
180
194
  },
181
195
  {
@@ -187,6 +201,14 @@ class DataMigrationServiceClient {
187
201
  post: '/v1/{resource=projects/*/locations/*/migrationJobs/*}:setIamPolicy',
188
202
  body: '*',
189
203
  },
204
+ {
205
+ post: '/v1/{resource=projects/*/locations/*/conversionWorkspaces/*}:setIamPolicy',
206
+ body: '*',
207
+ },
208
+ {
209
+ post: '/v1/{resource=projects/*/locations/*/privateConnections/*}:setIamPolicy',
210
+ body: '*',
211
+ },
190
212
  ],
191
213
  },
192
214
  {
@@ -198,6 +220,14 @@ class DataMigrationServiceClient {
198
220
  post: '/v1/{resource=projects/*/locations/*/connectionProfiles/*}:testIamPermissions',
199
221
  body: '*',
200
222
  },
223
+ {
224
+ post: '/v1/{resource=projects/*/locations/*/conversionWorkspaces/*}:testIamPermissions',
225
+ body: '*',
226
+ },
227
+ {
228
+ post: '/v1/{resource=projects/*/locations/*/privateConnections/*}:testIamPermissions',
229
+ body: '*',
230
+ },
201
231
  ],
202
232
  },
203
233
  {
@@ -246,6 +276,28 @@ class DataMigrationServiceClient {
246
276
  const updateConnectionProfileMetadata = protoFilesRoot.lookup('.google.cloud.clouddms.v1.OperationMetadata');
247
277
  const deleteConnectionProfileResponse = protoFilesRoot.lookup('.google.protobuf.Empty');
248
278
  const deleteConnectionProfileMetadata = protoFilesRoot.lookup('.google.cloud.clouddms.v1.OperationMetadata');
279
+ const createPrivateConnectionResponse = protoFilesRoot.lookup('.google.cloud.clouddms.v1.PrivateConnection');
280
+ const createPrivateConnectionMetadata = protoFilesRoot.lookup('.google.cloud.clouddms.v1.OperationMetadata');
281
+ const deletePrivateConnectionResponse = protoFilesRoot.lookup('.google.protobuf.Empty');
282
+ const deletePrivateConnectionMetadata = protoFilesRoot.lookup('.google.cloud.clouddms.v1.OperationMetadata');
283
+ const createConversionWorkspaceResponse = protoFilesRoot.lookup('.google.cloud.clouddms.v1.ConversionWorkspace');
284
+ const createConversionWorkspaceMetadata = protoFilesRoot.lookup('.google.cloud.clouddms.v1.OperationMetadata');
285
+ const updateConversionWorkspaceResponse = protoFilesRoot.lookup('.google.cloud.clouddms.v1.ConversionWorkspace');
286
+ const updateConversionWorkspaceMetadata = protoFilesRoot.lookup('.google.cloud.clouddms.v1.OperationMetadata');
287
+ const deleteConversionWorkspaceResponse = protoFilesRoot.lookup('.google.protobuf.Empty');
288
+ const deleteConversionWorkspaceMetadata = protoFilesRoot.lookup('.google.cloud.clouddms.v1.OperationMetadata');
289
+ const seedConversionWorkspaceResponse = protoFilesRoot.lookup('.google.cloud.clouddms.v1.ConversionWorkspace');
290
+ const seedConversionWorkspaceMetadata = protoFilesRoot.lookup('.google.cloud.clouddms.v1.OperationMetadata');
291
+ const importMappingRulesResponse = protoFilesRoot.lookup('.google.cloud.clouddms.v1.ConversionWorkspace');
292
+ const importMappingRulesMetadata = protoFilesRoot.lookup('.google.cloud.clouddms.v1.OperationMetadata');
293
+ const convertConversionWorkspaceResponse = protoFilesRoot.lookup('.google.cloud.clouddms.v1.ConversionWorkspace');
294
+ const convertConversionWorkspaceMetadata = protoFilesRoot.lookup('.google.cloud.clouddms.v1.OperationMetadata');
295
+ const commitConversionWorkspaceResponse = protoFilesRoot.lookup('.google.cloud.clouddms.v1.ConversionWorkspace');
296
+ const commitConversionWorkspaceMetadata = protoFilesRoot.lookup('.google.cloud.clouddms.v1.OperationMetadata');
297
+ const rollbackConversionWorkspaceResponse = protoFilesRoot.lookup('.google.cloud.clouddms.v1.ConversionWorkspace');
298
+ const rollbackConversionWorkspaceMetadata = protoFilesRoot.lookup('.google.cloud.clouddms.v1.OperationMetadata');
299
+ const applyConversionWorkspaceResponse = protoFilesRoot.lookup('.google.cloud.clouddms.v1.ConversionWorkspace');
300
+ const applyConversionWorkspaceMetadata = protoFilesRoot.lookup('.google.cloud.clouddms.v1.OperationMetadata');
249
301
  this.descriptors.longrunning = {
250
302
  createMigrationJob: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createMigrationJobResponse.decode.bind(createMigrationJobResponse), createMigrationJobMetadata.decode.bind(createMigrationJobMetadata)),
251
303
  updateMigrationJob: new this._gaxModule.LongrunningDescriptor(this.operationsClient, updateMigrationJobResponse.decode.bind(updateMigrationJobResponse), updateMigrationJobMetadata.decode.bind(updateMigrationJobMetadata)),
@@ -259,6 +311,17 @@ class DataMigrationServiceClient {
259
311
  createConnectionProfile: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createConnectionProfileResponse.decode.bind(createConnectionProfileResponse), createConnectionProfileMetadata.decode.bind(createConnectionProfileMetadata)),
260
312
  updateConnectionProfile: new this._gaxModule.LongrunningDescriptor(this.operationsClient, updateConnectionProfileResponse.decode.bind(updateConnectionProfileResponse), updateConnectionProfileMetadata.decode.bind(updateConnectionProfileMetadata)),
261
313
  deleteConnectionProfile: new this._gaxModule.LongrunningDescriptor(this.operationsClient, deleteConnectionProfileResponse.decode.bind(deleteConnectionProfileResponse), deleteConnectionProfileMetadata.decode.bind(deleteConnectionProfileMetadata)),
314
+ createPrivateConnection: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createPrivateConnectionResponse.decode.bind(createPrivateConnectionResponse), createPrivateConnectionMetadata.decode.bind(createPrivateConnectionMetadata)),
315
+ deletePrivateConnection: new this._gaxModule.LongrunningDescriptor(this.operationsClient, deletePrivateConnectionResponse.decode.bind(deletePrivateConnectionResponse), deletePrivateConnectionMetadata.decode.bind(deletePrivateConnectionMetadata)),
316
+ createConversionWorkspace: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createConversionWorkspaceResponse.decode.bind(createConversionWorkspaceResponse), createConversionWorkspaceMetadata.decode.bind(createConversionWorkspaceMetadata)),
317
+ updateConversionWorkspace: new this._gaxModule.LongrunningDescriptor(this.operationsClient, updateConversionWorkspaceResponse.decode.bind(updateConversionWorkspaceResponse), updateConversionWorkspaceMetadata.decode.bind(updateConversionWorkspaceMetadata)),
318
+ deleteConversionWorkspace: new this._gaxModule.LongrunningDescriptor(this.operationsClient, deleteConversionWorkspaceResponse.decode.bind(deleteConversionWorkspaceResponse), deleteConversionWorkspaceMetadata.decode.bind(deleteConversionWorkspaceMetadata)),
319
+ seedConversionWorkspace: new this._gaxModule.LongrunningDescriptor(this.operationsClient, seedConversionWorkspaceResponse.decode.bind(seedConversionWorkspaceResponse), seedConversionWorkspaceMetadata.decode.bind(seedConversionWorkspaceMetadata)),
320
+ importMappingRules: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importMappingRulesResponse.decode.bind(importMappingRulesResponse), importMappingRulesMetadata.decode.bind(importMappingRulesMetadata)),
321
+ convertConversionWorkspace: new this._gaxModule.LongrunningDescriptor(this.operationsClient, convertConversionWorkspaceResponse.decode.bind(convertConversionWorkspaceResponse), convertConversionWorkspaceMetadata.decode.bind(convertConversionWorkspaceMetadata)),
322
+ commitConversionWorkspace: new this._gaxModule.LongrunningDescriptor(this.operationsClient, commitConversionWorkspaceResponse.decode.bind(commitConversionWorkspaceResponse), commitConversionWorkspaceMetadata.decode.bind(commitConversionWorkspaceMetadata)),
323
+ rollbackConversionWorkspace: new this._gaxModule.LongrunningDescriptor(this.operationsClient, rollbackConversionWorkspaceResponse.decode.bind(rollbackConversionWorkspaceResponse), rollbackConversionWorkspaceMetadata.decode.bind(rollbackConversionWorkspaceMetadata)),
324
+ applyConversionWorkspace: new this._gaxModule.LongrunningDescriptor(this.operationsClient, applyConversionWorkspaceResponse.decode.bind(applyConversionWorkspaceResponse), applyConversionWorkspaceMetadata.decode.bind(applyConversionWorkspaceMetadata)),
262
325
  };
263
326
  // Put together the default options sent with requests.
264
327
  this._defaults = this._gaxGrpc.constructSettings('google.cloud.clouddms.v1.DataMigrationService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
@@ -311,6 +374,25 @@ class DataMigrationServiceClient {
311
374
  'createConnectionProfile',
312
375
  'updateConnectionProfile',
313
376
  'deleteConnectionProfile',
377
+ 'createPrivateConnection',
378
+ 'getPrivateConnection',
379
+ 'listPrivateConnections',
380
+ 'deletePrivateConnection',
381
+ 'getConversionWorkspace',
382
+ 'listConversionWorkspaces',
383
+ 'createConversionWorkspace',
384
+ 'updateConversionWorkspace',
385
+ 'deleteConversionWorkspace',
386
+ 'seedConversionWorkspace',
387
+ 'importMappingRules',
388
+ 'convertConversionWorkspace',
389
+ 'commitConversionWorkspace',
390
+ 'rollbackConversionWorkspace',
391
+ 'applyConversionWorkspace',
392
+ 'describeDatabaseEntities',
393
+ 'searchBackgroundJobs',
394
+ 'describeConversionWorkspaceRevisions',
395
+ 'fetchStaticIps',
314
396
  ];
315
397
  for (const methodName of dataMigrationServiceStubMethods) {
316
398
  const callPromise = this.dataMigrationServiceStub.then(stub => (...args) => {
@@ -434,6 +516,90 @@ class DataMigrationServiceClient {
434
516
  this.initialize();
435
517
  return this.innerApiCalls.getConnectionProfile(request, options, callback);
436
518
  }
519
+ getPrivateConnection(request, optionsOrCallback, callback) {
520
+ var _a;
521
+ request = request || {};
522
+ let options;
523
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
524
+ callback = optionsOrCallback;
525
+ options = {};
526
+ }
527
+ else {
528
+ options = optionsOrCallback;
529
+ }
530
+ options = options || {};
531
+ options.otherArgs = options.otherArgs || {};
532
+ options.otherArgs.headers = options.otherArgs.headers || {};
533
+ options.otherArgs.headers['x-goog-request-params'] =
534
+ this._gaxModule.routingHeader.fromParams({
535
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
536
+ });
537
+ this.initialize();
538
+ return this.innerApiCalls.getPrivateConnection(request, options, callback);
539
+ }
540
+ getConversionWorkspace(request, optionsOrCallback, callback) {
541
+ var _a;
542
+ request = request || {};
543
+ let options;
544
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
545
+ callback = optionsOrCallback;
546
+ options = {};
547
+ }
548
+ else {
549
+ options = optionsOrCallback;
550
+ }
551
+ options = options || {};
552
+ options.otherArgs = options.otherArgs || {};
553
+ options.otherArgs.headers = options.otherArgs.headers || {};
554
+ options.otherArgs.headers['x-goog-request-params'] =
555
+ this._gaxModule.routingHeader.fromParams({
556
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
557
+ });
558
+ this.initialize();
559
+ return this.innerApiCalls.getConversionWorkspace(request, options, callback);
560
+ }
561
+ searchBackgroundJobs(request, optionsOrCallback, callback) {
562
+ var _a;
563
+ request = request || {};
564
+ let options;
565
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
566
+ callback = optionsOrCallback;
567
+ options = {};
568
+ }
569
+ else {
570
+ options = optionsOrCallback;
571
+ }
572
+ options = options || {};
573
+ options.otherArgs = options.otherArgs || {};
574
+ options.otherArgs.headers = options.otherArgs.headers || {};
575
+ options.otherArgs.headers['x-goog-request-params'] =
576
+ this._gaxModule.routingHeader.fromParams({
577
+ conversion_workspace: (_a = request.conversionWorkspace) !== null && _a !== void 0 ? _a : '',
578
+ });
579
+ this.initialize();
580
+ return this.innerApiCalls.searchBackgroundJobs(request, options, callback);
581
+ }
582
+ describeConversionWorkspaceRevisions(request, optionsOrCallback, callback) {
583
+ var _a;
584
+ request = request || {};
585
+ let options;
586
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
587
+ callback = optionsOrCallback;
588
+ options = {};
589
+ }
590
+ else {
591
+ options = optionsOrCallback;
592
+ }
593
+ options = options || {};
594
+ options.otherArgs = options.otherArgs || {};
595
+ options.otherArgs.headers = options.otherArgs.headers || {};
596
+ options.otherArgs.headers['x-goog-request-params'] =
597
+ this._gaxModule.routingHeader.fromParams({
598
+ conversion_workspace: (_a = request.conversionWorkspace) !== null && _a !== void 0 ? _a : '',
599
+ });
600
+ this.initialize();
601
+ return this.innerApiCalls.describeConversionWorkspaceRevisions(request, options, callback);
602
+ }
437
603
  createMigrationJob(request, optionsOrCallback, callback) {
438
604
  var _a;
439
605
  request = request || {};
@@ -902,7 +1068,7 @@ class DataMigrationServiceClient {
902
1068
  const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteConnectionProfile, this._gaxModule.createDefaultBackoffSettings());
903
1069
  return decodeOperation;
904
1070
  }
905
- listMigrationJobs(request, optionsOrCallback, callback) {
1071
+ createPrivateConnection(request, optionsOrCallback, callback) {
906
1072
  var _a;
907
1073
  request = request || {};
908
1074
  let options;
@@ -921,113 +1087,76 @@ class DataMigrationServiceClient {
921
1087
  parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
922
1088
  });
923
1089
  this.initialize();
924
- return this.innerApiCalls.listMigrationJobs(request, options, callback);
1090
+ return this.innerApiCalls.createPrivateConnection(request, options, callback);
925
1091
  }
926
1092
  /**
927
- * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
928
- * @param {Object} request
929
- * The request object that will be sent.
930
- * @param {string} request.parent
931
- * Required. The parent, which owns this collection of migrationJobs.
932
- * @param {number} request.pageSize
933
- * The maximum number of migration jobs to return. The service may return
934
- * fewer than this value. If unspecified, at most 50 migration jobs will be
935
- * returned. The maximum value is 1000; values above 1000 will be coerced to
936
- * 1000.
937
- * @param {string} request.pageToken
938
- * The nextPageToken value received in the previous call to
939
- * migrationJobs.list, used in the subsequent request to retrieve the next
940
- * page of results. On first call this should be left blank. When paginating,
941
- * all other parameters provided to migrationJobs.list must match the call
942
- * that provided the page token.
943
- * @param {string} request.filter
944
- * A filter expression that filters migration jobs listed in the response.
945
- * The expression must specify the field name, a comparison operator, and the
946
- * value that you want to use for filtering. The value must be a string,
947
- * a number, or a boolean. The comparison operator must be
948
- * either =, !=, >, or <. For example, list migration jobs created this year
949
- * by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.**
950
- * You can also filter nested fields. For example, you could specify
951
- * **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration
952
- * jobs connecting through the specific SSH tunnel bastion.
953
- * @param {string} request.orderBy
954
- * Sort the results based on the migration job name.
955
- * Valid values are: "name", "name asc", and "name desc".
956
- * @param {object} [options]
957
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
958
- * @returns {Stream}
959
- * An object stream which emits an object representing {@link google.cloud.clouddms.v1.MigrationJob | MigrationJob} on 'data' event.
960
- * The client library will perform auto-pagination by default: it will call the API as many
961
- * times as needed. Note that it can affect your quota.
962
- * We recommend using `listMigrationJobsAsync()`
963
- * method described below for async iteration which you can stop as needed.
1093
+ * Check the status of the long running operation returned by `createPrivateConnection()`.
1094
+ * @param {String} name
1095
+ * The operation name that will be passed.
1096
+ * @returns {Promise} - The promise which resolves to an object.
1097
+ * The decoded operation object has result and metadata field to get information from.
964
1098
  * Please see the
965
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
1099
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
966
1100
  * for more details and examples.
1101
+ * @example <caption>include:samples/generated/v1/data_migration_service.create_private_connection.js</caption>
1102
+ * region_tag:datamigration_v1_generated_DataMigrationService_CreatePrivateConnection_async
967
1103
  */
968
- listMigrationJobsStream(request, options) {
1104
+ async checkCreatePrivateConnectionProgress(name) {
1105
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
1106
+ const [operation] = await this.operationsClient.getOperation(request);
1107
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createPrivateConnection, this._gaxModule.createDefaultBackoffSettings());
1108
+ return decodeOperation;
1109
+ }
1110
+ deletePrivateConnection(request, optionsOrCallback, callback) {
969
1111
  var _a;
970
1112
  request = request || {};
1113
+ let options;
1114
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
1115
+ callback = optionsOrCallback;
1116
+ options = {};
1117
+ }
1118
+ else {
1119
+ options = optionsOrCallback;
1120
+ }
971
1121
  options = options || {};
972
1122
  options.otherArgs = options.otherArgs || {};
973
1123
  options.otherArgs.headers = options.otherArgs.headers || {};
974
1124
  options.otherArgs.headers['x-goog-request-params'] =
975
1125
  this._gaxModule.routingHeader.fromParams({
976
- parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
1126
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
977
1127
  });
978
- const defaultCallSettings = this._defaults['listMigrationJobs'];
979
- const callSettings = defaultCallSettings.merge(options);
980
1128
  this.initialize();
981
- return this.descriptors.page.listMigrationJobs.createStream(this.innerApiCalls.listMigrationJobs, request, callSettings);
1129
+ return this.innerApiCalls.deletePrivateConnection(request, options, callback);
982
1130
  }
983
1131
  /**
984
- * Equivalent to `listMigrationJobs`, but returns an iterable object.
985
- *
986
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
987
- * @param {Object} request
988
- * The request object that will be sent.
989
- * @param {string} request.parent
990
- * Required. The parent, which owns this collection of migrationJobs.
991
- * @param {number} request.pageSize
992
- * The maximum number of migration jobs to return. The service may return
993
- * fewer than this value. If unspecified, at most 50 migration jobs will be
994
- * returned. The maximum value is 1000; values above 1000 will be coerced to
995
- * 1000.
996
- * @param {string} request.pageToken
997
- * The nextPageToken value received in the previous call to
998
- * migrationJobs.list, used in the subsequent request to retrieve the next
999
- * page of results. On first call this should be left blank. When paginating,
1000
- * all other parameters provided to migrationJobs.list must match the call
1001
- * that provided the page token.
1002
- * @param {string} request.filter
1003
- * A filter expression that filters migration jobs listed in the response.
1004
- * The expression must specify the field name, a comparison operator, and the
1005
- * value that you want to use for filtering. The value must be a string,
1006
- * a number, or a boolean. The comparison operator must be
1007
- * either =, !=, >, or <. For example, list migration jobs created this year
1008
- * by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.**
1009
- * You can also filter nested fields. For example, you could specify
1010
- * **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration
1011
- * jobs connecting through the specific SSH tunnel bastion.
1012
- * @param {string} request.orderBy
1013
- * Sort the results based on the migration job name.
1014
- * Valid values are: "name", "name asc", and "name desc".
1015
- * @param {object} [options]
1016
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1017
- * @returns {Object}
1018
- * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).
1019
- * When you iterate the returned iterable, each element will be an object representing
1020
- * {@link google.cloud.clouddms.v1.MigrationJob | MigrationJob}. The API will be called under the hood as needed, once per the page,
1021
- * so you can stop the iteration when you don't need more results.
1132
+ * Check the status of the long running operation returned by `deletePrivateConnection()`.
1133
+ * @param {String} name
1134
+ * The operation name that will be passed.
1135
+ * @returns {Promise} - The promise which resolves to an object.
1136
+ * The decoded operation object has result and metadata field to get information from.
1022
1137
  * Please see the
1023
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
1138
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
1024
1139
  * for more details and examples.
1025
- * @example <caption>include:samples/generated/v1/data_migration_service.list_migration_jobs.js</caption>
1026
- * region_tag:datamigration_v1_generated_DataMigrationService_ListMigrationJobs_async
1140
+ * @example <caption>include:samples/generated/v1/data_migration_service.delete_private_connection.js</caption>
1141
+ * region_tag:datamigration_v1_generated_DataMigrationService_DeletePrivateConnection_async
1027
1142
  */
1028
- listMigrationJobsAsync(request, options) {
1143
+ async checkDeletePrivateConnectionProgress(name) {
1144
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
1145
+ const [operation] = await this.operationsClient.getOperation(request);
1146
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deletePrivateConnection, this._gaxModule.createDefaultBackoffSettings());
1147
+ return decodeOperation;
1148
+ }
1149
+ createConversionWorkspace(request, optionsOrCallback, callback) {
1029
1150
  var _a;
1030
1151
  request = request || {};
1152
+ let options;
1153
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
1154
+ callback = optionsOrCallback;
1155
+ options = {};
1156
+ }
1157
+ else {
1158
+ options = optionsOrCallback;
1159
+ }
1031
1160
  options = options || {};
1032
1161
  options.otherArgs = options.otherArgs || {};
1033
1162
  options.otherArgs.headers = options.otherArgs.headers || {};
@@ -1035,12 +1164,28 @@ class DataMigrationServiceClient {
1035
1164
  this._gaxModule.routingHeader.fromParams({
1036
1165
  parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
1037
1166
  });
1038
- const defaultCallSettings = this._defaults['listMigrationJobs'];
1039
- const callSettings = defaultCallSettings.merge(options);
1040
1167
  this.initialize();
1041
- return this.descriptors.page.listMigrationJobs.asyncIterate(this.innerApiCalls['listMigrationJobs'], request, callSettings);
1168
+ return this.innerApiCalls.createConversionWorkspace(request, options, callback);
1042
1169
  }
1043
- listConnectionProfiles(request, optionsOrCallback, callback) {
1170
+ /**
1171
+ * Check the status of the long running operation returned by `createConversionWorkspace()`.
1172
+ * @param {String} name
1173
+ * The operation name that will be passed.
1174
+ * @returns {Promise} - The promise which resolves to an object.
1175
+ * The decoded operation object has result and metadata field to get information from.
1176
+ * Please see the
1177
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
1178
+ * for more details and examples.
1179
+ * @example <caption>include:samples/generated/v1/data_migration_service.create_conversion_workspace.js</caption>
1180
+ * region_tag:datamigration_v1_generated_DataMigrationService_CreateConversionWorkspace_async
1181
+ */
1182
+ async checkCreateConversionWorkspaceProgress(name) {
1183
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
1184
+ const [operation] = await this.operationsClient.getOperation(request);
1185
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createConversionWorkspace, this._gaxModule.createDefaultBackoffSettings());
1186
+ return decodeOperation;
1187
+ }
1188
+ updateConversionWorkspace(request, optionsOrCallback, callback) {
1044
1189
  var _a;
1045
1190
  request = request || {};
1046
1191
  let options;
@@ -1056,53 +1201,896 @@ class DataMigrationServiceClient {
1056
1201
  options.otherArgs.headers = options.otherArgs.headers || {};
1057
1202
  options.otherArgs.headers['x-goog-request-params'] =
1058
1203
  this._gaxModule.routingHeader.fromParams({
1059
- parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
1204
+ 'conversion_workspace.name': (_a = request.conversionWorkspace.name) !== null && _a !== void 0 ? _a : '',
1060
1205
  });
1061
1206
  this.initialize();
1062
- return this.innerApiCalls.listConnectionProfiles(request, options, callback);
1207
+ return this.innerApiCalls.updateConversionWorkspace(request, options, callback);
1063
1208
  }
1064
1209
  /**
1065
- * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
1066
- * @param {Object} request
1067
- * The request object that will be sent.
1068
- * @param {string} request.parent
1069
- * Required. The parent, which owns this collection of connection profiles.
1070
- * @param {number} request.pageSize
1071
- * The maximum number of connection profiles to return. The service may return
1072
- * fewer than this value. If unspecified, at most 50 connection profiles will
1073
- * be returned. The maximum value is 1000; values above 1000 will be coerced
1074
- * to 1000.
1075
- * @param {string} request.pageToken
1076
- * A page token, received from a previous `ListConnectionProfiles` call.
1077
- * Provide this to retrieve the subsequent page.
1078
- *
1079
- * When paginating, all other parameters provided to `ListConnectionProfiles`
1080
- * must match the call that provided the page token.
1081
- * @param {string} request.filter
1082
- * A filter expression that filters connection profiles listed in the
1083
- * response. The expression must specify the field name, a comparison
1084
- * operator, and the value that you want to use for filtering. The value must
1085
- * be a string, a number, or a boolean. The comparison operator must be either
1086
- * =, !=, >, or <. For example, list connection profiles created this year by
1087
- * specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can
1088
- * also filter nested fields. For example, you could specify **mySql.username
1089
- * = %lt;my_username%gt;** to list all connection profiles configured to
1090
- * connect with a specific username.
1091
- * @param {string} request.orderBy
1092
- * the order by fields for the result.
1093
- * @param {object} [options]
1094
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1095
- * @returns {Stream}
1096
- * An object stream which emits an object representing {@link google.cloud.clouddms.v1.ConnectionProfile | ConnectionProfile} on 'data' event.
1210
+ * Check the status of the long running operation returned by `updateConversionWorkspace()`.
1211
+ * @param {String} name
1212
+ * The operation name that will be passed.
1213
+ * @returns {Promise} - The promise which resolves to an object.
1214
+ * The decoded operation object has result and metadata field to get information from.
1215
+ * Please see the
1216
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
1217
+ * for more details and examples.
1218
+ * @example <caption>include:samples/generated/v1/data_migration_service.update_conversion_workspace.js</caption>
1219
+ * region_tag:datamigration_v1_generated_DataMigrationService_UpdateConversionWorkspace_async
1220
+ */
1221
+ async checkUpdateConversionWorkspaceProgress(name) {
1222
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
1223
+ const [operation] = await this.operationsClient.getOperation(request);
1224
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateConversionWorkspace, this._gaxModule.createDefaultBackoffSettings());
1225
+ return decodeOperation;
1226
+ }
1227
+ deleteConversionWorkspace(request, optionsOrCallback, callback) {
1228
+ var _a;
1229
+ request = request || {};
1230
+ let options;
1231
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
1232
+ callback = optionsOrCallback;
1233
+ options = {};
1234
+ }
1235
+ else {
1236
+ options = optionsOrCallback;
1237
+ }
1238
+ options = options || {};
1239
+ options.otherArgs = options.otherArgs || {};
1240
+ options.otherArgs.headers = options.otherArgs.headers || {};
1241
+ options.otherArgs.headers['x-goog-request-params'] =
1242
+ this._gaxModule.routingHeader.fromParams({
1243
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
1244
+ });
1245
+ this.initialize();
1246
+ return this.innerApiCalls.deleteConversionWorkspace(request, options, callback);
1247
+ }
1248
+ /**
1249
+ * Check the status of the long running operation returned by `deleteConversionWorkspace()`.
1250
+ * @param {String} name
1251
+ * The operation name that will be passed.
1252
+ * @returns {Promise} - The promise which resolves to an object.
1253
+ * The decoded operation object has result and metadata field to get information from.
1254
+ * Please see the
1255
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
1256
+ * for more details and examples.
1257
+ * @example <caption>include:samples/generated/v1/data_migration_service.delete_conversion_workspace.js</caption>
1258
+ * region_tag:datamigration_v1_generated_DataMigrationService_DeleteConversionWorkspace_async
1259
+ */
1260
+ async checkDeleteConversionWorkspaceProgress(name) {
1261
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
1262
+ const [operation] = await this.operationsClient.getOperation(request);
1263
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteConversionWorkspace, this._gaxModule.createDefaultBackoffSettings());
1264
+ return decodeOperation;
1265
+ }
1266
+ seedConversionWorkspace(request, optionsOrCallback, callback) {
1267
+ var _a;
1268
+ request = request || {};
1269
+ let options;
1270
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
1271
+ callback = optionsOrCallback;
1272
+ options = {};
1273
+ }
1274
+ else {
1275
+ options = optionsOrCallback;
1276
+ }
1277
+ options = options || {};
1278
+ options.otherArgs = options.otherArgs || {};
1279
+ options.otherArgs.headers = options.otherArgs.headers || {};
1280
+ options.otherArgs.headers['x-goog-request-params'] =
1281
+ this._gaxModule.routingHeader.fromParams({
1282
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
1283
+ });
1284
+ this.initialize();
1285
+ return this.innerApiCalls.seedConversionWorkspace(request, options, callback);
1286
+ }
1287
+ /**
1288
+ * Check the status of the long running operation returned by `seedConversionWorkspace()`.
1289
+ * @param {String} name
1290
+ * The operation name that will be passed.
1291
+ * @returns {Promise} - The promise which resolves to an object.
1292
+ * The decoded operation object has result and metadata field to get information from.
1293
+ * Please see the
1294
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
1295
+ * for more details and examples.
1296
+ * @example <caption>include:samples/generated/v1/data_migration_service.seed_conversion_workspace.js</caption>
1297
+ * region_tag:datamigration_v1_generated_DataMigrationService_SeedConversionWorkspace_async
1298
+ */
1299
+ async checkSeedConversionWorkspaceProgress(name) {
1300
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
1301
+ const [operation] = await this.operationsClient.getOperation(request);
1302
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.seedConversionWorkspace, this._gaxModule.createDefaultBackoffSettings());
1303
+ return decodeOperation;
1304
+ }
1305
+ importMappingRules(request, optionsOrCallback, callback) {
1306
+ var _a;
1307
+ request = request || {};
1308
+ let options;
1309
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
1310
+ callback = optionsOrCallback;
1311
+ options = {};
1312
+ }
1313
+ else {
1314
+ options = optionsOrCallback;
1315
+ }
1316
+ options = options || {};
1317
+ options.otherArgs = options.otherArgs || {};
1318
+ options.otherArgs.headers = options.otherArgs.headers || {};
1319
+ options.otherArgs.headers['x-goog-request-params'] =
1320
+ this._gaxModule.routingHeader.fromParams({
1321
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
1322
+ });
1323
+ this.initialize();
1324
+ return this.innerApiCalls.importMappingRules(request, options, callback);
1325
+ }
1326
+ /**
1327
+ * Check the status of the long running operation returned by `importMappingRules()`.
1328
+ * @param {String} name
1329
+ * The operation name that will be passed.
1330
+ * @returns {Promise} - The promise which resolves to an object.
1331
+ * The decoded operation object has result and metadata field to get information from.
1332
+ * Please see the
1333
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
1334
+ * for more details and examples.
1335
+ * @example <caption>include:samples/generated/v1/data_migration_service.import_mapping_rules.js</caption>
1336
+ * region_tag:datamigration_v1_generated_DataMigrationService_ImportMappingRules_async
1337
+ */
1338
+ async checkImportMappingRulesProgress(name) {
1339
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
1340
+ const [operation] = await this.operationsClient.getOperation(request);
1341
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.importMappingRules, this._gaxModule.createDefaultBackoffSettings());
1342
+ return decodeOperation;
1343
+ }
1344
+ convertConversionWorkspace(request, optionsOrCallback, callback) {
1345
+ var _a;
1346
+ request = request || {};
1347
+ let options;
1348
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
1349
+ callback = optionsOrCallback;
1350
+ options = {};
1351
+ }
1352
+ else {
1353
+ options = optionsOrCallback;
1354
+ }
1355
+ options = options || {};
1356
+ options.otherArgs = options.otherArgs || {};
1357
+ options.otherArgs.headers = options.otherArgs.headers || {};
1358
+ options.otherArgs.headers['x-goog-request-params'] =
1359
+ this._gaxModule.routingHeader.fromParams({
1360
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
1361
+ });
1362
+ this.initialize();
1363
+ return this.innerApiCalls.convertConversionWorkspace(request, options, callback);
1364
+ }
1365
+ /**
1366
+ * Check the status of the long running operation returned by `convertConversionWorkspace()`.
1367
+ * @param {String} name
1368
+ * The operation name that will be passed.
1369
+ * @returns {Promise} - The promise which resolves to an object.
1370
+ * The decoded operation object has result and metadata field to get information from.
1371
+ * Please see the
1372
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
1373
+ * for more details and examples.
1374
+ * @example <caption>include:samples/generated/v1/data_migration_service.convert_conversion_workspace.js</caption>
1375
+ * region_tag:datamigration_v1_generated_DataMigrationService_ConvertConversionWorkspace_async
1376
+ */
1377
+ async checkConvertConversionWorkspaceProgress(name) {
1378
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
1379
+ const [operation] = await this.operationsClient.getOperation(request);
1380
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.convertConversionWorkspace, this._gaxModule.createDefaultBackoffSettings());
1381
+ return decodeOperation;
1382
+ }
1383
+ commitConversionWorkspace(request, optionsOrCallback, callback) {
1384
+ var _a;
1385
+ request = request || {};
1386
+ let options;
1387
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
1388
+ callback = optionsOrCallback;
1389
+ options = {};
1390
+ }
1391
+ else {
1392
+ options = optionsOrCallback;
1393
+ }
1394
+ options = options || {};
1395
+ options.otherArgs = options.otherArgs || {};
1396
+ options.otherArgs.headers = options.otherArgs.headers || {};
1397
+ options.otherArgs.headers['x-goog-request-params'] =
1398
+ this._gaxModule.routingHeader.fromParams({
1399
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
1400
+ });
1401
+ this.initialize();
1402
+ return this.innerApiCalls.commitConversionWorkspace(request, options, callback);
1403
+ }
1404
+ /**
1405
+ * Check the status of the long running operation returned by `commitConversionWorkspace()`.
1406
+ * @param {String} name
1407
+ * The operation name that will be passed.
1408
+ * @returns {Promise} - The promise which resolves to an object.
1409
+ * The decoded operation object has result and metadata field to get information from.
1410
+ * Please see the
1411
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
1412
+ * for more details and examples.
1413
+ * @example <caption>include:samples/generated/v1/data_migration_service.commit_conversion_workspace.js</caption>
1414
+ * region_tag:datamigration_v1_generated_DataMigrationService_CommitConversionWorkspace_async
1415
+ */
1416
+ async checkCommitConversionWorkspaceProgress(name) {
1417
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
1418
+ const [operation] = await this.operationsClient.getOperation(request);
1419
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.commitConversionWorkspace, this._gaxModule.createDefaultBackoffSettings());
1420
+ return decodeOperation;
1421
+ }
1422
+ rollbackConversionWorkspace(request, optionsOrCallback, callback) {
1423
+ var _a;
1424
+ request = request || {};
1425
+ let options;
1426
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
1427
+ callback = optionsOrCallback;
1428
+ options = {};
1429
+ }
1430
+ else {
1431
+ options = optionsOrCallback;
1432
+ }
1433
+ options = options || {};
1434
+ options.otherArgs = options.otherArgs || {};
1435
+ options.otherArgs.headers = options.otherArgs.headers || {};
1436
+ options.otherArgs.headers['x-goog-request-params'] =
1437
+ this._gaxModule.routingHeader.fromParams({
1438
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
1439
+ });
1440
+ this.initialize();
1441
+ return this.innerApiCalls.rollbackConversionWorkspace(request, options, callback);
1442
+ }
1443
+ /**
1444
+ * Check the status of the long running operation returned by `rollbackConversionWorkspace()`.
1445
+ * @param {String} name
1446
+ * The operation name that will be passed.
1447
+ * @returns {Promise} - The promise which resolves to an object.
1448
+ * The decoded operation object has result and metadata field to get information from.
1449
+ * Please see the
1450
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
1451
+ * for more details and examples.
1452
+ * @example <caption>include:samples/generated/v1/data_migration_service.rollback_conversion_workspace.js</caption>
1453
+ * region_tag:datamigration_v1_generated_DataMigrationService_RollbackConversionWorkspace_async
1454
+ */
1455
+ async checkRollbackConversionWorkspaceProgress(name) {
1456
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
1457
+ const [operation] = await this.operationsClient.getOperation(request);
1458
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.rollbackConversionWorkspace, this._gaxModule.createDefaultBackoffSettings());
1459
+ return decodeOperation;
1460
+ }
1461
+ applyConversionWorkspace(request, optionsOrCallback, callback) {
1462
+ var _a;
1463
+ request = request || {};
1464
+ let options;
1465
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
1466
+ callback = optionsOrCallback;
1467
+ options = {};
1468
+ }
1469
+ else {
1470
+ options = optionsOrCallback;
1471
+ }
1472
+ options = options || {};
1473
+ options.otherArgs = options.otherArgs || {};
1474
+ options.otherArgs.headers = options.otherArgs.headers || {};
1475
+ options.otherArgs.headers['x-goog-request-params'] =
1476
+ this._gaxModule.routingHeader.fromParams({
1477
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
1478
+ });
1479
+ this.initialize();
1480
+ return this.innerApiCalls.applyConversionWorkspace(request, options, callback);
1481
+ }
1482
+ /**
1483
+ * Check the status of the long running operation returned by `applyConversionWorkspace()`.
1484
+ * @param {String} name
1485
+ * The operation name that will be passed.
1486
+ * @returns {Promise} - The promise which resolves to an object.
1487
+ * The decoded operation object has result and metadata field to get information from.
1488
+ * Please see the
1489
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
1490
+ * for more details and examples.
1491
+ * @example <caption>include:samples/generated/v1/data_migration_service.apply_conversion_workspace.js</caption>
1492
+ * region_tag:datamigration_v1_generated_DataMigrationService_ApplyConversionWorkspace_async
1493
+ */
1494
+ async checkApplyConversionWorkspaceProgress(name) {
1495
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
1496
+ const [operation] = await this.operationsClient.getOperation(request);
1497
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.applyConversionWorkspace, this._gaxModule.createDefaultBackoffSettings());
1498
+ return decodeOperation;
1499
+ }
1500
+ listMigrationJobs(request, optionsOrCallback, callback) {
1501
+ var _a;
1502
+ request = request || {};
1503
+ let options;
1504
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
1505
+ callback = optionsOrCallback;
1506
+ options = {};
1507
+ }
1508
+ else {
1509
+ options = optionsOrCallback;
1510
+ }
1511
+ options = options || {};
1512
+ options.otherArgs = options.otherArgs || {};
1513
+ options.otherArgs.headers = options.otherArgs.headers || {};
1514
+ options.otherArgs.headers['x-goog-request-params'] =
1515
+ this._gaxModule.routingHeader.fromParams({
1516
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
1517
+ });
1518
+ this.initialize();
1519
+ return this.innerApiCalls.listMigrationJobs(request, options, callback);
1520
+ }
1521
+ /**
1522
+ * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
1523
+ * @param {Object} request
1524
+ * The request object that will be sent.
1525
+ * @param {string} request.parent
1526
+ * Required. The parent which owns this collection of migrationJobs.
1527
+ * @param {number} request.pageSize
1528
+ * The maximum number of migration jobs to return. The service may return
1529
+ * fewer than this value. If unspecified, at most 50 migration jobs will be
1530
+ * returned. The maximum value is 1000; values above 1000 are coerced to
1531
+ * 1000.
1532
+ * @param {string} request.pageToken
1533
+ * The nextPageToken value received in the previous call to
1534
+ * migrationJobs.list, used in the subsequent request to retrieve the next
1535
+ * page of results. On first call this should be left blank. When paginating,
1536
+ * all other parameters provided to migrationJobs.list must match the call
1537
+ * that provided the page token.
1538
+ * @param {string} request.filter
1539
+ * A filter expression that filters migration jobs listed in the response.
1540
+ * The expression must specify the field name, a comparison operator, and the
1541
+ * value that you want to use for filtering. The value must be a string,
1542
+ * a number, or a boolean. The comparison operator must be
1543
+ * either =, !=, >, or <. For example, list migration jobs created this year
1544
+ * by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.**
1545
+ * You can also filter nested fields. For example, you could specify
1546
+ * **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration
1547
+ * jobs connecting through the specific SSH tunnel bastion.
1548
+ * @param {string} request.orderBy
1549
+ * Sort the results based on the migration job name.
1550
+ * Valid values are: "name", "name asc", and "name desc".
1551
+ * @param {object} [options]
1552
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1553
+ * @returns {Stream}
1554
+ * An object stream which emits an object representing {@link google.cloud.clouddms.v1.MigrationJob | MigrationJob} on 'data' event.
1555
+ * The client library will perform auto-pagination by default: it will call the API as many
1556
+ * times as needed. Note that it can affect your quota.
1557
+ * We recommend using `listMigrationJobsAsync()`
1558
+ * method described below for async iteration which you can stop as needed.
1559
+ * Please see the
1560
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
1561
+ * for more details and examples.
1562
+ */
1563
+ listMigrationJobsStream(request, options) {
1564
+ var _a;
1565
+ request = request || {};
1566
+ options = options || {};
1567
+ options.otherArgs = options.otherArgs || {};
1568
+ options.otherArgs.headers = options.otherArgs.headers || {};
1569
+ options.otherArgs.headers['x-goog-request-params'] =
1570
+ this._gaxModule.routingHeader.fromParams({
1571
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
1572
+ });
1573
+ const defaultCallSettings = this._defaults['listMigrationJobs'];
1574
+ const callSettings = defaultCallSettings.merge(options);
1575
+ this.initialize();
1576
+ return this.descriptors.page.listMigrationJobs.createStream(this.innerApiCalls.listMigrationJobs, request, callSettings);
1577
+ }
1578
+ /**
1579
+ * Equivalent to `listMigrationJobs`, but returns an iterable object.
1580
+ *
1581
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
1582
+ * @param {Object} request
1583
+ * The request object that will be sent.
1584
+ * @param {string} request.parent
1585
+ * Required. The parent which owns this collection of migrationJobs.
1586
+ * @param {number} request.pageSize
1587
+ * The maximum number of migration jobs to return. The service may return
1588
+ * fewer than this value. If unspecified, at most 50 migration jobs will be
1589
+ * returned. The maximum value is 1000; values above 1000 are coerced to
1590
+ * 1000.
1591
+ * @param {string} request.pageToken
1592
+ * The nextPageToken value received in the previous call to
1593
+ * migrationJobs.list, used in the subsequent request to retrieve the next
1594
+ * page of results. On first call this should be left blank. When paginating,
1595
+ * all other parameters provided to migrationJobs.list must match the call
1596
+ * that provided the page token.
1597
+ * @param {string} request.filter
1598
+ * A filter expression that filters migration jobs listed in the response.
1599
+ * The expression must specify the field name, a comparison operator, and the
1600
+ * value that you want to use for filtering. The value must be a string,
1601
+ * a number, or a boolean. The comparison operator must be
1602
+ * either =, !=, >, or <. For example, list migration jobs created this year
1603
+ * by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.**
1604
+ * You can also filter nested fields. For example, you could specify
1605
+ * **reverseSshConnectivity.vmIp = "1.2.3.4"** to select all migration
1606
+ * jobs connecting through the specific SSH tunnel bastion.
1607
+ * @param {string} request.orderBy
1608
+ * Sort the results based on the migration job name.
1609
+ * Valid values are: "name", "name asc", and "name desc".
1610
+ * @param {object} [options]
1611
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1612
+ * @returns {Object}
1613
+ * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).
1614
+ * When you iterate the returned iterable, each element will be an object representing
1615
+ * {@link google.cloud.clouddms.v1.MigrationJob | MigrationJob}. The API will be called under the hood as needed, once per the page,
1616
+ * so you can stop the iteration when you don't need more results.
1617
+ * Please see the
1618
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
1619
+ * for more details and examples.
1620
+ * @example <caption>include:samples/generated/v1/data_migration_service.list_migration_jobs.js</caption>
1621
+ * region_tag:datamigration_v1_generated_DataMigrationService_ListMigrationJobs_async
1622
+ */
1623
+ listMigrationJobsAsync(request, options) {
1624
+ var _a;
1625
+ request = request || {};
1626
+ options = options || {};
1627
+ options.otherArgs = options.otherArgs || {};
1628
+ options.otherArgs.headers = options.otherArgs.headers || {};
1629
+ options.otherArgs.headers['x-goog-request-params'] =
1630
+ this._gaxModule.routingHeader.fromParams({
1631
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
1632
+ });
1633
+ const defaultCallSettings = this._defaults['listMigrationJobs'];
1634
+ const callSettings = defaultCallSettings.merge(options);
1635
+ this.initialize();
1636
+ return this.descriptors.page.listMigrationJobs.asyncIterate(this.innerApiCalls['listMigrationJobs'], request, callSettings);
1637
+ }
1638
+ listConnectionProfiles(request, optionsOrCallback, callback) {
1639
+ var _a;
1640
+ request = request || {};
1641
+ let options;
1642
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
1643
+ callback = optionsOrCallback;
1644
+ options = {};
1645
+ }
1646
+ else {
1647
+ options = optionsOrCallback;
1648
+ }
1649
+ options = options || {};
1650
+ options.otherArgs = options.otherArgs || {};
1651
+ options.otherArgs.headers = options.otherArgs.headers || {};
1652
+ options.otherArgs.headers['x-goog-request-params'] =
1653
+ this._gaxModule.routingHeader.fromParams({
1654
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
1655
+ });
1656
+ this.initialize();
1657
+ return this.innerApiCalls.listConnectionProfiles(request, options, callback);
1658
+ }
1659
+ /**
1660
+ * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
1661
+ * @param {Object} request
1662
+ * The request object that will be sent.
1663
+ * @param {string} request.parent
1664
+ * Required. The parent which owns this collection of connection profiles.
1665
+ * @param {number} request.pageSize
1666
+ * The maximum number of connection profiles to return. The service may return
1667
+ * fewer than this value. If unspecified, at most 50 connection profiles will
1668
+ * be returned. The maximum value is 1000; values above 1000 are coerced
1669
+ * to 1000.
1670
+ * @param {string} request.pageToken
1671
+ * A page token, received from a previous `ListConnectionProfiles` call.
1672
+ * Provide this to retrieve the subsequent page.
1673
+ *
1674
+ * When paginating, all other parameters provided to `ListConnectionProfiles`
1675
+ * must match the call that provided the page token.
1676
+ * @param {string} request.filter
1677
+ * A filter expression that filters connection profiles listed in the
1678
+ * response. The expression must specify the field name, a comparison
1679
+ * operator, and the value that you want to use for filtering. The value must
1680
+ * be a string, a number, or a boolean. The comparison operator must be either
1681
+ * =, !=, >, or <. For example, list connection profiles created this year by
1682
+ * specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can
1683
+ * also filter nested fields. For example, you could specify **mySql.username
1684
+ * = %lt;my_username%gt;** to list all connection profiles configured to
1685
+ * connect with a specific username.
1686
+ * @param {string} request.orderBy
1687
+ * A comma-separated list of fields to order results according to.
1688
+ * @param {object} [options]
1689
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1690
+ * @returns {Stream}
1691
+ * An object stream which emits an object representing {@link google.cloud.clouddms.v1.ConnectionProfile | ConnectionProfile} on 'data' event.
1692
+ * The client library will perform auto-pagination by default: it will call the API as many
1693
+ * times as needed. Note that it can affect your quota.
1694
+ * We recommend using `listConnectionProfilesAsync()`
1695
+ * method described below for async iteration which you can stop as needed.
1696
+ * Please see the
1697
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
1698
+ * for more details and examples.
1699
+ */
1700
+ listConnectionProfilesStream(request, options) {
1701
+ var _a;
1702
+ request = request || {};
1703
+ options = options || {};
1704
+ options.otherArgs = options.otherArgs || {};
1705
+ options.otherArgs.headers = options.otherArgs.headers || {};
1706
+ options.otherArgs.headers['x-goog-request-params'] =
1707
+ this._gaxModule.routingHeader.fromParams({
1708
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
1709
+ });
1710
+ const defaultCallSettings = this._defaults['listConnectionProfiles'];
1711
+ const callSettings = defaultCallSettings.merge(options);
1712
+ this.initialize();
1713
+ return this.descriptors.page.listConnectionProfiles.createStream(this.innerApiCalls.listConnectionProfiles, request, callSettings);
1714
+ }
1715
+ /**
1716
+ * Equivalent to `listConnectionProfiles`, but returns an iterable object.
1717
+ *
1718
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
1719
+ * @param {Object} request
1720
+ * The request object that will be sent.
1721
+ * @param {string} request.parent
1722
+ * Required. The parent which owns this collection of connection profiles.
1723
+ * @param {number} request.pageSize
1724
+ * The maximum number of connection profiles to return. The service may return
1725
+ * fewer than this value. If unspecified, at most 50 connection profiles will
1726
+ * be returned. The maximum value is 1000; values above 1000 are coerced
1727
+ * to 1000.
1728
+ * @param {string} request.pageToken
1729
+ * A page token, received from a previous `ListConnectionProfiles` call.
1730
+ * Provide this to retrieve the subsequent page.
1731
+ *
1732
+ * When paginating, all other parameters provided to `ListConnectionProfiles`
1733
+ * must match the call that provided the page token.
1734
+ * @param {string} request.filter
1735
+ * A filter expression that filters connection profiles listed in the
1736
+ * response. The expression must specify the field name, a comparison
1737
+ * operator, and the value that you want to use for filtering. The value must
1738
+ * be a string, a number, or a boolean. The comparison operator must be either
1739
+ * =, !=, >, or <. For example, list connection profiles created this year by
1740
+ * specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can
1741
+ * also filter nested fields. For example, you could specify **mySql.username
1742
+ * = %lt;my_username%gt;** to list all connection profiles configured to
1743
+ * connect with a specific username.
1744
+ * @param {string} request.orderBy
1745
+ * A comma-separated list of fields to order results according to.
1746
+ * @param {object} [options]
1747
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1748
+ * @returns {Object}
1749
+ * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).
1750
+ * When you iterate the returned iterable, each element will be an object representing
1751
+ * {@link google.cloud.clouddms.v1.ConnectionProfile | ConnectionProfile}. The API will be called under the hood as needed, once per the page,
1752
+ * so you can stop the iteration when you don't need more results.
1753
+ * Please see the
1754
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
1755
+ * for more details and examples.
1756
+ * @example <caption>include:samples/generated/v1/data_migration_service.list_connection_profiles.js</caption>
1757
+ * region_tag:datamigration_v1_generated_DataMigrationService_ListConnectionProfiles_async
1758
+ */
1759
+ listConnectionProfilesAsync(request, options) {
1760
+ var _a;
1761
+ request = request || {};
1762
+ options = options || {};
1763
+ options.otherArgs = options.otherArgs || {};
1764
+ options.otherArgs.headers = options.otherArgs.headers || {};
1765
+ options.otherArgs.headers['x-goog-request-params'] =
1766
+ this._gaxModule.routingHeader.fromParams({
1767
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
1768
+ });
1769
+ const defaultCallSettings = this._defaults['listConnectionProfiles'];
1770
+ const callSettings = defaultCallSettings.merge(options);
1771
+ this.initialize();
1772
+ return this.descriptors.page.listConnectionProfiles.asyncIterate(this.innerApiCalls['listConnectionProfiles'], request, callSettings);
1773
+ }
1774
+ listPrivateConnections(request, optionsOrCallback, callback) {
1775
+ var _a;
1776
+ request = request || {};
1777
+ let options;
1778
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
1779
+ callback = optionsOrCallback;
1780
+ options = {};
1781
+ }
1782
+ else {
1783
+ options = optionsOrCallback;
1784
+ }
1785
+ options = options || {};
1786
+ options.otherArgs = options.otherArgs || {};
1787
+ options.otherArgs.headers = options.otherArgs.headers || {};
1788
+ options.otherArgs.headers['x-goog-request-params'] =
1789
+ this._gaxModule.routingHeader.fromParams({
1790
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
1791
+ });
1792
+ this.initialize();
1793
+ return this.innerApiCalls.listPrivateConnections(request, options, callback);
1794
+ }
1795
+ /**
1796
+ * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
1797
+ * @param {Object} request
1798
+ * The request object that will be sent.
1799
+ * @param {string} request.parent
1800
+ * Required. The parent that owns the collection of private connections.
1801
+ * @param {number} request.pageSize
1802
+ * Maximum number of private connections to return.
1803
+ * If unspecified, at most 50 private connections that are returned.
1804
+ * The maximum value is 1000; values above 1000 are coerced to 1000.
1805
+ * @param {string} request.pageToken
1806
+ * Page token received from a previous `ListPrivateConnections` call.
1807
+ * Provide this to retrieve the subsequent page.
1808
+ *
1809
+ * When paginating, all other parameters provided to
1810
+ * `ListPrivateConnections` must match the call that provided the page
1811
+ * token.
1812
+ * @param {string} request.filter
1813
+ * A filter expression that filters private connections listed in the
1814
+ * response. The expression must specify the field name, a comparison
1815
+ * operator, and the value that you want to use for filtering. The value must
1816
+ * be a string, a number, or a boolean. The comparison operator must be either
1817
+ * =, !=, >, or <. For example, list private connections created this year by
1818
+ * specifying **createTime %gt; 2021-01-01T00:00:00.000000000Z**.
1819
+ * @param {string} request.orderBy
1820
+ * Order by fields for the result.
1821
+ * @param {object} [options]
1822
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1823
+ * @returns {Stream}
1824
+ * An object stream which emits an object representing {@link google.cloud.clouddms.v1.PrivateConnection | PrivateConnection} on 'data' event.
1825
+ * The client library will perform auto-pagination by default: it will call the API as many
1826
+ * times as needed. Note that it can affect your quota.
1827
+ * We recommend using `listPrivateConnectionsAsync()`
1828
+ * method described below for async iteration which you can stop as needed.
1829
+ * Please see the
1830
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
1831
+ * for more details and examples.
1832
+ */
1833
+ listPrivateConnectionsStream(request, options) {
1834
+ var _a;
1835
+ request = request || {};
1836
+ options = options || {};
1837
+ options.otherArgs = options.otherArgs || {};
1838
+ options.otherArgs.headers = options.otherArgs.headers || {};
1839
+ options.otherArgs.headers['x-goog-request-params'] =
1840
+ this._gaxModule.routingHeader.fromParams({
1841
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
1842
+ });
1843
+ const defaultCallSettings = this._defaults['listPrivateConnections'];
1844
+ const callSettings = defaultCallSettings.merge(options);
1845
+ this.initialize();
1846
+ return this.descriptors.page.listPrivateConnections.createStream(this.innerApiCalls.listPrivateConnections, request, callSettings);
1847
+ }
1848
+ /**
1849
+ * Equivalent to `listPrivateConnections`, but returns an iterable object.
1850
+ *
1851
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
1852
+ * @param {Object} request
1853
+ * The request object that will be sent.
1854
+ * @param {string} request.parent
1855
+ * Required. The parent that owns the collection of private connections.
1856
+ * @param {number} request.pageSize
1857
+ * Maximum number of private connections to return.
1858
+ * If unspecified, at most 50 private connections that are returned.
1859
+ * The maximum value is 1000; values above 1000 are coerced to 1000.
1860
+ * @param {string} request.pageToken
1861
+ * Page token received from a previous `ListPrivateConnections` call.
1862
+ * Provide this to retrieve the subsequent page.
1863
+ *
1864
+ * When paginating, all other parameters provided to
1865
+ * `ListPrivateConnections` must match the call that provided the page
1866
+ * token.
1867
+ * @param {string} request.filter
1868
+ * A filter expression that filters private connections listed in the
1869
+ * response. The expression must specify the field name, a comparison
1870
+ * operator, and the value that you want to use for filtering. The value must
1871
+ * be a string, a number, or a boolean. The comparison operator must be either
1872
+ * =, !=, >, or <. For example, list private connections created this year by
1873
+ * specifying **createTime %gt; 2021-01-01T00:00:00.000000000Z**.
1874
+ * @param {string} request.orderBy
1875
+ * Order by fields for the result.
1876
+ * @param {object} [options]
1877
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1878
+ * @returns {Object}
1879
+ * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).
1880
+ * When you iterate the returned iterable, each element will be an object representing
1881
+ * {@link google.cloud.clouddms.v1.PrivateConnection | PrivateConnection}. The API will be called under the hood as needed, once per the page,
1882
+ * so you can stop the iteration when you don't need more results.
1883
+ * Please see the
1884
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
1885
+ * for more details and examples.
1886
+ * @example <caption>include:samples/generated/v1/data_migration_service.list_private_connections.js</caption>
1887
+ * region_tag:datamigration_v1_generated_DataMigrationService_ListPrivateConnections_async
1888
+ */
1889
+ listPrivateConnectionsAsync(request, options) {
1890
+ var _a;
1891
+ request = request || {};
1892
+ options = options || {};
1893
+ options.otherArgs = options.otherArgs || {};
1894
+ options.otherArgs.headers = options.otherArgs.headers || {};
1895
+ options.otherArgs.headers['x-goog-request-params'] =
1896
+ this._gaxModule.routingHeader.fromParams({
1897
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
1898
+ });
1899
+ const defaultCallSettings = this._defaults['listPrivateConnections'];
1900
+ const callSettings = defaultCallSettings.merge(options);
1901
+ this.initialize();
1902
+ return this.descriptors.page.listPrivateConnections.asyncIterate(this.innerApiCalls['listPrivateConnections'], request, callSettings);
1903
+ }
1904
+ listConversionWorkspaces(request, optionsOrCallback, callback) {
1905
+ var _a;
1906
+ request = request || {};
1907
+ let options;
1908
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
1909
+ callback = optionsOrCallback;
1910
+ options = {};
1911
+ }
1912
+ else {
1913
+ options = optionsOrCallback;
1914
+ }
1915
+ options = options || {};
1916
+ options.otherArgs = options.otherArgs || {};
1917
+ options.otherArgs.headers = options.otherArgs.headers || {};
1918
+ options.otherArgs.headers['x-goog-request-params'] =
1919
+ this._gaxModule.routingHeader.fromParams({
1920
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
1921
+ });
1922
+ this.initialize();
1923
+ return this.innerApiCalls.listConversionWorkspaces(request, options, callback);
1924
+ }
1925
+ /**
1926
+ * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
1927
+ * @param {Object} request
1928
+ * The request object that will be sent.
1929
+ * @param {string} request.parent
1930
+ * Required. The parent which owns this collection of conversion workspaces.
1931
+ * @param {number} request.pageSize
1932
+ * The maximum number of conversion workspaces to return. The service may
1933
+ * return fewer than this value. If unspecified, at most 50 sets are returned.
1934
+ * @param {string} request.pageToken
1935
+ * The nextPageToken value received in the previous call to
1936
+ * conversionWorkspaces.list, used in the subsequent request to retrieve the
1937
+ * next page of results. On first call this should be left blank. When
1938
+ * paginating, all other parameters provided to conversionWorkspaces.list must
1939
+ * match the call that provided the page token.
1940
+ * @param {string} request.filter
1941
+ * A filter expression that filters conversion workspaces listed in the
1942
+ * response. The expression must specify the field name, a comparison
1943
+ * operator, and the value that you want to use for filtering. The value must
1944
+ * be a string, a number, or a boolean. The comparison operator must be either
1945
+ * =, !=, >, or <. For example, list conversion workspaces created this year
1946
+ * by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.** You can
1947
+ * also filter nested fields. For example, you could specify
1948
+ * **source.version = "12.c.1"** to select all conversion workspaces with
1949
+ * source database version equal to 12.c.1.
1950
+ * @param {object} [options]
1951
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1952
+ * @returns {Stream}
1953
+ * An object stream which emits an object representing {@link google.cloud.clouddms.v1.ConversionWorkspace | ConversionWorkspace} on 'data' event.
1954
+ * The client library will perform auto-pagination by default: it will call the API as many
1955
+ * times as needed. Note that it can affect your quota.
1956
+ * We recommend using `listConversionWorkspacesAsync()`
1957
+ * method described below for async iteration which you can stop as needed.
1958
+ * Please see the
1959
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
1960
+ * for more details and examples.
1961
+ */
1962
+ listConversionWorkspacesStream(request, options) {
1963
+ var _a;
1964
+ request = request || {};
1965
+ options = options || {};
1966
+ options.otherArgs = options.otherArgs || {};
1967
+ options.otherArgs.headers = options.otherArgs.headers || {};
1968
+ options.otherArgs.headers['x-goog-request-params'] =
1969
+ this._gaxModule.routingHeader.fromParams({
1970
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
1971
+ });
1972
+ const defaultCallSettings = this._defaults['listConversionWorkspaces'];
1973
+ const callSettings = defaultCallSettings.merge(options);
1974
+ this.initialize();
1975
+ return this.descriptors.page.listConversionWorkspaces.createStream(this.innerApiCalls.listConversionWorkspaces, request, callSettings);
1976
+ }
1977
+ /**
1978
+ * Equivalent to `listConversionWorkspaces`, but returns an iterable object.
1979
+ *
1980
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
1981
+ * @param {Object} request
1982
+ * The request object that will be sent.
1983
+ * @param {string} request.parent
1984
+ * Required. The parent which owns this collection of conversion workspaces.
1985
+ * @param {number} request.pageSize
1986
+ * The maximum number of conversion workspaces to return. The service may
1987
+ * return fewer than this value. If unspecified, at most 50 sets are returned.
1988
+ * @param {string} request.pageToken
1989
+ * The nextPageToken value received in the previous call to
1990
+ * conversionWorkspaces.list, used in the subsequent request to retrieve the
1991
+ * next page of results. On first call this should be left blank. When
1992
+ * paginating, all other parameters provided to conversionWorkspaces.list must
1993
+ * match the call that provided the page token.
1994
+ * @param {string} request.filter
1995
+ * A filter expression that filters conversion workspaces listed in the
1996
+ * response. The expression must specify the field name, a comparison
1997
+ * operator, and the value that you want to use for filtering. The value must
1998
+ * be a string, a number, or a boolean. The comparison operator must be either
1999
+ * =, !=, >, or <. For example, list conversion workspaces created this year
2000
+ * by specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z.** You can
2001
+ * also filter nested fields. For example, you could specify
2002
+ * **source.version = "12.c.1"** to select all conversion workspaces with
2003
+ * source database version equal to 12.c.1.
2004
+ * @param {object} [options]
2005
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2006
+ * @returns {Object}
2007
+ * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).
2008
+ * When you iterate the returned iterable, each element will be an object representing
2009
+ * {@link google.cloud.clouddms.v1.ConversionWorkspace | ConversionWorkspace}. The API will be called under the hood as needed, once per the page,
2010
+ * so you can stop the iteration when you don't need more results.
2011
+ * Please see the
2012
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
2013
+ * for more details and examples.
2014
+ * @example <caption>include:samples/generated/v1/data_migration_service.list_conversion_workspaces.js</caption>
2015
+ * region_tag:datamigration_v1_generated_DataMigrationService_ListConversionWorkspaces_async
2016
+ */
2017
+ listConversionWorkspacesAsync(request, options) {
2018
+ var _a;
2019
+ request = request || {};
2020
+ options = options || {};
2021
+ options.otherArgs = options.otherArgs || {};
2022
+ options.otherArgs.headers = options.otherArgs.headers || {};
2023
+ options.otherArgs.headers['x-goog-request-params'] =
2024
+ this._gaxModule.routingHeader.fromParams({
2025
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
2026
+ });
2027
+ const defaultCallSettings = this._defaults['listConversionWorkspaces'];
2028
+ const callSettings = defaultCallSettings.merge(options);
2029
+ this.initialize();
2030
+ return this.descriptors.page.listConversionWorkspaces.asyncIterate(this.innerApiCalls['listConversionWorkspaces'], request, callSettings);
2031
+ }
2032
+ describeDatabaseEntities(request, optionsOrCallback, callback) {
2033
+ var _a;
2034
+ request = request || {};
2035
+ let options;
2036
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
2037
+ callback = optionsOrCallback;
2038
+ options = {};
2039
+ }
2040
+ else {
2041
+ options = optionsOrCallback;
2042
+ }
2043
+ options = options || {};
2044
+ options.otherArgs = options.otherArgs || {};
2045
+ options.otherArgs.headers = options.otherArgs.headers || {};
2046
+ options.otherArgs.headers['x-goog-request-params'] =
2047
+ this._gaxModule.routingHeader.fromParams({
2048
+ conversion_workspace: (_a = request.conversionWorkspace) !== null && _a !== void 0 ? _a : '',
2049
+ });
2050
+ this.initialize();
2051
+ return this.innerApiCalls.describeDatabaseEntities(request, options, callback);
2052
+ }
2053
+ /**
2054
+ * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
2055
+ * @param {Object} request
2056
+ * The request object that will be sent.
2057
+ * @param {string} request.conversionWorkspace
2058
+ * Required. Name of the conversion workspace resource whose database entities
2059
+ * are described. Must be in the form of:
2060
+ * projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
2061
+ * @param {number} request.pageSize
2062
+ * The maximum number of entities to return. The service may return
2063
+ * fewer entities than the value specifies.
2064
+ * @param {string} request.pageToken
2065
+ * The nextPageToken value received in the previous call to
2066
+ * conversionWorkspace.describeDatabaseEntities, used in the subsequent
2067
+ * request to retrieve the next page of results. On first call this should be
2068
+ * left blank. When paginating, all other parameters provided to
2069
+ * conversionWorkspace.describeDatabaseEntities must match the call that
2070
+ * provided the page token.
2071
+ * @param {google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest.DBTreeType} request.tree
2072
+ * The tree to fetch.
2073
+ * @param {boolean} request.uncommitted
2074
+ * Whether to retrieve the latest committed version of the entities or the
2075
+ * latest version. This field is ignored if a specific commit_id is specified.
2076
+ * @param {string} request.commitId
2077
+ * Request a specific commit ID. If not specified, the entities from the
2078
+ * latest commit are returned.
2079
+ * @param {string} request.filter
2080
+ * Filter the returned entities based on AIP-160 standard.
2081
+ * @param {object} [options]
2082
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2083
+ * @returns {Stream}
2084
+ * An object stream which emits an object representing {@link google.cloud.clouddms.v1.DatabaseEntity | DatabaseEntity} on 'data' event.
1097
2085
  * The client library will perform auto-pagination by default: it will call the API as many
1098
2086
  * times as needed. Note that it can affect your quota.
1099
- * We recommend using `listConnectionProfilesAsync()`
2087
+ * We recommend using `describeDatabaseEntitiesAsync()`
1100
2088
  * method described below for async iteration which you can stop as needed.
1101
2089
  * Please see the
1102
2090
  * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
1103
2091
  * for more details and examples.
1104
2092
  */
1105
- listConnectionProfilesStream(request, options) {
2093
+ describeDatabaseEntitiesStream(request, options) {
1106
2094
  var _a;
1107
2095
  request = request || {};
1108
2096
  options = options || {};
@@ -1110,58 +2098,57 @@ class DataMigrationServiceClient {
1110
2098
  options.otherArgs.headers = options.otherArgs.headers || {};
1111
2099
  options.otherArgs.headers['x-goog-request-params'] =
1112
2100
  this._gaxModule.routingHeader.fromParams({
1113
- parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
2101
+ conversion_workspace: (_a = request.conversionWorkspace) !== null && _a !== void 0 ? _a : '',
1114
2102
  });
1115
- const defaultCallSettings = this._defaults['listConnectionProfiles'];
2103
+ const defaultCallSettings = this._defaults['describeDatabaseEntities'];
1116
2104
  const callSettings = defaultCallSettings.merge(options);
1117
2105
  this.initialize();
1118
- return this.descriptors.page.listConnectionProfiles.createStream(this.innerApiCalls.listConnectionProfiles, request, callSettings);
2106
+ return this.descriptors.page.describeDatabaseEntities.createStream(this.innerApiCalls.describeDatabaseEntities, request, callSettings);
1119
2107
  }
1120
2108
  /**
1121
- * Equivalent to `listConnectionProfiles`, but returns an iterable object.
2109
+ * Equivalent to `describeDatabaseEntities`, but returns an iterable object.
1122
2110
  *
1123
2111
  * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
1124
2112
  * @param {Object} request
1125
2113
  * The request object that will be sent.
1126
- * @param {string} request.parent
1127
- * Required. The parent, which owns this collection of connection profiles.
2114
+ * @param {string} request.conversionWorkspace
2115
+ * Required. Name of the conversion workspace resource whose database entities
2116
+ * are described. Must be in the form of:
2117
+ * projects/{project}/locations/{location}/conversionWorkspaces/{conversion_workspace}.
1128
2118
  * @param {number} request.pageSize
1129
- * The maximum number of connection profiles to return. The service may return
1130
- * fewer than this value. If unspecified, at most 50 connection profiles will
1131
- * be returned. The maximum value is 1000; values above 1000 will be coerced
1132
- * to 1000.
2119
+ * The maximum number of entities to return. The service may return
2120
+ * fewer entities than the value specifies.
1133
2121
  * @param {string} request.pageToken
1134
- * A page token, received from a previous `ListConnectionProfiles` call.
1135
- * Provide this to retrieve the subsequent page.
1136
- *
1137
- * When paginating, all other parameters provided to `ListConnectionProfiles`
1138
- * must match the call that provided the page token.
2122
+ * The nextPageToken value received in the previous call to
2123
+ * conversionWorkspace.describeDatabaseEntities, used in the subsequent
2124
+ * request to retrieve the next page of results. On first call this should be
2125
+ * left blank. When paginating, all other parameters provided to
2126
+ * conversionWorkspace.describeDatabaseEntities must match the call that
2127
+ * provided the page token.
2128
+ * @param {google.cloud.clouddms.v1.DescribeDatabaseEntitiesRequest.DBTreeType} request.tree
2129
+ * The tree to fetch.
2130
+ * @param {boolean} request.uncommitted
2131
+ * Whether to retrieve the latest committed version of the entities or the
2132
+ * latest version. This field is ignored if a specific commit_id is specified.
2133
+ * @param {string} request.commitId
2134
+ * Request a specific commit ID. If not specified, the entities from the
2135
+ * latest commit are returned.
1139
2136
  * @param {string} request.filter
1140
- * A filter expression that filters connection profiles listed in the
1141
- * response. The expression must specify the field name, a comparison
1142
- * operator, and the value that you want to use for filtering. The value must
1143
- * be a string, a number, or a boolean. The comparison operator must be either
1144
- * =, !=, >, or <. For example, list connection profiles created this year by
1145
- * specifying **createTime %gt; 2020-01-01T00:00:00.000000000Z**. You can
1146
- * also filter nested fields. For example, you could specify **mySql.username
1147
- * = %lt;my_username%gt;** to list all connection profiles configured to
1148
- * connect with a specific username.
1149
- * @param {string} request.orderBy
1150
- * the order by fields for the result.
2137
+ * Filter the returned entities based on AIP-160 standard.
1151
2138
  * @param {object} [options]
1152
2139
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1153
2140
  * @returns {Object}
1154
2141
  * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).
1155
2142
  * When you iterate the returned iterable, each element will be an object representing
1156
- * {@link google.cloud.clouddms.v1.ConnectionProfile | ConnectionProfile}. The API will be called under the hood as needed, once per the page,
2143
+ * {@link google.cloud.clouddms.v1.DatabaseEntity | DatabaseEntity}. The API will be called under the hood as needed, once per the page,
1157
2144
  * so you can stop the iteration when you don't need more results.
1158
2145
  * Please see the
1159
2146
  * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
1160
2147
  * for more details and examples.
1161
- * @example <caption>include:samples/generated/v1/data_migration_service.list_connection_profiles.js</caption>
1162
- * region_tag:datamigration_v1_generated_DataMigrationService_ListConnectionProfiles_async
2148
+ * @example <caption>include:samples/generated/v1/data_migration_service.describe_database_entities.js</caption>
2149
+ * region_tag:datamigration_v1_generated_DataMigrationService_DescribeDatabaseEntities_async
1163
2150
  */
1164
- listConnectionProfilesAsync(request, options) {
2151
+ describeDatabaseEntitiesAsync(request, options) {
1165
2152
  var _a;
1166
2153
  request = request || {};
1167
2154
  options = options || {};
@@ -1169,12 +2156,392 @@ class DataMigrationServiceClient {
1169
2156
  options.otherArgs.headers = options.otherArgs.headers || {};
1170
2157
  options.otherArgs.headers['x-goog-request-params'] =
1171
2158
  this._gaxModule.routingHeader.fromParams({
1172
- parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
2159
+ conversion_workspace: (_a = request.conversionWorkspace) !== null && _a !== void 0 ? _a : '',
1173
2160
  });
1174
- const defaultCallSettings = this._defaults['listConnectionProfiles'];
2161
+ const defaultCallSettings = this._defaults['describeDatabaseEntities'];
1175
2162
  const callSettings = defaultCallSettings.merge(options);
1176
2163
  this.initialize();
1177
- return this.descriptors.page.listConnectionProfiles.asyncIterate(this.innerApiCalls['listConnectionProfiles'], request, callSettings);
2164
+ return this.descriptors.page.describeDatabaseEntities.asyncIterate(this.innerApiCalls['describeDatabaseEntities'], request, callSettings);
2165
+ }
2166
+ fetchStaticIps(request, optionsOrCallback, callback) {
2167
+ var _a;
2168
+ request = request || {};
2169
+ let options;
2170
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
2171
+ callback = optionsOrCallback;
2172
+ options = {};
2173
+ }
2174
+ else {
2175
+ options = optionsOrCallback;
2176
+ }
2177
+ options = options || {};
2178
+ options.otherArgs = options.otherArgs || {};
2179
+ options.otherArgs.headers = options.otherArgs.headers || {};
2180
+ options.otherArgs.headers['x-goog-request-params'] =
2181
+ this._gaxModule.routingHeader.fromParams({
2182
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
2183
+ });
2184
+ this.initialize();
2185
+ return this.innerApiCalls.fetchStaticIps(request, options, callback);
2186
+ }
2187
+ /**
2188
+ * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
2189
+ * @param {Object} request
2190
+ * The request object that will be sent.
2191
+ * @param {string} request.name
2192
+ * Required. The resource name for the location for which static IPs should be
2193
+ * returned. Must be in the format `projects/* /locations/*`.
2194
+ * @param {number} request.pageSize
2195
+ * Maximum number of IPs to return.
2196
+ * @param {string} request.pageToken
2197
+ * A page token, received from a previous `FetchStaticIps` call.
2198
+ * @param {object} [options]
2199
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2200
+ * @returns {Stream}
2201
+ * An object stream which emits an object representing string on 'data' event.
2202
+ * The client library will perform auto-pagination by default: it will call the API as many
2203
+ * times as needed. Note that it can affect your quota.
2204
+ * We recommend using `fetchStaticIpsAsync()`
2205
+ * method described below for async iteration which you can stop as needed.
2206
+ * Please see the
2207
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
2208
+ * for more details and examples.
2209
+ */
2210
+ fetchStaticIpsStream(request, options) {
2211
+ var _a;
2212
+ request = request || {};
2213
+ options = options || {};
2214
+ options.otherArgs = options.otherArgs || {};
2215
+ options.otherArgs.headers = options.otherArgs.headers || {};
2216
+ options.otherArgs.headers['x-goog-request-params'] =
2217
+ this._gaxModule.routingHeader.fromParams({
2218
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
2219
+ });
2220
+ const defaultCallSettings = this._defaults['fetchStaticIps'];
2221
+ const callSettings = defaultCallSettings.merge(options);
2222
+ this.initialize();
2223
+ return this.descriptors.page.fetchStaticIps.createStream(this.innerApiCalls.fetchStaticIps, request, callSettings);
2224
+ }
2225
+ /**
2226
+ * Equivalent to `fetchStaticIps`, but returns an iterable object.
2227
+ *
2228
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
2229
+ * @param {Object} request
2230
+ * The request object that will be sent.
2231
+ * @param {string} request.name
2232
+ * Required. The resource name for the location for which static IPs should be
2233
+ * returned. Must be in the format `projects/* /locations/*`.
2234
+ * @param {number} request.pageSize
2235
+ * Maximum number of IPs to return.
2236
+ * @param {string} request.pageToken
2237
+ * A page token, received from a previous `FetchStaticIps` call.
2238
+ * @param {object} [options]
2239
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2240
+ * @returns {Object}
2241
+ * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).
2242
+ * When you iterate the returned iterable, each element will be an object representing
2243
+ * string. The API will be called under the hood as needed, once per the page,
2244
+ * so you can stop the iteration when you don't need more results.
2245
+ * Please see the
2246
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
2247
+ * for more details and examples.
2248
+ * @example <caption>include:samples/generated/v1/data_migration_service.fetch_static_ips.js</caption>
2249
+ * region_tag:datamigration_v1_generated_DataMigrationService_FetchStaticIps_async
2250
+ */
2251
+ fetchStaticIpsAsync(request, options) {
2252
+ var _a;
2253
+ request = request || {};
2254
+ options = options || {};
2255
+ options.otherArgs = options.otherArgs || {};
2256
+ options.otherArgs.headers = options.otherArgs.headers || {};
2257
+ options.otherArgs.headers['x-goog-request-params'] =
2258
+ this._gaxModule.routingHeader.fromParams({
2259
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
2260
+ });
2261
+ const defaultCallSettings = this._defaults['fetchStaticIps'];
2262
+ const callSettings = defaultCallSettings.merge(options);
2263
+ this.initialize();
2264
+ return this.descriptors.page.fetchStaticIps.asyncIterate(this.innerApiCalls['fetchStaticIps'], request, callSettings);
2265
+ }
2266
+ /**
2267
+ * Gets the access control policy for a resource. Returns an empty policy
2268
+ * if the resource exists and does not have a policy set.
2269
+ *
2270
+ * @param {Object} request
2271
+ * The request object that will be sent.
2272
+ * @param {string} request.resource
2273
+ * REQUIRED: The resource for which the policy is being requested.
2274
+ * See the operation documentation for the appropriate value for this field.
2275
+ * @param {Object} [request.options]
2276
+ * OPTIONAL: A `GetPolicyOptions` object for specifying options to
2277
+ * `GetIamPolicy`. This field is only used by Cloud IAM.
2278
+ *
2279
+ * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}.
2280
+ * @param {Object} [options]
2281
+ * Optional parameters. You can override the default settings for this call, e.g, timeout,
2282
+ * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details.
2283
+ * @param {function(?Error, ?Object)} [callback]
2284
+ * The function which will be called with the result of the API call.
2285
+ *
2286
+ * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}.
2287
+ * @returns {Promise} - The promise which resolves to an array.
2288
+ * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}.
2289
+ * The promise has a method named "cancel" which cancels the ongoing API call.
2290
+ */
2291
+ getIamPolicy(request, options, callback) {
2292
+ return this.iamClient.getIamPolicy(request, options, callback);
2293
+ }
2294
+ /**
2295
+ * Returns permissions that a caller has on the specified resource. If the
2296
+ * resource does not exist, this will return an empty set of
2297
+ * permissions, not a NOT_FOUND error.
2298
+ *
2299
+ * Note: This operation is designed to be used for building
2300
+ * permission-aware UIs and command-line tools, not for authorization
2301
+ * checking. This operation may "fail open" without warning.
2302
+ *
2303
+ * @param {Object} request
2304
+ * The request object that will be sent.
2305
+ * @param {string} request.resource
2306
+ * REQUIRED: The resource for which the policy detail is being requested.
2307
+ * See the operation documentation for the appropriate value for this field.
2308
+ * @param {string[]} request.permissions
2309
+ * The set of permissions to check for the `resource`. Permissions with
2310
+ * wildcards (such as '*' or 'storage.*') are not allowed. For more
2311
+ * information see
2312
+ * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
2313
+ * @param {Object} [options]
2314
+ * Optional parameters. You can override the default settings for this call, e.g, timeout,
2315
+ * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details.
2316
+ * @param {function(?Error, ?Object)} [callback]
2317
+ * The function which will be called with the result of the API call.
2318
+ *
2319
+ * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}.
2320
+ * @returns {Promise} - The promise which resolves to an array.
2321
+ * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}.
2322
+ * The promise has a method named "cancel" which cancels the ongoing API call.
2323
+ */
2324
+ setIamPolicy(request, options, callback) {
2325
+ return this.iamClient.setIamPolicy(request, options, callback);
2326
+ }
2327
+ /**
2328
+ * Returns permissions that a caller has on the specified resource. If the
2329
+ * resource does not exist, this will return an empty set of
2330
+ * permissions, not a NOT_FOUND error.
2331
+ *
2332
+ * Note: This operation is designed to be used for building
2333
+ * permission-aware UIs and command-line tools, not for authorization
2334
+ * checking. This operation may "fail open" without warning.
2335
+ *
2336
+ * @param {Object} request
2337
+ * The request object that will be sent.
2338
+ * @param {string} request.resource
2339
+ * REQUIRED: The resource for which the policy detail is being requested.
2340
+ * See the operation documentation for the appropriate value for this field.
2341
+ * @param {string[]} request.permissions
2342
+ * The set of permissions to check for the `resource`. Permissions with
2343
+ * wildcards (such as '*' or 'storage.*') are not allowed. For more
2344
+ * information see
2345
+ * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
2346
+ * @param {Object} [options]
2347
+ * Optional parameters. You can override the default settings for this call, e.g, timeout,
2348
+ * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details.
2349
+ * @param {function(?Error, ?Object)} [callback]
2350
+ * The function which will be called with the result of the API call.
2351
+ *
2352
+ * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}.
2353
+ * @returns {Promise} - The promise which resolves to an array.
2354
+ * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}.
2355
+ * The promise has a method named "cancel" which cancels the ongoing API call.
2356
+ *
2357
+ */
2358
+ testIamPermissions(request, options, callback) {
2359
+ return this.iamClient.testIamPermissions(request, options, callback);
2360
+ }
2361
+ /**
2362
+ * Gets information about a location.
2363
+ *
2364
+ * @param {Object} request
2365
+ * The request object that will be sent.
2366
+ * @param {string} request.name
2367
+ * Resource name for the location.
2368
+ * @param {object} [options]
2369
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
2370
+ * @returns {Promise} - The promise which resolves to an array.
2371
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
2372
+ * Please see the
2373
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
2374
+ * for more details and examples.
2375
+ * @example
2376
+ * ```
2377
+ * const [response] = await client.getLocation(request);
2378
+ * ```
2379
+ */
2380
+ getLocation(request, options, callback) {
2381
+ return this.locationsClient.getLocation(request, options, callback);
2382
+ }
2383
+ /**
2384
+ * Lists information about the supported locations for this service. Returns an iterable object.
2385
+ *
2386
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
2387
+ * @param {Object} request
2388
+ * The request object that will be sent.
2389
+ * @param {string} request.name
2390
+ * The resource that owns the locations collection, if applicable.
2391
+ * @param {string} request.filter
2392
+ * The standard list filter.
2393
+ * @param {number} request.pageSize
2394
+ * The standard list page size.
2395
+ * @param {string} request.pageToken
2396
+ * The standard list page token.
2397
+ * @param {object} [options]
2398
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2399
+ * @returns {Object}
2400
+ * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).
2401
+ * When you iterate the returned iterable, each element will be an object representing
2402
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
2403
+ * so you can stop the iteration when you don't need more results.
2404
+ * Please see the
2405
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
2406
+ * for more details and examples.
2407
+ * @example
2408
+ * ```
2409
+ * const iterable = client.listLocationsAsync(request);
2410
+ * for await (const response of iterable) {
2411
+ * // process response
2412
+ * }
2413
+ * ```
2414
+ */
2415
+ listLocationsAsync(request, options) {
2416
+ return this.locationsClient.listLocationsAsync(request, options);
2417
+ }
2418
+ /**
2419
+ * Gets the latest state of a long-running operation. Clients can use this
2420
+ * method to poll the operation result at intervals as recommended by the API
2421
+ * service.
2422
+ *
2423
+ * @param {Object} request - The request object that will be sent.
2424
+ * @param {string} request.name - The name of the operation resource.
2425
+ * @param {Object=} options
2426
+ * Optional parameters. You can override the default settings for this call,
2427
+ * e.g, timeout, retries, paginations, etc. See {@link
2428
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
2429
+ * for the details.
2430
+ * @param {function(?Error, ?Object)=} callback
2431
+ * The function which will be called with the result of the API call.
2432
+ *
2433
+ * The second parameter to the callback is an object representing
2434
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
2435
+ * @return {Promise} - The promise which resolves to an array.
2436
+ * The first element of the array is an object representing
2437
+ * {@link google.longrunning.Operation | google.longrunning.Operation}.
2438
+ * The promise has a method named "cancel" which cancels the ongoing API call.
2439
+ *
2440
+ * @example
2441
+ * ```
2442
+ * const client = longrunning.operationsClient();
2443
+ * const name = '';
2444
+ * const [response] = await client.getOperation({name});
2445
+ * // doThingsWith(response)
2446
+ * ```
2447
+ */
2448
+ getOperation(request, options, callback) {
2449
+ return this.operationsClient.getOperation(request, options, callback);
2450
+ }
2451
+ /**
2452
+ * Lists operations that match the specified filter in the request. If the
2453
+ * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object.
2454
+ *
2455
+ * For-await-of syntax is used with the iterable to recursively get response element on-demand.
2456
+ *
2457
+ * @param {Object} request - The request object that will be sent.
2458
+ * @param {string} request.name - The name of the operation collection.
2459
+ * @param {string} request.filter - The standard list filter.
2460
+ * @param {number=} request.pageSize -
2461
+ * The maximum number of resources contained in the underlying API
2462
+ * response. If page streaming is performed per-resource, this
2463
+ * parameter does not affect the return value. If page streaming is
2464
+ * performed per-page, this determines the maximum number of
2465
+ * resources in a page.
2466
+ * @param {Object=} options
2467
+ * Optional parameters. You can override the default settings for this call,
2468
+ * e.g, timeout, retries, paginations, etc. See {@link
2469
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
2470
+ * details.
2471
+ * @returns {Object}
2472
+ * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}.
2473
+ *
2474
+ * @example
2475
+ * ```
2476
+ * const client = longrunning.operationsClient();
2477
+ * for await (const response of client.listOperationsAsync(request));
2478
+ * // doThingsWith(response)
2479
+ * ```
2480
+ */
2481
+ listOperationsAsync(request, options) {
2482
+ return this.operationsClient.listOperationsAsync(request, options);
2483
+ }
2484
+ /**
2485
+ * Starts asynchronous cancellation on a long-running operation. The server
2486
+ * makes a best effort to cancel the operation, but success is not
2487
+ * guaranteed. If the server doesn't support this method, it returns
2488
+ * `google.rpc.Code.UNIMPLEMENTED`. Clients can use
2489
+ * {@link Operations.GetOperation} or
2490
+ * other methods to check whether the cancellation succeeded or whether the
2491
+ * operation completed despite cancellation. On successful cancellation,
2492
+ * the operation is not deleted; instead, it becomes an operation with
2493
+ * an {@link Operation.error} value with a {@link google.rpc.Status.code} of
2494
+ * 1, corresponding to `Code.CANCELLED`.
2495
+ *
2496
+ * @param {Object} request - The request object that will be sent.
2497
+ * @param {string} request.name - The name of the operation resource to be cancelled.
2498
+ * @param {Object=} options
2499
+ * Optional parameters. You can override the default settings for this call,
2500
+ * e.g, timeout, retries, paginations, etc. See {@link
2501
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the
2502
+ * details.
2503
+ * @param {function(?Error)=} callback
2504
+ * The function which will be called with the result of the API call.
2505
+ * @return {Promise} - The promise which resolves when API call finishes.
2506
+ * The promise has a method named "cancel" which cancels the ongoing API
2507
+ * call.
2508
+ *
2509
+ * @example
2510
+ * ```
2511
+ * const client = longrunning.operationsClient();
2512
+ * await client.cancelOperation({name: ''});
2513
+ * ```
2514
+ */
2515
+ cancelOperation(request, options, callback) {
2516
+ return this.operationsClient.cancelOperation(request, options, callback);
2517
+ }
2518
+ /**
2519
+ * Deletes a long-running operation. This method indicates that the client is
2520
+ * no longer interested in the operation result. It does not cancel the
2521
+ * operation. If the server doesn't support this method, it returns
2522
+ * `google.rpc.Code.UNIMPLEMENTED`.
2523
+ *
2524
+ * @param {Object} request - The request object that will be sent.
2525
+ * @param {string} request.name - The name of the operation resource to be deleted.
2526
+ * @param {Object=} options
2527
+ * Optional parameters. You can override the default settings for this call,
2528
+ * e.g, timeout, retries, paginations, etc. See {@link
2529
+ * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
2530
+ * for the details.
2531
+ * @param {function(?Error)=} callback
2532
+ * The function which will be called with the result of the API call.
2533
+ * @return {Promise} - The promise which resolves when API call finishes.
2534
+ * The promise has a method named "cancel" which cancels the ongoing API
2535
+ * call.
2536
+ *
2537
+ * @example
2538
+ * ```
2539
+ * const client = longrunning.operationsClient();
2540
+ * await client.deleteOperation({name: ''});
2541
+ * ```
2542
+ */
2543
+ deleteOperation(request, options, callback) {
2544
+ return this.operationsClient.deleteOperation(request, options, callback);
1178
2545
  }
1179
2546
  // --------------------
1180
2547
  // -- Path templates --
@@ -1224,6 +2591,51 @@ class DataMigrationServiceClient {
1224
2591
  matchConnectionProfileFromConnectionProfileName(connectionProfileName) {
1225
2592
  return this.pathTemplates.connectionProfilePathTemplate.match(connectionProfileName).connection_profile;
1226
2593
  }
2594
+ /**
2595
+ * Return a fully-qualified conversionWorkspace resource name string.
2596
+ *
2597
+ * @param {string} project
2598
+ * @param {string} location
2599
+ * @param {string} conversion_workspace
2600
+ * @returns {string} Resource name string.
2601
+ */
2602
+ conversionWorkspacePath(project, location, conversionWorkspace) {
2603
+ return this.pathTemplates.conversionWorkspacePathTemplate.render({
2604
+ project: project,
2605
+ location: location,
2606
+ conversion_workspace: conversionWorkspace,
2607
+ });
2608
+ }
2609
+ /**
2610
+ * Parse the project from ConversionWorkspace resource.
2611
+ *
2612
+ * @param {string} conversionWorkspaceName
2613
+ * A fully-qualified path representing ConversionWorkspace resource.
2614
+ * @returns {string} A string representing the project.
2615
+ */
2616
+ matchProjectFromConversionWorkspaceName(conversionWorkspaceName) {
2617
+ return this.pathTemplates.conversionWorkspacePathTemplate.match(conversionWorkspaceName).project;
2618
+ }
2619
+ /**
2620
+ * Parse the location from ConversionWorkspace resource.
2621
+ *
2622
+ * @param {string} conversionWorkspaceName
2623
+ * A fully-qualified path representing ConversionWorkspace resource.
2624
+ * @returns {string} A string representing the location.
2625
+ */
2626
+ matchLocationFromConversionWorkspaceName(conversionWorkspaceName) {
2627
+ return this.pathTemplates.conversionWorkspacePathTemplate.match(conversionWorkspaceName).location;
2628
+ }
2629
+ /**
2630
+ * Parse the conversion_workspace from ConversionWorkspace resource.
2631
+ *
2632
+ * @param {string} conversionWorkspaceName
2633
+ * A fully-qualified path representing ConversionWorkspace resource.
2634
+ * @returns {string} A string representing the conversion_workspace.
2635
+ */
2636
+ matchConversionWorkspaceFromConversionWorkspaceName(conversionWorkspaceName) {
2637
+ return this.pathTemplates.conversionWorkspacePathTemplate.match(conversionWorkspaceName).conversion_workspace;
2638
+ }
1227
2639
  /**
1228
2640
  * Return a fully-qualified location resource name string.
1229
2641
  *
@@ -1305,6 +2717,51 @@ class DataMigrationServiceClient {
1305
2717
  return this.pathTemplates.migrationJobPathTemplate.match(migrationJobName)
1306
2718
  .migration_job;
1307
2719
  }
2720
+ /**
2721
+ * Return a fully-qualified privateConnection resource name string.
2722
+ *
2723
+ * @param {string} project
2724
+ * @param {string} location
2725
+ * @param {string} private_connection
2726
+ * @returns {string} Resource name string.
2727
+ */
2728
+ privateConnectionPath(project, location, privateConnection) {
2729
+ return this.pathTemplates.privateConnectionPathTemplate.render({
2730
+ project: project,
2731
+ location: location,
2732
+ private_connection: privateConnection,
2733
+ });
2734
+ }
2735
+ /**
2736
+ * Parse the project from PrivateConnection resource.
2737
+ *
2738
+ * @param {string} privateConnectionName
2739
+ * A fully-qualified path representing PrivateConnection resource.
2740
+ * @returns {string} A string representing the project.
2741
+ */
2742
+ matchProjectFromPrivateConnectionName(privateConnectionName) {
2743
+ return this.pathTemplates.privateConnectionPathTemplate.match(privateConnectionName).project;
2744
+ }
2745
+ /**
2746
+ * Parse the location from PrivateConnection resource.
2747
+ *
2748
+ * @param {string} privateConnectionName
2749
+ * A fully-qualified path representing PrivateConnection resource.
2750
+ * @returns {string} A string representing the location.
2751
+ */
2752
+ matchLocationFromPrivateConnectionName(privateConnectionName) {
2753
+ return this.pathTemplates.privateConnectionPathTemplate.match(privateConnectionName).location;
2754
+ }
2755
+ /**
2756
+ * Parse the private_connection from PrivateConnection resource.
2757
+ *
2758
+ * @param {string} privateConnectionName
2759
+ * A fully-qualified path representing PrivateConnection resource.
2760
+ * @returns {string} A string representing the private_connection.
2761
+ */
2762
+ matchPrivateConnectionFromPrivateConnectionName(privateConnectionName) {
2763
+ return this.pathTemplates.privateConnectionPathTemplate.match(privateConnectionName).private_connection;
2764
+ }
1308
2765
  /**
1309
2766
  * Return a fully-qualified project resource name string.
1310
2767
  *
@@ -1337,6 +2794,8 @@ class DataMigrationServiceClient {
1337
2794
  return this.dataMigrationServiceStub.then(stub => {
1338
2795
  this._terminated = true;
1339
2796
  stub.close();
2797
+ this.iamClient.close();
2798
+ this.locationsClient.close();
1340
2799
  this.operationsClient.close();
1341
2800
  });
1342
2801
  }