@google-cloud/dms 2.1.0 → 2.1.2

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.
@@ -1853,6 +1853,10 @@
1853
1853
  "syntax": {
1854
1854
  "type": "string",
1855
1855
  "id": 12
1856
+ },
1857
+ "edition": {
1858
+ "type": "string",
1859
+ "id": 13
1856
1860
  }
1857
1861
  }
1858
1862
  },
@@ -2680,6 +2684,19 @@
2680
2684
  "end": {
2681
2685
  "type": "int32",
2682
2686
  "id": 4
2687
+ },
2688
+ "semantic": {
2689
+ "type": "Semantic",
2690
+ "id": 5
2691
+ }
2692
+ },
2693
+ "nested": {
2694
+ "Semantic": {
2695
+ "values": {
2696
+ "NONE": 0,
2697
+ "SET": 1,
2698
+ "ALIAS": 2
2699
+ }
2683
2700
  }
2684
2701
  }
2685
2702
  }
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
- import * as gax from 'google-gax';
3
- import { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback } from 'google-gax';
2
+ import type * as gax from 'google-gax';
3
+ import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback } from 'google-gax';
4
4
  import { Transform } from 'stream';
5
5
  import * as protos from '../../protos/protos';
6
6
  /**
@@ -61,8 +61,15 @@ export declare class DataMigrationServiceClient {
61
61
  * Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
62
62
  * For more information, please check the
63
63
  * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
64
+ * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
65
+ * need to avoid loading the default gRPC version and want to use the fallback
66
+ * HTTP implementation. Load only fallback version and pass it to the constructor:
67
+ * ```
68
+ * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
69
+ * const client = new DataMigrationServiceClient({fallback: 'rest'}, gax);
70
+ * ```
64
71
  */
65
- constructor(opts?: ClientOptions);
72
+ constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
66
73
  /**
67
74
  * Initialize the client.
68
75
  * Performs asynchronous operations (such as authentication) and prepares the client.
@@ -18,8 +18,6 @@
18
18
  // ** All changes to this file may be overwritten. **
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
20
  exports.DataMigrationServiceClient = void 0;
21
- /* global window */
22
- const gax = require("google-gax");
23
21
  const jsonProtos = require("../../protos/protos.json");
24
22
  /**
25
23
  * Client JSON configuration object, loaded from
@@ -27,7 +25,6 @@ const jsonProtos = require("../../protos/protos.json");
27
25
  * This file defines retry strategy and timeouts for all API methods in this library.
28
26
  */
29
27
  const gapicConfig = require("./data_migration_service_client_config.json");
30
- const google_gax_1 = require("google-gax");
31
28
  const version = require('../../../package.json').version;
32
29
  /**
33
30
  * Database Migration service
@@ -67,8 +64,15 @@ class DataMigrationServiceClient {
67
64
  * Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
68
65
  * For more information, please check the
69
66
  * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
67
+ * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
68
+ * need to avoid loading the default gRPC version and want to use the fallback
69
+ * HTTP implementation. Load only fallback version and pass it to the constructor:
70
+ * ```
71
+ * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
72
+ * const client = new DataMigrationServiceClient({fallback: 'rest'}, gax);
73
+ * ```
70
74
  */
71
- constructor(opts) {
75
+ constructor(opts, gaxInstance) {
72
76
  var _a, _b;
73
77
  this._terminated = false;
74
78
  this.descriptors = {
@@ -89,8 +93,12 @@ class DataMigrationServiceClient {
89
93
  if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) {
90
94
  opts['scopes'] = staticMembers.scopes;
91
95
  }
96
+ // Load google-gax module synchronously if needed
97
+ if (!gaxInstance) {
98
+ gaxInstance = require('google-gax');
99
+ }
92
100
  // Choose either gRPC or proto-over-HTTP implementation of google-gax.
93
- this._gaxModule = opts.fallback ? gax.fallback : gax;
101
+ this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance;
94
102
  // Create a `gaxGrpc` object, with any grpc-specific options sent to the client.
95
103
  this._gaxGrpc = new this._gaxModule.GrpcClient(opts);
96
104
  // Save options to use in initialize() method.
@@ -257,7 +265,7 @@ class DataMigrationServiceClient {
257
265
  // merely providing the destination and request information.
258
266
  this.innerApiCalls = {};
259
267
  // Add a warn function to the client constructor so it can be easily tested.
260
- this.warn = gax.warn;
268
+ this.warn = this._gaxModule.warn;
261
269
  }
262
270
  /**
263
271
  * Initialize the client.
@@ -315,7 +323,7 @@ class DataMigrationServiceClient {
315
323
  const descriptor = this.descriptors.page[methodName] ||
316
324
  this.descriptors.longrunning[methodName] ||
317
325
  undefined;
318
- const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor);
326
+ const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
319
327
  this.innerApiCalls[methodName] = apiCall;
320
328
  }
321
329
  return this.dataMigrationServiceStub;
@@ -362,6 +370,7 @@ class DataMigrationServiceClient {
362
370
  return this.auth.getProjectId();
363
371
  }
364
372
  getMigrationJob(request, optionsOrCallback, callback) {
373
+ var _a;
365
374
  request = request || {};
366
375
  let options;
367
376
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -375,13 +384,14 @@ class DataMigrationServiceClient {
375
384
  options.otherArgs = options.otherArgs || {};
376
385
  options.otherArgs.headers = options.otherArgs.headers || {};
377
386
  options.otherArgs.headers['x-goog-request-params'] =
378
- gax.routingHeader.fromParams({
379
- name: request.name || '',
387
+ this._gaxModule.routingHeader.fromParams({
388
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
380
389
  });
381
390
  this.initialize();
382
391
  return this.innerApiCalls.getMigrationJob(request, options, callback);
383
392
  }
384
393
  generateSshScript(request, optionsOrCallback, callback) {
394
+ var _a;
385
395
  request = request || {};
386
396
  let options;
387
397
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -395,13 +405,14 @@ class DataMigrationServiceClient {
395
405
  options.otherArgs = options.otherArgs || {};
396
406
  options.otherArgs.headers = options.otherArgs.headers || {};
397
407
  options.otherArgs.headers['x-goog-request-params'] =
398
- gax.routingHeader.fromParams({
399
- migration_job: request.migrationJob || '',
408
+ this._gaxModule.routingHeader.fromParams({
409
+ migration_job: (_a = request.migrationJob) !== null && _a !== void 0 ? _a : '',
400
410
  });
401
411
  this.initialize();
402
412
  return this.innerApiCalls.generateSshScript(request, options, callback);
403
413
  }
404
414
  getConnectionProfile(request, optionsOrCallback, callback) {
415
+ var _a;
405
416
  request = request || {};
406
417
  let options;
407
418
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -415,13 +426,14 @@ class DataMigrationServiceClient {
415
426
  options.otherArgs = options.otherArgs || {};
416
427
  options.otherArgs.headers = options.otherArgs.headers || {};
417
428
  options.otherArgs.headers['x-goog-request-params'] =
418
- gax.routingHeader.fromParams({
419
- name: request.name || '',
429
+ this._gaxModule.routingHeader.fromParams({
430
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
420
431
  });
421
432
  this.initialize();
422
433
  return this.innerApiCalls.getConnectionProfile(request, options, callback);
423
434
  }
424
435
  createMigrationJob(request, optionsOrCallback, callback) {
436
+ var _a;
425
437
  request = request || {};
426
438
  let options;
427
439
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -435,8 +447,8 @@ class DataMigrationServiceClient {
435
447
  options.otherArgs = options.otherArgs || {};
436
448
  options.otherArgs.headers = options.otherArgs.headers || {};
437
449
  options.otherArgs.headers['x-goog-request-params'] =
438
- gax.routingHeader.fromParams({
439
- parent: request.parent || '',
450
+ this._gaxModule.routingHeader.fromParams({
451
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
440
452
  });
441
453
  this.initialize();
442
454
  return this.innerApiCalls.createMigrationJob(request, options, callback);
@@ -454,12 +466,13 @@ class DataMigrationServiceClient {
454
466
  * region_tag:datamigration_v1_generated_DataMigrationService_CreateMigrationJob_async
455
467
  */
456
468
  async checkCreateMigrationJobProgress(name) {
457
- const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
469
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
458
470
  const [operation] = await this.operationsClient.getOperation(request);
459
- const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.createMigrationJob, gax.createDefaultBackoffSettings());
471
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createMigrationJob, this._gaxModule.createDefaultBackoffSettings());
460
472
  return decodeOperation;
461
473
  }
462
474
  updateMigrationJob(request, optionsOrCallback, callback) {
475
+ var _a;
463
476
  request = request || {};
464
477
  let options;
465
478
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -473,8 +486,8 @@ class DataMigrationServiceClient {
473
486
  options.otherArgs = options.otherArgs || {};
474
487
  options.otherArgs.headers = options.otherArgs.headers || {};
475
488
  options.otherArgs.headers['x-goog-request-params'] =
476
- gax.routingHeader.fromParams({
477
- 'migration_job.name': request.migrationJob.name || '',
489
+ this._gaxModule.routingHeader.fromParams({
490
+ 'migration_job.name': (_a = request.migrationJob.name) !== null && _a !== void 0 ? _a : '',
478
491
  });
479
492
  this.initialize();
480
493
  return this.innerApiCalls.updateMigrationJob(request, options, callback);
@@ -492,12 +505,13 @@ class DataMigrationServiceClient {
492
505
  * region_tag:datamigration_v1_generated_DataMigrationService_UpdateMigrationJob_async
493
506
  */
494
507
  async checkUpdateMigrationJobProgress(name) {
495
- const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
508
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
496
509
  const [operation] = await this.operationsClient.getOperation(request);
497
- const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.updateMigrationJob, gax.createDefaultBackoffSettings());
510
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateMigrationJob, this._gaxModule.createDefaultBackoffSettings());
498
511
  return decodeOperation;
499
512
  }
500
513
  deleteMigrationJob(request, optionsOrCallback, callback) {
514
+ var _a;
501
515
  request = request || {};
502
516
  let options;
503
517
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -511,8 +525,8 @@ class DataMigrationServiceClient {
511
525
  options.otherArgs = options.otherArgs || {};
512
526
  options.otherArgs.headers = options.otherArgs.headers || {};
513
527
  options.otherArgs.headers['x-goog-request-params'] =
514
- gax.routingHeader.fromParams({
515
- name: request.name || '',
528
+ this._gaxModule.routingHeader.fromParams({
529
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
516
530
  });
517
531
  this.initialize();
518
532
  return this.innerApiCalls.deleteMigrationJob(request, options, callback);
@@ -530,12 +544,13 @@ class DataMigrationServiceClient {
530
544
  * region_tag:datamigration_v1_generated_DataMigrationService_DeleteMigrationJob_async
531
545
  */
532
546
  async checkDeleteMigrationJobProgress(name) {
533
- const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
547
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
534
548
  const [operation] = await this.operationsClient.getOperation(request);
535
- const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.deleteMigrationJob, gax.createDefaultBackoffSettings());
549
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteMigrationJob, this._gaxModule.createDefaultBackoffSettings());
536
550
  return decodeOperation;
537
551
  }
538
552
  startMigrationJob(request, optionsOrCallback, callback) {
553
+ var _a;
539
554
  request = request || {};
540
555
  let options;
541
556
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -549,8 +564,8 @@ class DataMigrationServiceClient {
549
564
  options.otherArgs = options.otherArgs || {};
550
565
  options.otherArgs.headers = options.otherArgs.headers || {};
551
566
  options.otherArgs.headers['x-goog-request-params'] =
552
- gax.routingHeader.fromParams({
553
- name: request.name || '',
567
+ this._gaxModule.routingHeader.fromParams({
568
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
554
569
  });
555
570
  this.initialize();
556
571
  return this.innerApiCalls.startMigrationJob(request, options, callback);
@@ -568,12 +583,13 @@ class DataMigrationServiceClient {
568
583
  * region_tag:datamigration_v1_generated_DataMigrationService_StartMigrationJob_async
569
584
  */
570
585
  async checkStartMigrationJobProgress(name) {
571
- const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
586
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
572
587
  const [operation] = await this.operationsClient.getOperation(request);
573
- const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.startMigrationJob, gax.createDefaultBackoffSettings());
588
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.startMigrationJob, this._gaxModule.createDefaultBackoffSettings());
574
589
  return decodeOperation;
575
590
  }
576
591
  stopMigrationJob(request, optionsOrCallback, callback) {
592
+ var _a;
577
593
  request = request || {};
578
594
  let options;
579
595
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -587,8 +603,8 @@ class DataMigrationServiceClient {
587
603
  options.otherArgs = options.otherArgs || {};
588
604
  options.otherArgs.headers = options.otherArgs.headers || {};
589
605
  options.otherArgs.headers['x-goog-request-params'] =
590
- gax.routingHeader.fromParams({
591
- name: request.name || '',
606
+ this._gaxModule.routingHeader.fromParams({
607
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
592
608
  });
593
609
  this.initialize();
594
610
  return this.innerApiCalls.stopMigrationJob(request, options, callback);
@@ -606,12 +622,13 @@ class DataMigrationServiceClient {
606
622
  * region_tag:datamigration_v1_generated_DataMigrationService_StopMigrationJob_async
607
623
  */
608
624
  async checkStopMigrationJobProgress(name) {
609
- const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
625
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
610
626
  const [operation] = await this.operationsClient.getOperation(request);
611
- const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.stopMigrationJob, gax.createDefaultBackoffSettings());
627
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.stopMigrationJob, this._gaxModule.createDefaultBackoffSettings());
612
628
  return decodeOperation;
613
629
  }
614
630
  resumeMigrationJob(request, optionsOrCallback, callback) {
631
+ var _a;
615
632
  request = request || {};
616
633
  let options;
617
634
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -625,8 +642,8 @@ class DataMigrationServiceClient {
625
642
  options.otherArgs = options.otherArgs || {};
626
643
  options.otherArgs.headers = options.otherArgs.headers || {};
627
644
  options.otherArgs.headers['x-goog-request-params'] =
628
- gax.routingHeader.fromParams({
629
- name: request.name || '',
645
+ this._gaxModule.routingHeader.fromParams({
646
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
630
647
  });
631
648
  this.initialize();
632
649
  return this.innerApiCalls.resumeMigrationJob(request, options, callback);
@@ -644,12 +661,13 @@ class DataMigrationServiceClient {
644
661
  * region_tag:datamigration_v1_generated_DataMigrationService_ResumeMigrationJob_async
645
662
  */
646
663
  async checkResumeMigrationJobProgress(name) {
647
- const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
664
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
648
665
  const [operation] = await this.operationsClient.getOperation(request);
649
- const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.resumeMigrationJob, gax.createDefaultBackoffSettings());
666
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.resumeMigrationJob, this._gaxModule.createDefaultBackoffSettings());
650
667
  return decodeOperation;
651
668
  }
652
669
  promoteMigrationJob(request, optionsOrCallback, callback) {
670
+ var _a;
653
671
  request = request || {};
654
672
  let options;
655
673
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -663,8 +681,8 @@ class DataMigrationServiceClient {
663
681
  options.otherArgs = options.otherArgs || {};
664
682
  options.otherArgs.headers = options.otherArgs.headers || {};
665
683
  options.otherArgs.headers['x-goog-request-params'] =
666
- gax.routingHeader.fromParams({
667
- name: request.name || '',
684
+ this._gaxModule.routingHeader.fromParams({
685
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
668
686
  });
669
687
  this.initialize();
670
688
  return this.innerApiCalls.promoteMigrationJob(request, options, callback);
@@ -682,12 +700,13 @@ class DataMigrationServiceClient {
682
700
  * region_tag:datamigration_v1_generated_DataMigrationService_PromoteMigrationJob_async
683
701
  */
684
702
  async checkPromoteMigrationJobProgress(name) {
685
- const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
703
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
686
704
  const [operation] = await this.operationsClient.getOperation(request);
687
- const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.promoteMigrationJob, gax.createDefaultBackoffSettings());
705
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.promoteMigrationJob, this._gaxModule.createDefaultBackoffSettings());
688
706
  return decodeOperation;
689
707
  }
690
708
  verifyMigrationJob(request, optionsOrCallback, callback) {
709
+ var _a;
691
710
  request = request || {};
692
711
  let options;
693
712
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -701,8 +720,8 @@ class DataMigrationServiceClient {
701
720
  options.otherArgs = options.otherArgs || {};
702
721
  options.otherArgs.headers = options.otherArgs.headers || {};
703
722
  options.otherArgs.headers['x-goog-request-params'] =
704
- gax.routingHeader.fromParams({
705
- name: request.name || '',
723
+ this._gaxModule.routingHeader.fromParams({
724
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
706
725
  });
707
726
  this.initialize();
708
727
  return this.innerApiCalls.verifyMigrationJob(request, options, callback);
@@ -720,12 +739,13 @@ class DataMigrationServiceClient {
720
739
  * region_tag:datamigration_v1_generated_DataMigrationService_VerifyMigrationJob_async
721
740
  */
722
741
  async checkVerifyMigrationJobProgress(name) {
723
- const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
742
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
724
743
  const [operation] = await this.operationsClient.getOperation(request);
725
- const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.verifyMigrationJob, gax.createDefaultBackoffSettings());
744
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.verifyMigrationJob, this._gaxModule.createDefaultBackoffSettings());
726
745
  return decodeOperation;
727
746
  }
728
747
  restartMigrationJob(request, optionsOrCallback, callback) {
748
+ var _a;
729
749
  request = request || {};
730
750
  let options;
731
751
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -739,8 +759,8 @@ class DataMigrationServiceClient {
739
759
  options.otherArgs = options.otherArgs || {};
740
760
  options.otherArgs.headers = options.otherArgs.headers || {};
741
761
  options.otherArgs.headers['x-goog-request-params'] =
742
- gax.routingHeader.fromParams({
743
- name: request.name || '',
762
+ this._gaxModule.routingHeader.fromParams({
763
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
744
764
  });
745
765
  this.initialize();
746
766
  return this.innerApiCalls.restartMigrationJob(request, options, callback);
@@ -758,12 +778,13 @@ class DataMigrationServiceClient {
758
778
  * region_tag:datamigration_v1_generated_DataMigrationService_RestartMigrationJob_async
759
779
  */
760
780
  async checkRestartMigrationJobProgress(name) {
761
- const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
781
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
762
782
  const [operation] = await this.operationsClient.getOperation(request);
763
- const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.restartMigrationJob, gax.createDefaultBackoffSettings());
783
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.restartMigrationJob, this._gaxModule.createDefaultBackoffSettings());
764
784
  return decodeOperation;
765
785
  }
766
786
  createConnectionProfile(request, optionsOrCallback, callback) {
787
+ var _a;
767
788
  request = request || {};
768
789
  let options;
769
790
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -777,8 +798,8 @@ class DataMigrationServiceClient {
777
798
  options.otherArgs = options.otherArgs || {};
778
799
  options.otherArgs.headers = options.otherArgs.headers || {};
779
800
  options.otherArgs.headers['x-goog-request-params'] =
780
- gax.routingHeader.fromParams({
781
- parent: request.parent || '',
801
+ this._gaxModule.routingHeader.fromParams({
802
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
782
803
  });
783
804
  this.initialize();
784
805
  return this.innerApiCalls.createConnectionProfile(request, options, callback);
@@ -796,12 +817,13 @@ class DataMigrationServiceClient {
796
817
  * region_tag:datamigration_v1_generated_DataMigrationService_CreateConnectionProfile_async
797
818
  */
798
819
  async checkCreateConnectionProfileProgress(name) {
799
- const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
820
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
800
821
  const [operation] = await this.operationsClient.getOperation(request);
801
- const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.createConnectionProfile, gax.createDefaultBackoffSettings());
822
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createConnectionProfile, this._gaxModule.createDefaultBackoffSettings());
802
823
  return decodeOperation;
803
824
  }
804
825
  updateConnectionProfile(request, optionsOrCallback, callback) {
826
+ var _a;
805
827
  request = request || {};
806
828
  let options;
807
829
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -815,8 +837,8 @@ class DataMigrationServiceClient {
815
837
  options.otherArgs = options.otherArgs || {};
816
838
  options.otherArgs.headers = options.otherArgs.headers || {};
817
839
  options.otherArgs.headers['x-goog-request-params'] =
818
- gax.routingHeader.fromParams({
819
- 'connection_profile.name': request.connectionProfile.name || '',
840
+ this._gaxModule.routingHeader.fromParams({
841
+ 'connection_profile.name': (_a = request.connectionProfile.name) !== null && _a !== void 0 ? _a : '',
820
842
  });
821
843
  this.initialize();
822
844
  return this.innerApiCalls.updateConnectionProfile(request, options, callback);
@@ -834,12 +856,13 @@ class DataMigrationServiceClient {
834
856
  * region_tag:datamigration_v1_generated_DataMigrationService_UpdateConnectionProfile_async
835
857
  */
836
858
  async checkUpdateConnectionProfileProgress(name) {
837
- const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
859
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
838
860
  const [operation] = await this.operationsClient.getOperation(request);
839
- const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.updateConnectionProfile, gax.createDefaultBackoffSettings());
861
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateConnectionProfile, this._gaxModule.createDefaultBackoffSettings());
840
862
  return decodeOperation;
841
863
  }
842
864
  deleteConnectionProfile(request, optionsOrCallback, callback) {
865
+ var _a;
843
866
  request = request || {};
844
867
  let options;
845
868
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -853,8 +876,8 @@ class DataMigrationServiceClient {
853
876
  options.otherArgs = options.otherArgs || {};
854
877
  options.otherArgs.headers = options.otherArgs.headers || {};
855
878
  options.otherArgs.headers['x-goog-request-params'] =
856
- gax.routingHeader.fromParams({
857
- name: request.name || '',
879
+ this._gaxModule.routingHeader.fromParams({
880
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
858
881
  });
859
882
  this.initialize();
860
883
  return this.innerApiCalls.deleteConnectionProfile(request, options, callback);
@@ -872,12 +895,13 @@ class DataMigrationServiceClient {
872
895
  * region_tag:datamigration_v1_generated_DataMigrationService_DeleteConnectionProfile_async
873
896
  */
874
897
  async checkDeleteConnectionProfileProgress(name) {
875
- const request = new google_gax_1.operationsProtos.google.longrunning.GetOperationRequest({ name });
898
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
876
899
  const [operation] = await this.operationsClient.getOperation(request);
877
- const decodeOperation = new gax.Operation(operation, this.descriptors.longrunning.deleteConnectionProfile, gax.createDefaultBackoffSettings());
900
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteConnectionProfile, this._gaxModule.createDefaultBackoffSettings());
878
901
  return decodeOperation;
879
902
  }
880
903
  listMigrationJobs(request, optionsOrCallback, callback) {
904
+ var _a;
881
905
  request = request || {};
882
906
  let options;
883
907
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -891,8 +915,8 @@ class DataMigrationServiceClient {
891
915
  options.otherArgs = options.otherArgs || {};
892
916
  options.otherArgs.headers = options.otherArgs.headers || {};
893
917
  options.otherArgs.headers['x-goog-request-params'] =
894
- gax.routingHeader.fromParams({
895
- parent: request.parent || '',
918
+ this._gaxModule.routingHeader.fromParams({
919
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
896
920
  });
897
921
  this.initialize();
898
922
  return this.innerApiCalls.listMigrationJobs(request, options, callback);
@@ -940,13 +964,14 @@ class DataMigrationServiceClient {
940
964
  * for more details and examples.
941
965
  */
942
966
  listMigrationJobsStream(request, options) {
967
+ var _a;
943
968
  request = request || {};
944
969
  options = options || {};
945
970
  options.otherArgs = options.otherArgs || {};
946
971
  options.otherArgs.headers = options.otherArgs.headers || {};
947
972
  options.otherArgs.headers['x-goog-request-params'] =
948
- gax.routingHeader.fromParams({
949
- parent: request.parent || '',
973
+ this._gaxModule.routingHeader.fromParams({
974
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
950
975
  });
951
976
  const defaultCallSettings = this._defaults['listMigrationJobs'];
952
977
  const callSettings = defaultCallSettings.merge(options);
@@ -999,13 +1024,14 @@ class DataMigrationServiceClient {
999
1024
  * region_tag:datamigration_v1_generated_DataMigrationService_ListMigrationJobs_async
1000
1025
  */
1001
1026
  listMigrationJobsAsync(request, options) {
1027
+ var _a;
1002
1028
  request = request || {};
1003
1029
  options = options || {};
1004
1030
  options.otherArgs = options.otherArgs || {};
1005
1031
  options.otherArgs.headers = options.otherArgs.headers || {};
1006
1032
  options.otherArgs.headers['x-goog-request-params'] =
1007
- gax.routingHeader.fromParams({
1008
- parent: request.parent || '',
1033
+ this._gaxModule.routingHeader.fromParams({
1034
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
1009
1035
  });
1010
1036
  const defaultCallSettings = this._defaults['listMigrationJobs'];
1011
1037
  const callSettings = defaultCallSettings.merge(options);
@@ -1013,6 +1039,7 @@ class DataMigrationServiceClient {
1013
1039
  return this.descriptors.page.listMigrationJobs.asyncIterate(this.innerApiCalls['listMigrationJobs'], request, callSettings);
1014
1040
  }
1015
1041
  listConnectionProfiles(request, optionsOrCallback, callback) {
1042
+ var _a;
1016
1043
  request = request || {};
1017
1044
  let options;
1018
1045
  if (typeof optionsOrCallback === 'function' && callback === undefined) {
@@ -1026,8 +1053,8 @@ class DataMigrationServiceClient {
1026
1053
  options.otherArgs = options.otherArgs || {};
1027
1054
  options.otherArgs.headers = options.otherArgs.headers || {};
1028
1055
  options.otherArgs.headers['x-goog-request-params'] =
1029
- gax.routingHeader.fromParams({
1030
- parent: request.parent || '',
1056
+ this._gaxModule.routingHeader.fromParams({
1057
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
1031
1058
  });
1032
1059
  this.initialize();
1033
1060
  return this.innerApiCalls.listConnectionProfiles(request, options, callback);
@@ -1074,13 +1101,14 @@ class DataMigrationServiceClient {
1074
1101
  * for more details and examples.
1075
1102
  */
1076
1103
  listConnectionProfilesStream(request, options) {
1104
+ var _a;
1077
1105
  request = request || {};
1078
1106
  options = options || {};
1079
1107
  options.otherArgs = options.otherArgs || {};
1080
1108
  options.otherArgs.headers = options.otherArgs.headers || {};
1081
1109
  options.otherArgs.headers['x-goog-request-params'] =
1082
- gax.routingHeader.fromParams({
1083
- parent: request.parent || '',
1110
+ this._gaxModule.routingHeader.fromParams({
1111
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
1084
1112
  });
1085
1113
  const defaultCallSettings = this._defaults['listConnectionProfiles'];
1086
1114
  const callSettings = defaultCallSettings.merge(options);
@@ -1132,13 +1160,14 @@ class DataMigrationServiceClient {
1132
1160
  * region_tag:datamigration_v1_generated_DataMigrationService_ListConnectionProfiles_async
1133
1161
  */
1134
1162
  listConnectionProfilesAsync(request, options) {
1163
+ var _a;
1135
1164
  request = request || {};
1136
1165
  options = options || {};
1137
1166
  options.otherArgs = options.otherArgs || {};
1138
1167
  options.otherArgs.headers = options.otherArgs.headers || {};
1139
1168
  options.otherArgs.headers['x-goog-request-params'] =
1140
- gax.routingHeader.fromParams({
1141
- parent: request.parent || '',
1169
+ this._gaxModule.routingHeader.fromParams({
1170
+ parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
1142
1171
  });
1143
1172
  const defaultCallSettings = this._defaults['listConnectionProfiles'];
1144
1173
  const callSettings = defaultCallSettings.merge(options);