@google-cloud/dlp 3.2.0 → 3.4.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.
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // Copyright 2021 Google LLC
2
+ // Copyright 2022 Google LLC
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License");
5
5
  // you may not use this file except in compliance with the License.
@@ -293,59 +293,6 @@ class DlpServiceClient {
293
293
  }
294
294
  return this.auth.getProjectId();
295
295
  }
296
- /**
297
- * Finds potentially sensitive info in content.
298
- * This method has limits on input size, processing time, and output size.
299
- *
300
- * When no InfoTypes or CustomInfoTypes are specified in this request, the
301
- * system will automatically choose what detectors to run. By default this may
302
- * be all types, but may change over time as detectors are updated.
303
- *
304
- * For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images
305
- * and https://cloud.google.com/dlp/docs/inspecting-text,
306
- *
307
- * @param {Object} request
308
- * The request object that will be sent.
309
- * @param {string} request.parent
310
- * Parent resource name.
311
- *
312
- * The format of this value varies depending on whether you have [specified a
313
- * processing
314
- * location](https://cloud.google.com/dlp/docs/specifying-location):
315
- *
316
- * + Projects scope, location specified:<br/>
317
- * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
318
- * + Projects scope, no location specified (defaults to global):<br/>
319
- * `projects/`<var>PROJECT_ID</var>
320
- *
321
- * The following example `parent` string specifies a parent project with the
322
- * identifier `example-project`, and specifies the `europe-west3` location
323
- * for processing data:
324
- *
325
- * parent=projects/example-project/locations/europe-west3
326
- * @param {google.privacy.dlp.v2.InspectConfig} request.inspectConfig
327
- * Configuration for the inspector. What specified here will override
328
- * the template referenced by the inspect_template_name argument.
329
- * @param {google.privacy.dlp.v2.ContentItem} request.item
330
- * The item to inspect.
331
- * @param {string} request.inspectTemplateName
332
- * Template to use. Any configuration directly specified in
333
- * inspect_config will override those set in the template. Singular fields
334
- * that are set in this request will replace their corresponding fields in the
335
- * template. Repeated fields are appended. Singular sub-messages and groups
336
- * are recursively merged.
337
- * @param {string} request.locationId
338
- * Deprecated. This field has no effect.
339
- * @param {object} [options]
340
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
341
- * @returns {Promise} - The promise which resolves to an array.
342
- * The first element of the array is an object representing [InspectContentResponse]{@link google.privacy.dlp.v2.InspectContentResponse}.
343
- * Please see the
344
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
345
- * for more details and examples.
346
- * @example
347
- * const [response] = await client.inspectContent(request);
348
- */
349
296
  inspectContent(request, optionsOrCallback, callback) {
350
297
  request = request || {};
351
298
  let options;
@@ -366,56 +313,6 @@ class DlpServiceClient {
366
313
  this.initialize();
367
314
  return this.innerApiCalls.inspectContent(request, options, callback);
368
315
  }
369
- /**
370
- * Redacts potentially sensitive info from an image.
371
- * This method has limits on input size, processing time, and output size.
372
- * See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to
373
- * learn more.
374
- *
375
- * When no InfoTypes or CustomInfoTypes are specified in this request, the
376
- * system will automatically choose what detectors to run. By default this may
377
- * be all types, but may change over time as detectors are updated.
378
- *
379
- * @param {Object} request
380
- * The request object that will be sent.
381
- * @param {string} request.parent
382
- * Parent resource name.
383
- *
384
- * The format of this value varies depending on whether you have [specified a
385
- * processing
386
- * location](https://cloud.google.com/dlp/docs/specifying-location):
387
- *
388
- * + Projects scope, location specified:<br/>
389
- * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
390
- * + Projects scope, no location specified (defaults to global):<br/>
391
- * `projects/`<var>PROJECT_ID</var>
392
- *
393
- * The following example `parent` string specifies a parent project with the
394
- * identifier `example-project`, and specifies the `europe-west3` location
395
- * for processing data:
396
- *
397
- * parent=projects/example-project/locations/europe-west3
398
- * @param {string} request.locationId
399
- * Deprecated. This field has no effect.
400
- * @param {google.privacy.dlp.v2.InspectConfig} request.inspectConfig
401
- * Configuration for the inspector.
402
- * @param {number[]} request.imageRedactionConfigs
403
- * The configuration for specifying what content to redact from images.
404
- * @param {boolean} request.includeFindings
405
- * Whether the response should include findings along with the redacted
406
- * image.
407
- * @param {google.privacy.dlp.v2.ByteContentItem} request.byteItem
408
- * The content must be PNG, JPEG, SVG or BMP.
409
- * @param {object} [options]
410
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
411
- * @returns {Promise} - The promise which resolves to an array.
412
- * The first element of the array is an object representing [RedactImageResponse]{@link google.privacy.dlp.v2.RedactImageResponse}.
413
- * Please see the
414
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
415
- * for more details and examples.
416
- * @example
417
- * const [response] = await client.redactImage(request);
418
- */
419
316
  redactImage(request, optionsOrCallback, callback) {
420
317
  request = request || {};
421
318
  let options;
@@ -436,69 +333,6 @@ class DlpServiceClient {
436
333
  this.initialize();
437
334
  return this.innerApiCalls.redactImage(request, options, callback);
438
335
  }
439
- /**
440
- * De-identifies potentially sensitive info from a ContentItem.
441
- * This method has limits on input size and output size.
442
- * See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to
443
- * learn more.
444
- *
445
- * When no InfoTypes or CustomInfoTypes are specified in this request, the
446
- * system will automatically choose what detectors to run. By default this may
447
- * be all types, but may change over time as detectors are updated.
448
- *
449
- * @param {Object} request
450
- * The request object that will be sent.
451
- * @param {string} request.parent
452
- * Parent resource name.
453
- *
454
- * The format of this value varies depending on whether you have [specified a
455
- * processing
456
- * location](https://cloud.google.com/dlp/docs/specifying-location):
457
- *
458
- * + Projects scope, location specified:<br/>
459
- * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
460
- * + Projects scope, no location specified (defaults to global):<br/>
461
- * `projects/`<var>PROJECT_ID</var>
462
- *
463
- * The following example `parent` string specifies a parent project with the
464
- * identifier `example-project`, and specifies the `europe-west3` location
465
- * for processing data:
466
- *
467
- * parent=projects/example-project/locations/europe-west3
468
- * @param {google.privacy.dlp.v2.DeidentifyConfig} request.deidentifyConfig
469
- * Configuration for the de-identification of the content item.
470
- * Items specified here will override the template referenced by the
471
- * deidentify_template_name argument.
472
- * @param {google.privacy.dlp.v2.InspectConfig} request.inspectConfig
473
- * Configuration for the inspector.
474
- * Items specified here will override the template referenced by the
475
- * inspect_template_name argument.
476
- * @param {google.privacy.dlp.v2.ContentItem} request.item
477
- * The item to de-identify. Will be treated as text.
478
- * @param {string} request.inspectTemplateName
479
- * Template to use. Any configuration directly specified in
480
- * inspect_config will override those set in the template. Singular fields
481
- * that are set in this request will replace their corresponding fields in the
482
- * template. Repeated fields are appended. Singular sub-messages and groups
483
- * are recursively merged.
484
- * @param {string} request.deidentifyTemplateName
485
- * Template to use. Any configuration directly specified in
486
- * deidentify_config will override those set in the template. Singular fields
487
- * that are set in this request will replace their corresponding fields in the
488
- * template. Repeated fields are appended. Singular sub-messages and groups
489
- * are recursively merged.
490
- * @param {string} request.locationId
491
- * Deprecated. This field has no effect.
492
- * @param {object} [options]
493
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
494
- * @returns {Promise} - The promise which resolves to an array.
495
- * The first element of the array is an object representing [DeidentifyContentResponse]{@link google.privacy.dlp.v2.DeidentifyContentResponse}.
496
- * Please see the
497
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
498
- * for more details and examples.
499
- * @example
500
- * const [response] = await client.deidentifyContent(request);
501
- */
502
336
  deidentifyContent(request, optionsOrCallback, callback) {
503
337
  request = request || {};
504
338
  let options;
@@ -519,72 +353,6 @@ class DlpServiceClient {
519
353
  this.initialize();
520
354
  return this.innerApiCalls.deidentifyContent(request, options, callback);
521
355
  }
522
- /**
523
- * Re-identifies content that has been de-identified.
524
- * See
525
- * https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example
526
- * to learn more.
527
- *
528
- * @param {Object} request
529
- * The request object that will be sent.
530
- * @param {string} request.parent
531
- * Required. Parent resource name.
532
- *
533
- * The format of this value varies depending on whether you have [specified a
534
- * processing
535
- * location](https://cloud.google.com/dlp/docs/specifying-location):
536
- *
537
- * + Projects scope, location specified:<br/>
538
- * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
539
- * + Projects scope, no location specified (defaults to global):<br/>
540
- * `projects/`<var>PROJECT_ID</var>
541
- *
542
- * The following example `parent` string specifies a parent project with the
543
- * identifier `example-project`, and specifies the `europe-west3` location
544
- * for processing data:
545
- *
546
- * parent=projects/example-project/locations/europe-west3
547
- * @param {google.privacy.dlp.v2.DeidentifyConfig} request.reidentifyConfig
548
- * Configuration for the re-identification of the content item.
549
- * This field shares the same proto message type that is used for
550
- * de-identification, however its usage here is for the reversal of the
551
- * previous de-identification. Re-identification is performed by examining
552
- * the transformations used to de-identify the items and executing the
553
- * reverse. This requires that only reversible transformations
554
- * be provided here. The reversible transformations are:
555
- *
556
- * - `CryptoDeterministicConfig`
557
- * - `CryptoReplaceFfxFpeConfig`
558
- * @param {google.privacy.dlp.v2.InspectConfig} request.inspectConfig
559
- * Configuration for the inspector.
560
- * @param {google.privacy.dlp.v2.ContentItem} request.item
561
- * The item to re-identify. Will be treated as text.
562
- * @param {string} request.inspectTemplateName
563
- * Template to use. Any configuration directly specified in
564
- * `inspect_config` will override those set in the template. Singular fields
565
- * that are set in this request will replace their corresponding fields in the
566
- * template. Repeated fields are appended. Singular sub-messages and groups
567
- * are recursively merged.
568
- * @param {string} request.reidentifyTemplateName
569
- * Template to use. References an instance of `DeidentifyTemplate`.
570
- * Any configuration directly specified in `reidentify_config` or
571
- * `inspect_config` will override those set in the template. The
572
- * `DeidentifyTemplate` used must include only reversible transformations.
573
- * Singular fields that are set in this request will replace their
574
- * corresponding fields in the template. Repeated fields are appended.
575
- * Singular sub-messages and groups are recursively merged.
576
- * @param {string} request.locationId
577
- * Deprecated. This field has no effect.
578
- * @param {object} [options]
579
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
580
- * @returns {Promise} - The promise which resolves to an array.
581
- * The first element of the array is an object representing [ReidentifyContentResponse]{@link google.privacy.dlp.v2.ReidentifyContentResponse}.
582
- * Please see the
583
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
584
- * for more details and examples.
585
- * @example
586
- * const [response] = await client.reidentifyContent(request);
587
- */
588
356
  reidentifyContent(request, optionsOrCallback, callback) {
589
357
  request = request || {};
590
358
  let options;
@@ -605,38 +373,6 @@ class DlpServiceClient {
605
373
  this.initialize();
606
374
  return this.innerApiCalls.reidentifyContent(request, options, callback);
607
375
  }
608
- /**
609
- * Returns a list of the sensitive information types that the DLP API
610
- * supports. See https://cloud.google.com/dlp/docs/infotypes-reference to
611
- * learn more.
612
- *
613
- * @param {Object} request
614
- * The request object that will be sent.
615
- * @param {string} request.parent
616
- * The parent resource name.
617
- *
618
- * The format of this value is as follows:
619
- *
620
- * locations/<var>LOCATION_ID</var>
621
- * @param {string} request.languageCode
622
- * BCP-47 language code for localized infoType friendly
623
- * names. If omitted, or if localized strings are not available,
624
- * en-US strings will be returned.
625
- * @param {string} request.filter
626
- * filter to only return infoTypes supported by certain parts of the
627
- * API. Defaults to supported_by=INSPECT.
628
- * @param {string} request.locationId
629
- * Deprecated. This field has no effect.
630
- * @param {object} [options]
631
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
632
- * @returns {Promise} - The promise which resolves to an array.
633
- * The first element of the array is an object representing [ListInfoTypesResponse]{@link google.privacy.dlp.v2.ListInfoTypesResponse}.
634
- * Please see the
635
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
636
- * for more details and examples.
637
- * @example
638
- * const [response] = await client.listInfoTypes(request);
639
- */
640
376
  listInfoTypes(request, optionsOrCallback, callback) {
641
377
  request = request || {};
642
378
  let options;
@@ -657,53 +393,6 @@ class DlpServiceClient {
657
393
  this.initialize();
658
394
  return this.innerApiCalls.listInfoTypes(request, options, callback);
659
395
  }
660
- /**
661
- * Creates an InspectTemplate for re-using frequently used configuration
662
- * for inspecting content, images, and storage.
663
- * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
664
- *
665
- * @param {Object} request
666
- * The request object that will be sent.
667
- * @param {string} request.parent
668
- * Required. Parent resource name.
669
- *
670
- * The format of this value varies depending on the scope of the request
671
- * (project or organization) and whether you have [specified a processing
672
- * location](https://cloud.google.com/dlp/docs/specifying-location):
673
- *
674
- * + Projects scope, location specified:<br/>
675
- * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
676
- * + Projects scope, no location specified (defaults to global):<br/>
677
- * `projects/`<var>PROJECT_ID</var>
678
- * + Organizations scope, location specified:<br/>
679
- * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
680
- * + Organizations scope, no location specified (defaults to global):<br/>
681
- * `organizations/`<var>ORG_ID</var>
682
- *
683
- * The following example `parent` string specifies a parent project with the
684
- * identifier `example-project`, and specifies the `europe-west3` location
685
- * for processing data:
686
- *
687
- * parent=projects/example-project/locations/europe-west3
688
- * @param {google.privacy.dlp.v2.InspectTemplate} request.inspectTemplate
689
- * Required. The InspectTemplate to create.
690
- * @param {string} request.templateId
691
- * The template id can contain uppercase and lowercase letters,
692
- * numbers, and hyphens; that is, it must match the regular
693
- * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
694
- * characters. Can be empty to allow the system to generate one.
695
- * @param {string} request.locationId
696
- * Deprecated. This field has no effect.
697
- * @param {object} [options]
698
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
699
- * @returns {Promise} - The promise which resolves to an array.
700
- * The first element of the array is an object representing [InspectTemplate]{@link google.privacy.dlp.v2.InspectTemplate}.
701
- * Please see the
702
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
703
- * for more details and examples.
704
- * @example
705
- * const [response] = await client.createInspectTemplate(request);
706
- */
707
396
  createInspectTemplate(request, optionsOrCallback, callback) {
708
397
  request = request || {};
709
398
  let options;
@@ -724,30 +413,6 @@ class DlpServiceClient {
724
413
  this.initialize();
725
414
  return this.innerApiCalls.createInspectTemplate(request, options, callback);
726
415
  }
727
- /**
728
- * Updates the InspectTemplate.
729
- * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
730
- *
731
- * @param {Object} request
732
- * The request object that will be sent.
733
- * @param {string} request.name
734
- * Required. Resource name of organization and inspectTemplate to be updated, for
735
- * example `organizations/433245324/inspectTemplates/432452342` or
736
- * projects/project-id/inspectTemplates/432452342.
737
- * @param {google.privacy.dlp.v2.InspectTemplate} request.inspectTemplate
738
- * New InspectTemplate value.
739
- * @param {google.protobuf.FieldMask} request.updateMask
740
- * Mask to control which fields get updated.
741
- * @param {object} [options]
742
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
743
- * @returns {Promise} - The promise which resolves to an array.
744
- * The first element of the array is an object representing [InspectTemplate]{@link google.privacy.dlp.v2.InspectTemplate}.
745
- * Please see the
746
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
747
- * for more details and examples.
748
- * @example
749
- * const [response] = await client.updateInspectTemplate(request);
750
- */
751
416
  updateInspectTemplate(request, optionsOrCallback, callback) {
752
417
  request = request || {};
753
418
  let options;
@@ -768,26 +433,6 @@ class DlpServiceClient {
768
433
  this.initialize();
769
434
  return this.innerApiCalls.updateInspectTemplate(request, options, callback);
770
435
  }
771
- /**
772
- * Gets an InspectTemplate.
773
- * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
774
- *
775
- * @param {Object} request
776
- * The request object that will be sent.
777
- * @param {string} request.name
778
- * Required. Resource name of the organization and inspectTemplate to be read, for
779
- * example `organizations/433245324/inspectTemplates/432452342` or
780
- * projects/project-id/inspectTemplates/432452342.
781
- * @param {object} [options]
782
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
783
- * @returns {Promise} - The promise which resolves to an array.
784
- * The first element of the array is an object representing [InspectTemplate]{@link google.privacy.dlp.v2.InspectTemplate}.
785
- * Please see the
786
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
787
- * for more details and examples.
788
- * @example
789
- * const [response] = await client.getInspectTemplate(request);
790
- */
791
436
  getInspectTemplate(request, optionsOrCallback, callback) {
792
437
  request = request || {};
793
438
  let options;
@@ -808,26 +453,6 @@ class DlpServiceClient {
808
453
  this.initialize();
809
454
  return this.innerApiCalls.getInspectTemplate(request, options, callback);
810
455
  }
811
- /**
812
- * Deletes an InspectTemplate.
813
- * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
814
- *
815
- * @param {Object} request
816
- * The request object that will be sent.
817
- * @param {string} request.name
818
- * Required. Resource name of the organization and inspectTemplate to be deleted, for
819
- * example `organizations/433245324/inspectTemplates/432452342` or
820
- * projects/project-id/inspectTemplates/432452342.
821
- * @param {object} [options]
822
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
823
- * @returns {Promise} - The promise which resolves to an array.
824
- * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}.
825
- * Please see the
826
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
827
- * for more details and examples.
828
- * @example
829
- * const [response] = await client.deleteInspectTemplate(request);
830
- */
831
456
  deleteInspectTemplate(request, optionsOrCallback, callback) {
832
457
  request = request || {};
833
458
  let options;
@@ -848,54 +473,6 @@ class DlpServiceClient {
848
473
  this.initialize();
849
474
  return this.innerApiCalls.deleteInspectTemplate(request, options, callback);
850
475
  }
851
- /**
852
- * Creates a DeidentifyTemplate for re-using frequently used configuration
853
- * for de-identifying content, images, and storage.
854
- * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
855
- * more.
856
- *
857
- * @param {Object} request
858
- * The request object that will be sent.
859
- * @param {string} request.parent
860
- * Required. Parent resource name.
861
- *
862
- * The format of this value varies depending on the scope of the request
863
- * (project or organization) and whether you have [specified a processing
864
- * location](https://cloud.google.com/dlp/docs/specifying-location):
865
- *
866
- * + Projects scope, location specified:<br/>
867
- * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
868
- * + Projects scope, no location specified (defaults to global):<br/>
869
- * `projects/`<var>PROJECT_ID</var>
870
- * + Organizations scope, location specified:<br/>
871
- * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
872
- * + Organizations scope, no location specified (defaults to global):<br/>
873
- * `organizations/`<var>ORG_ID</var>
874
- *
875
- * The following example `parent` string specifies a parent project with the
876
- * identifier `example-project`, and specifies the `europe-west3` location
877
- * for processing data:
878
- *
879
- * parent=projects/example-project/locations/europe-west3
880
- * @param {google.privacy.dlp.v2.DeidentifyTemplate} request.deidentifyTemplate
881
- * Required. The DeidentifyTemplate to create.
882
- * @param {string} request.templateId
883
- * The template id can contain uppercase and lowercase letters,
884
- * numbers, and hyphens; that is, it must match the regular
885
- * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
886
- * characters. Can be empty to allow the system to generate one.
887
- * @param {string} request.locationId
888
- * Deprecated. This field has no effect.
889
- * @param {object} [options]
890
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
891
- * @returns {Promise} - The promise which resolves to an array.
892
- * The first element of the array is an object representing [DeidentifyTemplate]{@link google.privacy.dlp.v2.DeidentifyTemplate}.
893
- * Please see the
894
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
895
- * for more details and examples.
896
- * @example
897
- * const [response] = await client.createDeidentifyTemplate(request);
898
- */
899
476
  createDeidentifyTemplate(request, optionsOrCallback, callback) {
900
477
  request = request || {};
901
478
  let options;
@@ -916,31 +493,6 @@ class DlpServiceClient {
916
493
  this.initialize();
917
494
  return this.innerApiCalls.createDeidentifyTemplate(request, options, callback);
918
495
  }
919
- /**
920
- * Updates the DeidentifyTemplate.
921
- * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
922
- * more.
923
- *
924
- * @param {Object} request
925
- * The request object that will be sent.
926
- * @param {string} request.name
927
- * Required. Resource name of organization and deidentify template to be updated, for
928
- * example `organizations/433245324/deidentifyTemplates/432452342` or
929
- * projects/project-id/deidentifyTemplates/432452342.
930
- * @param {google.privacy.dlp.v2.DeidentifyTemplate} request.deidentifyTemplate
931
- * New DeidentifyTemplate value.
932
- * @param {google.protobuf.FieldMask} request.updateMask
933
- * Mask to control which fields get updated.
934
- * @param {object} [options]
935
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
936
- * @returns {Promise} - The promise which resolves to an array.
937
- * The first element of the array is an object representing [DeidentifyTemplate]{@link google.privacy.dlp.v2.DeidentifyTemplate}.
938
- * Please see the
939
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
940
- * for more details and examples.
941
- * @example
942
- * const [response] = await client.updateDeidentifyTemplate(request);
943
- */
944
496
  updateDeidentifyTemplate(request, optionsOrCallback, callback) {
945
497
  request = request || {};
946
498
  let options;
@@ -961,27 +513,6 @@ class DlpServiceClient {
961
513
  this.initialize();
962
514
  return this.innerApiCalls.updateDeidentifyTemplate(request, options, callback);
963
515
  }
964
- /**
965
- * Gets a DeidentifyTemplate.
966
- * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
967
- * more.
968
- *
969
- * @param {Object} request
970
- * The request object that will be sent.
971
- * @param {string} request.name
972
- * Required. Resource name of the organization and deidentify template to be read, for
973
- * example `organizations/433245324/deidentifyTemplates/432452342` or
974
- * projects/project-id/deidentifyTemplates/432452342.
975
- * @param {object} [options]
976
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
977
- * @returns {Promise} - The promise which resolves to an array.
978
- * The first element of the array is an object representing [DeidentifyTemplate]{@link google.privacy.dlp.v2.DeidentifyTemplate}.
979
- * Please see the
980
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
981
- * for more details and examples.
982
- * @example
983
- * const [response] = await client.getDeidentifyTemplate(request);
984
- */
985
516
  getDeidentifyTemplate(request, optionsOrCallback, callback) {
986
517
  request = request || {};
987
518
  let options;
@@ -1002,27 +533,6 @@ class DlpServiceClient {
1002
533
  this.initialize();
1003
534
  return this.innerApiCalls.getDeidentifyTemplate(request, options, callback);
1004
535
  }
1005
- /**
1006
- * Deletes a DeidentifyTemplate.
1007
- * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
1008
- * more.
1009
- *
1010
- * @param {Object} request
1011
- * The request object that will be sent.
1012
- * @param {string} request.name
1013
- * Required. Resource name of the organization and deidentify template to be deleted,
1014
- * for example `organizations/433245324/deidentifyTemplates/432452342` or
1015
- * projects/project-id/deidentifyTemplates/432452342.
1016
- * @param {object} [options]
1017
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1018
- * @returns {Promise} - The promise which resolves to an array.
1019
- * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}.
1020
- * Please see the
1021
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
1022
- * for more details and examples.
1023
- * @example
1024
- * const [response] = await client.deleteDeidentifyTemplate(request);
1025
- */
1026
536
  deleteDeidentifyTemplate(request, optionsOrCallback, callback) {
1027
537
  request = request || {};
1028
538
  let options;
@@ -1043,49 +553,6 @@ class DlpServiceClient {
1043
553
  this.initialize();
1044
554
  return this.innerApiCalls.deleteDeidentifyTemplate(request, options, callback);
1045
555
  }
1046
- /**
1047
- * Creates a job trigger to run DLP actions such as scanning storage for
1048
- * sensitive information on a set schedule.
1049
- * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
1050
- *
1051
- * @param {Object} request
1052
- * The request object that will be sent.
1053
- * @param {string} request.parent
1054
- * Required. Parent resource name.
1055
- *
1056
- * The format of this value varies depending on whether you have [specified a
1057
- * processing
1058
- * location](https://cloud.google.com/dlp/docs/specifying-location):
1059
- *
1060
- * + Projects scope, location specified:<br/>
1061
- * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
1062
- * + Projects scope, no location specified (defaults to global):<br/>
1063
- * `projects/`<var>PROJECT_ID</var>
1064
- *
1065
- * The following example `parent` string specifies a parent project with the
1066
- * identifier `example-project`, and specifies the `europe-west3` location
1067
- * for processing data:
1068
- *
1069
- * parent=projects/example-project/locations/europe-west3
1070
- * @param {google.privacy.dlp.v2.JobTrigger} request.jobTrigger
1071
- * Required. The JobTrigger to create.
1072
- * @param {string} request.triggerId
1073
- * The trigger id can contain uppercase and lowercase letters,
1074
- * numbers, and hyphens; that is, it must match the regular
1075
- * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
1076
- * characters. Can be empty to allow the system to generate one.
1077
- * @param {string} request.locationId
1078
- * Deprecated. This field has no effect.
1079
- * @param {object} [options]
1080
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1081
- * @returns {Promise} - The promise which resolves to an array.
1082
- * The first element of the array is an object representing [JobTrigger]{@link google.privacy.dlp.v2.JobTrigger}.
1083
- * Please see the
1084
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
1085
- * for more details and examples.
1086
- * @example
1087
- * const [response] = await client.createJobTrigger(request);
1088
- */
1089
556
  createJobTrigger(request, optionsOrCallback, callback) {
1090
557
  request = request || {};
1091
558
  let options;
@@ -1106,29 +573,6 @@ class DlpServiceClient {
1106
573
  this.initialize();
1107
574
  return this.innerApiCalls.createJobTrigger(request, options, callback);
1108
575
  }
1109
- /**
1110
- * Updates a job trigger.
1111
- * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
1112
- *
1113
- * @param {Object} request
1114
- * The request object that will be sent.
1115
- * @param {string} request.name
1116
- * Required. Resource name of the project and the triggeredJob, for example
1117
- * `projects/dlp-test-project/jobTriggers/53234423`.
1118
- * @param {google.privacy.dlp.v2.JobTrigger} request.jobTrigger
1119
- * New JobTrigger value.
1120
- * @param {google.protobuf.FieldMask} request.updateMask
1121
- * Mask to control which fields get updated.
1122
- * @param {object} [options]
1123
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1124
- * @returns {Promise} - The promise which resolves to an array.
1125
- * The first element of the array is an object representing [JobTrigger]{@link google.privacy.dlp.v2.JobTrigger}.
1126
- * Please see the
1127
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
1128
- * for more details and examples.
1129
- * @example
1130
- * const [response] = await client.updateJobTrigger(request);
1131
- */
1132
576
  updateJobTrigger(request, optionsOrCallback, callback) {
1133
577
  request = request || {};
1134
578
  let options;
@@ -1149,31 +593,6 @@ class DlpServiceClient {
1149
593
  this.initialize();
1150
594
  return this.innerApiCalls.updateJobTrigger(request, options, callback);
1151
595
  }
1152
- /**
1153
- * Inspect hybrid content and store findings to a trigger. The inspection
1154
- * will be processed asynchronously. To review the findings monitor the
1155
- * jobs within the trigger.
1156
- * Early access feature is in a pre-release state and might change or have
1157
- * limited support. For more information, see
1158
- * https://cloud.google.com/products#product-launch-stages.
1159
- *
1160
- * @param {Object} request
1161
- * The request object that will be sent.
1162
- * @param {string} request.name
1163
- * Required. Resource name of the trigger to execute a hybrid inspect on, for example
1164
- * `projects/dlp-test-project/jobTriggers/53234423`.
1165
- * @param {google.privacy.dlp.v2.HybridContentItem} request.hybridItem
1166
- * The item to inspect.
1167
- * @param {object} [options]
1168
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1169
- * @returns {Promise} - The promise which resolves to an array.
1170
- * The first element of the array is an object representing [HybridInspectResponse]{@link google.privacy.dlp.v2.HybridInspectResponse}.
1171
- * Please see the
1172
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
1173
- * for more details and examples.
1174
- * @example
1175
- * const [response] = await client.hybridInspectJobTrigger(request);
1176
- */
1177
596
  hybridInspectJobTrigger(request, optionsOrCallback, callback) {
1178
597
  request = request || {};
1179
598
  let options;
@@ -1194,25 +613,6 @@ class DlpServiceClient {
1194
613
  this.initialize();
1195
614
  return this.innerApiCalls.hybridInspectJobTrigger(request, options, callback);
1196
615
  }
1197
- /**
1198
- * Gets a job trigger.
1199
- * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
1200
- *
1201
- * @param {Object} request
1202
- * The request object that will be sent.
1203
- * @param {string} request.name
1204
- * Required. Resource name of the project and the triggeredJob, for example
1205
- * `projects/dlp-test-project/jobTriggers/53234423`.
1206
- * @param {object} [options]
1207
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1208
- * @returns {Promise} - The promise which resolves to an array.
1209
- * The first element of the array is an object representing [JobTrigger]{@link google.privacy.dlp.v2.JobTrigger}.
1210
- * Please see the
1211
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
1212
- * for more details and examples.
1213
- * @example
1214
- * const [response] = await client.getJobTrigger(request);
1215
- */
1216
616
  getJobTrigger(request, optionsOrCallback, callback) {
1217
617
  request = request || {};
1218
618
  let options;
@@ -1233,25 +633,6 @@ class DlpServiceClient {
1233
633
  this.initialize();
1234
634
  return this.innerApiCalls.getJobTrigger(request, options, callback);
1235
635
  }
1236
- /**
1237
- * Deletes a job trigger.
1238
- * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
1239
- *
1240
- * @param {Object} request
1241
- * The request object that will be sent.
1242
- * @param {string} request.name
1243
- * Required. Resource name of the project and the triggeredJob, for example
1244
- * `projects/dlp-test-project/jobTriggers/53234423`.
1245
- * @param {object} [options]
1246
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1247
- * @returns {Promise} - The promise which resolves to an array.
1248
- * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}.
1249
- * Please see the
1250
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
1251
- * for more details and examples.
1252
- * @example
1253
- * const [response] = await client.deleteJobTrigger(request);
1254
- */
1255
636
  deleteJobTrigger(request, optionsOrCallback, callback) {
1256
637
  request = request || {};
1257
638
  let options;
@@ -1269,97 +650,29 @@ class DlpServiceClient {
1269
650
  gax.routingHeader.fromParams({
1270
651
  name: request.name || '',
1271
652
  });
1272
- this.initialize();
1273
- return this.innerApiCalls.deleteJobTrigger(request, options, callback);
1274
- }
1275
- /**
1276
- * Activate a job trigger. Causes the immediate execute of a trigger
1277
- * instead of waiting on the trigger event to occur.
1278
- *
1279
- * @param {Object} request
1280
- * The request object that will be sent.
1281
- * @param {string} request.name
1282
- * Required. Resource name of the trigger to activate, for example
1283
- * `projects/dlp-test-project/jobTriggers/53234423`.
1284
- * @param {object} [options]
1285
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1286
- * @returns {Promise} - The promise which resolves to an array.
1287
- * The first element of the array is an object representing [DlpJob]{@link google.privacy.dlp.v2.DlpJob}.
1288
- * Please see the
1289
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
1290
- * for more details and examples.
1291
- * @example
1292
- * const [response] = await client.activateJobTrigger(request);
1293
- */
1294
- activateJobTrigger(request, optionsOrCallback, callback) {
1295
- request = request || {};
1296
- let options;
1297
- if (typeof optionsOrCallback === 'function' && callback === undefined) {
1298
- callback = optionsOrCallback;
1299
- options = {};
1300
- }
1301
- else {
1302
- options = optionsOrCallback;
1303
- }
1304
- options = options || {};
1305
- options.otherArgs = options.otherArgs || {};
1306
- options.otherArgs.headers = options.otherArgs.headers || {};
1307
- options.otherArgs.headers['x-goog-request-params'] =
1308
- gax.routingHeader.fromParams({
1309
- name: request.name || '',
1310
- });
1311
- this.initialize();
1312
- return this.innerApiCalls.activateJobTrigger(request, options, callback);
1313
- }
1314
- /**
1315
- * Creates a new job to inspect storage or calculate risk metrics.
1316
- * See https://cloud.google.com/dlp/docs/inspecting-storage and
1317
- * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
1318
- *
1319
- * When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the
1320
- * system will automatically choose what detectors to run. By default this may
1321
- * be all types, but may change over time as detectors are updated.
1322
- *
1323
- * @param {Object} request
1324
- * The request object that will be sent.
1325
- * @param {string} request.parent
1326
- * Required. Parent resource name.
1327
- *
1328
- * The format of this value varies depending on whether you have [specified a
1329
- * processing
1330
- * location](https://cloud.google.com/dlp/docs/specifying-location):
1331
- *
1332
- * + Projects scope, location specified:<br/>
1333
- * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
1334
- * + Projects scope, no location specified (defaults to global):<br/>
1335
- * `projects/`<var>PROJECT_ID</var>
1336
- *
1337
- * The following example `parent` string specifies a parent project with the
1338
- * identifier `example-project`, and specifies the `europe-west3` location
1339
- * for processing data:
1340
- *
1341
- * parent=projects/example-project/locations/europe-west3
1342
- * @param {google.privacy.dlp.v2.InspectJobConfig} request.inspectJob
1343
- * Set to control what and how to inspect.
1344
- * @param {google.privacy.dlp.v2.RiskAnalysisJobConfig} request.riskJob
1345
- * Set to choose what metric to calculate.
1346
- * @param {string} request.jobId
1347
- * The job id can contain uppercase and lowercase letters,
1348
- * numbers, and hyphens; that is, it must match the regular
1349
- * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
1350
- * characters. Can be empty to allow the system to generate one.
1351
- * @param {string} request.locationId
1352
- * Deprecated. This field has no effect.
1353
- * @param {object} [options]
1354
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1355
- * @returns {Promise} - The promise which resolves to an array.
1356
- * The first element of the array is an object representing [DlpJob]{@link google.privacy.dlp.v2.DlpJob}.
1357
- * Please see the
1358
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
1359
- * for more details and examples.
1360
- * @example
1361
- * const [response] = await client.createDlpJob(request);
1362
- */
653
+ this.initialize();
654
+ return this.innerApiCalls.deleteJobTrigger(request, options, callback);
655
+ }
656
+ activateJobTrigger(request, optionsOrCallback, callback) {
657
+ request = request || {};
658
+ let options;
659
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
660
+ callback = optionsOrCallback;
661
+ options = {};
662
+ }
663
+ else {
664
+ options = optionsOrCallback;
665
+ }
666
+ options = options || {};
667
+ options.otherArgs = options.otherArgs || {};
668
+ options.otherArgs.headers = options.otherArgs.headers || {};
669
+ options.otherArgs.headers['x-goog-request-params'] =
670
+ gax.routingHeader.fromParams({
671
+ name: request.name || '',
672
+ });
673
+ this.initialize();
674
+ return this.innerApiCalls.activateJobTrigger(request, options, callback);
675
+ }
1363
676
  createDlpJob(request, optionsOrCallback, callback) {
1364
677
  request = request || {};
1365
678
  let options;
@@ -1380,25 +693,6 @@ class DlpServiceClient {
1380
693
  this.initialize();
1381
694
  return this.innerApiCalls.createDlpJob(request, options, callback);
1382
695
  }
1383
- /**
1384
- * Gets the latest state of a long-running DlpJob.
1385
- * See https://cloud.google.com/dlp/docs/inspecting-storage and
1386
- * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
1387
- *
1388
- * @param {Object} request
1389
- * The request object that will be sent.
1390
- * @param {string} request.name
1391
- * Required. The name of the DlpJob resource.
1392
- * @param {object} [options]
1393
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1394
- * @returns {Promise} - The promise which resolves to an array.
1395
- * The first element of the array is an object representing [DlpJob]{@link google.privacy.dlp.v2.DlpJob}.
1396
- * Please see the
1397
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
1398
- * for more details and examples.
1399
- * @example
1400
- * const [response] = await client.getDlpJob(request);
1401
- */
1402
696
  getDlpJob(request, optionsOrCallback, callback) {
1403
697
  request = request || {};
1404
698
  let options;
@@ -1419,27 +713,6 @@ class DlpServiceClient {
1419
713
  this.initialize();
1420
714
  return this.innerApiCalls.getDlpJob(request, options, callback);
1421
715
  }
1422
- /**
1423
- * Deletes a long-running DlpJob. This method indicates that the client is
1424
- * no longer interested in the DlpJob result. The job will be cancelled if
1425
- * possible.
1426
- * See https://cloud.google.com/dlp/docs/inspecting-storage and
1427
- * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
1428
- *
1429
- * @param {Object} request
1430
- * The request object that will be sent.
1431
- * @param {string} request.name
1432
- * Required. The name of the DlpJob resource to be deleted.
1433
- * @param {object} [options]
1434
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1435
- * @returns {Promise} - The promise which resolves to an array.
1436
- * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}.
1437
- * Please see the
1438
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
1439
- * for more details and examples.
1440
- * @example
1441
- * const [response] = await client.deleteDlpJob(request);
1442
- */
1443
716
  deleteDlpJob(request, optionsOrCallback, callback) {
1444
717
  request = request || {};
1445
718
  let options;
@@ -1460,27 +733,6 @@ class DlpServiceClient {
1460
733
  this.initialize();
1461
734
  return this.innerApiCalls.deleteDlpJob(request, options, callback);
1462
735
  }
1463
- /**
1464
- * Starts asynchronous cancellation on a long-running DlpJob. The server
1465
- * makes a best effort to cancel the DlpJob, but success is not
1466
- * guaranteed.
1467
- * See https://cloud.google.com/dlp/docs/inspecting-storage and
1468
- * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
1469
- *
1470
- * @param {Object} request
1471
- * The request object that will be sent.
1472
- * @param {string} request.name
1473
- * Required. The name of the DlpJob resource to be cancelled.
1474
- * @param {object} [options]
1475
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1476
- * @returns {Promise} - The promise which resolves to an array.
1477
- * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}.
1478
- * Please see the
1479
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
1480
- * for more details and examples.
1481
- * @example
1482
- * const [response] = await client.cancelDlpJob(request);
1483
- */
1484
736
  cancelDlpJob(request, optionsOrCallback, callback) {
1485
737
  request = request || {};
1486
738
  let options;
@@ -1501,53 +753,6 @@ class DlpServiceClient {
1501
753
  this.initialize();
1502
754
  return this.innerApiCalls.cancelDlpJob(request, options, callback);
1503
755
  }
1504
- /**
1505
- * Creates a pre-built stored infoType to be used for inspection.
1506
- * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
1507
- * learn more.
1508
- *
1509
- * @param {Object} request
1510
- * The request object that will be sent.
1511
- * @param {string} request.parent
1512
- * Required. Parent resource name.
1513
- *
1514
- * The format of this value varies depending on the scope of the request
1515
- * (project or organization) and whether you have [specified a processing
1516
- * location](https://cloud.google.com/dlp/docs/specifying-location):
1517
- *
1518
- * + Projects scope, location specified:<br/>
1519
- * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
1520
- * + Projects scope, no location specified (defaults to global):<br/>
1521
- * `projects/`<var>PROJECT_ID</var>
1522
- * + Organizations scope, location specified:<br/>
1523
- * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
1524
- * + Organizations scope, no location specified (defaults to global):<br/>
1525
- * `organizations/`<var>ORG_ID</var>
1526
- *
1527
- * The following example `parent` string specifies a parent project with the
1528
- * identifier `example-project`, and specifies the `europe-west3` location
1529
- * for processing data:
1530
- *
1531
- * parent=projects/example-project/locations/europe-west3
1532
- * @param {google.privacy.dlp.v2.StoredInfoTypeConfig} request.config
1533
- * Required. Configuration of the storedInfoType to create.
1534
- * @param {string} request.storedInfoTypeId
1535
- * The storedInfoType ID can contain uppercase and lowercase letters,
1536
- * numbers, and hyphens; that is, it must match the regular
1537
- * expression: `[a-zA-Z\d-_]+`. The maximum length is 100
1538
- * characters. Can be empty to allow the system to generate one.
1539
- * @param {string} request.locationId
1540
- * Deprecated. This field has no effect.
1541
- * @param {object} [options]
1542
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1543
- * @returns {Promise} - The promise which resolves to an array.
1544
- * The first element of the array is an object representing [StoredInfoType]{@link google.privacy.dlp.v2.StoredInfoType}.
1545
- * Please see the
1546
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
1547
- * for more details and examples.
1548
- * @example
1549
- * const [response] = await client.createStoredInfoType(request);
1550
- */
1551
756
  createStoredInfoType(request, optionsOrCallback, callback) {
1552
757
  request = request || {};
1553
758
  let options;
@@ -1568,34 +773,6 @@ class DlpServiceClient {
1568
773
  this.initialize();
1569
774
  return this.innerApiCalls.createStoredInfoType(request, options, callback);
1570
775
  }
1571
- /**
1572
- * Updates the stored infoType by creating a new version. The existing version
1573
- * will continue to be used until the new version is ready.
1574
- * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
1575
- * learn more.
1576
- *
1577
- * @param {Object} request
1578
- * The request object that will be sent.
1579
- * @param {string} request.name
1580
- * Required. Resource name of organization and storedInfoType to be updated, for
1581
- * example `organizations/433245324/storedInfoTypes/432452342` or
1582
- * projects/project-id/storedInfoTypes/432452342.
1583
- * @param {google.privacy.dlp.v2.StoredInfoTypeConfig} request.config
1584
- * Updated configuration for the storedInfoType. If not provided, a new
1585
- * version of the storedInfoType will be created with the existing
1586
- * configuration.
1587
- * @param {google.protobuf.FieldMask} request.updateMask
1588
- * Mask to control which fields get updated.
1589
- * @param {object} [options]
1590
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1591
- * @returns {Promise} - The promise which resolves to an array.
1592
- * The first element of the array is an object representing [StoredInfoType]{@link google.privacy.dlp.v2.StoredInfoType}.
1593
- * Please see the
1594
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
1595
- * for more details and examples.
1596
- * @example
1597
- * const [response] = await client.updateStoredInfoType(request);
1598
- */
1599
776
  updateStoredInfoType(request, optionsOrCallback, callback) {
1600
777
  request = request || {};
1601
778
  let options;
@@ -1616,27 +793,6 @@ class DlpServiceClient {
1616
793
  this.initialize();
1617
794
  return this.innerApiCalls.updateStoredInfoType(request, options, callback);
1618
795
  }
1619
- /**
1620
- * Gets a stored infoType.
1621
- * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
1622
- * learn more.
1623
- *
1624
- * @param {Object} request
1625
- * The request object that will be sent.
1626
- * @param {string} request.name
1627
- * Required. Resource name of the organization and storedInfoType to be read, for
1628
- * example `organizations/433245324/storedInfoTypes/432452342` or
1629
- * projects/project-id/storedInfoTypes/432452342.
1630
- * @param {object} [options]
1631
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1632
- * @returns {Promise} - The promise which resolves to an array.
1633
- * The first element of the array is an object representing [StoredInfoType]{@link google.privacy.dlp.v2.StoredInfoType}.
1634
- * Please see the
1635
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
1636
- * for more details and examples.
1637
- * @example
1638
- * const [response] = await client.getStoredInfoType(request);
1639
- */
1640
796
  getStoredInfoType(request, optionsOrCallback, callback) {
1641
797
  request = request || {};
1642
798
  let options;
@@ -1657,27 +813,6 @@ class DlpServiceClient {
1657
813
  this.initialize();
1658
814
  return this.innerApiCalls.getStoredInfoType(request, options, callback);
1659
815
  }
1660
- /**
1661
- * Deletes a stored infoType.
1662
- * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
1663
- * learn more.
1664
- *
1665
- * @param {Object} request
1666
- * The request object that will be sent.
1667
- * @param {string} request.name
1668
- * Required. Resource name of the organization and storedInfoType to be deleted, for
1669
- * example `organizations/433245324/storedInfoTypes/432452342` or
1670
- * projects/project-id/storedInfoTypes/432452342.
1671
- * @param {object} [options]
1672
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1673
- * @returns {Promise} - The promise which resolves to an array.
1674
- * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}.
1675
- * Please see the
1676
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
1677
- * for more details and examples.
1678
- * @example
1679
- * const [response] = await client.deleteStoredInfoType(request);
1680
- */
1681
816
  deleteStoredInfoType(request, optionsOrCallback, callback) {
1682
817
  request = request || {};
1683
818
  let options;
@@ -1698,31 +833,6 @@ class DlpServiceClient {
1698
833
  this.initialize();
1699
834
  return this.innerApiCalls.deleteStoredInfoType(request, options, callback);
1700
835
  }
1701
- /**
1702
- * Inspect hybrid content and store findings to a job.
1703
- * To review the findings inspect the job. Inspection will occur
1704
- * asynchronously.
1705
- * Early access feature is in a pre-release state and might change or have
1706
- * limited support. For more information, see
1707
- * https://cloud.google.com/products#product-launch-stages.
1708
- *
1709
- * @param {Object} request
1710
- * The request object that will be sent.
1711
- * @param {string} request.name
1712
- * Required. Resource name of the job to execute a hybrid inspect on, for example
1713
- * `projects/dlp-test-project/dlpJob/53234423`.
1714
- * @param {google.privacy.dlp.v2.HybridContentItem} request.hybridItem
1715
- * The item to inspect.
1716
- * @param {object} [options]
1717
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1718
- * @returns {Promise} - The promise which resolves to an array.
1719
- * The first element of the array is an object representing [HybridInspectResponse]{@link google.privacy.dlp.v2.HybridInspectResponse}.
1720
- * Please see the
1721
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
1722
- * for more details and examples.
1723
- * @example
1724
- * const [response] = await client.hybridInspectDlpJob(request);
1725
- */
1726
836
  hybridInspectDlpJob(request, optionsOrCallback, callback) {
1727
837
  request = request || {};
1728
838
  let options;
@@ -1743,27 +853,6 @@ class DlpServiceClient {
1743
853
  this.initialize();
1744
854
  return this.innerApiCalls.hybridInspectDlpJob(request, options, callback);
1745
855
  }
1746
- /**
1747
- * Finish a running hybrid DlpJob. Triggers the finalization steps and running
1748
- * of any enabled actions that have not yet run.
1749
- * Early access feature is in a pre-release state and might change or have
1750
- * limited support. For more information, see
1751
- * https://cloud.google.com/products#product-launch-stages.
1752
- *
1753
- * @param {Object} request
1754
- * The request object that will be sent.
1755
- * @param {string} request.name
1756
- * Required. The name of the DlpJob resource to be cancelled.
1757
- * @param {object} [options]
1758
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1759
- * @returns {Promise} - The promise which resolves to an array.
1760
- * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}.
1761
- * Please see the
1762
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
1763
- * for more details and examples.
1764
- * @example
1765
- * const [response] = await client.finishDlpJob(request);
1766
- */
1767
856
  finishDlpJob(request, optionsOrCallback, callback) {
1768
857
  request = request || {};
1769
858
  let options;
@@ -1784,68 +873,6 @@ class DlpServiceClient {
1784
873
  this.initialize();
1785
874
  return this.innerApiCalls.finishDlpJob(request, options, callback);
1786
875
  }
1787
- /**
1788
- * Lists InspectTemplates.
1789
- * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
1790
- *
1791
- * @param {Object} request
1792
- * The request object that will be sent.
1793
- * @param {string} request.parent
1794
- * Required. Parent resource name.
1795
- *
1796
- * The format of this value varies depending on the scope of the request
1797
- * (project or organization) and whether you have [specified a processing
1798
- * location](https://cloud.google.com/dlp/docs/specifying-location):
1799
- *
1800
- * + Projects scope, location specified:<br/>
1801
- * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
1802
- * + Projects scope, no location specified (defaults to global):<br/>
1803
- * `projects/`<var>PROJECT_ID</var>
1804
- * + Organizations scope, location specified:<br/>
1805
- * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
1806
- * + Organizations scope, no location specified (defaults to global):<br/>
1807
- * `organizations/`<var>ORG_ID</var>
1808
- *
1809
- * The following example `parent` string specifies a parent project with the
1810
- * identifier `example-project`, and specifies the `europe-west3` location
1811
- * for processing data:
1812
- *
1813
- * parent=projects/example-project/locations/europe-west3
1814
- * @param {string} request.pageToken
1815
- * Page token to continue retrieval. Comes from previous call
1816
- * to `ListInspectTemplates`.
1817
- * @param {number} request.pageSize
1818
- * Size of the page, can be limited by server. If zero server returns
1819
- * a page of max size 100.
1820
- * @param {string} request.orderBy
1821
- * Comma separated list of fields to order by,
1822
- * followed by `asc` or `desc` postfix. This list is case-insensitive,
1823
- * default sorting order is ascending, redundant space characters are
1824
- * insignificant.
1825
- *
1826
- * Example: `name asc,update_time, create_time desc`
1827
- *
1828
- * Supported fields are:
1829
- *
1830
- * - `create_time`: corresponds to time the template was created.
1831
- * - `update_time`: corresponds to time the template was last updated.
1832
- * - `name`: corresponds to template's name.
1833
- * - `display_name`: corresponds to template's display name.
1834
- * @param {string} request.locationId
1835
- * Deprecated. This field has no effect.
1836
- * @param {object} [options]
1837
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1838
- * @returns {Promise} - The promise which resolves to an array.
1839
- * The first element of the array is Array of [InspectTemplate]{@link google.privacy.dlp.v2.InspectTemplate}.
1840
- * The client library will perform auto-pagination by default: it will call the API as many
1841
- * times as needed and will merge results from all the pages into this array.
1842
- * Note that it can affect your quota.
1843
- * We recommend using `listInspectTemplatesAsync()`
1844
- * method described below for async iteration which you can stop as needed.
1845
- * Please see the
1846
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
1847
- * for more details and examples.
1848
- */
1849
876
  listInspectTemplates(request, optionsOrCallback, callback) {
1850
877
  request = request || {};
1851
878
  let options;
@@ -1920,90 +947,12 @@ class DlpServiceClient {
1920
947
  * The client library will perform auto-pagination by default: it will call the API as many
1921
948
  * times as needed. Note that it can affect your quota.
1922
949
  * We recommend using `listInspectTemplatesAsync()`
1923
- * method described below for async iteration which you can stop as needed.
1924
- * Please see the
1925
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
1926
- * for more details and examples.
1927
- */
1928
- listInspectTemplatesStream(request, options) {
1929
- request = request || {};
1930
- options = options || {};
1931
- options.otherArgs = options.otherArgs || {};
1932
- options.otherArgs.headers = options.otherArgs.headers || {};
1933
- options.otherArgs.headers['x-goog-request-params'] =
1934
- gax.routingHeader.fromParams({
1935
- parent: request.parent || '',
1936
- });
1937
- const callSettings = new gax.CallSettings(options);
1938
- this.initialize();
1939
- return this.descriptors.page.listInspectTemplates.createStream(this.innerApiCalls.listInspectTemplates, request, callSettings);
1940
- }
1941
- /**
1942
- * Equivalent to `listInspectTemplates`, but returns an iterable object.
1943
- *
1944
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
1945
- * @param {Object} request
1946
- * The request object that will be sent.
1947
- * @param {string} request.parent
1948
- * Required. Parent resource name.
1949
- *
1950
- * The format of this value varies depending on the scope of the request
1951
- * (project or organization) and whether you have [specified a processing
1952
- * location](https://cloud.google.com/dlp/docs/specifying-location):
1953
- *
1954
- * + Projects scope, location specified:<br/>
1955
- * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
1956
- * + Projects scope, no location specified (defaults to global):<br/>
1957
- * `projects/`<var>PROJECT_ID</var>
1958
- * + Organizations scope, location specified:<br/>
1959
- * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
1960
- * + Organizations scope, no location specified (defaults to global):<br/>
1961
- * `organizations/`<var>ORG_ID</var>
1962
- *
1963
- * The following example `parent` string specifies a parent project with the
1964
- * identifier `example-project`, and specifies the `europe-west3` location
1965
- * for processing data:
1966
- *
1967
- * parent=projects/example-project/locations/europe-west3
1968
- * @param {string} request.pageToken
1969
- * Page token to continue retrieval. Comes from previous call
1970
- * to `ListInspectTemplates`.
1971
- * @param {number} request.pageSize
1972
- * Size of the page, can be limited by server. If zero server returns
1973
- * a page of max size 100.
1974
- * @param {string} request.orderBy
1975
- * Comma separated list of fields to order by,
1976
- * followed by `asc` or `desc` postfix. This list is case-insensitive,
1977
- * default sorting order is ascending, redundant space characters are
1978
- * insignificant.
1979
- *
1980
- * Example: `name asc,update_time, create_time desc`
1981
- *
1982
- * Supported fields are:
1983
- *
1984
- * - `create_time`: corresponds to time the template was created.
1985
- * - `update_time`: corresponds to time the template was last updated.
1986
- * - `name`: corresponds to template's name.
1987
- * - `display_name`: corresponds to template's display name.
1988
- * @param {string} request.locationId
1989
- * Deprecated. This field has no effect.
1990
- * @param {object} [options]
1991
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1992
- * @returns {Object}
1993
- * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).
1994
- * When you iterate the returned iterable, each element will be an object representing
1995
- * [InspectTemplate]{@link google.privacy.dlp.v2.InspectTemplate}. The API will be called under the hood as needed, once per the page,
1996
- * so you can stop the iteration when you don't need more results.
950
+ * method described below for async iteration which you can stop as needed.
1997
951
  * Please see the
1998
952
  * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
1999
953
  * for more details and examples.
2000
- * @example
2001
- * const iterable = client.listInspectTemplatesAsync(request);
2002
- * for await (const response of iterable) {
2003
- * // process response
2004
- * }
2005
954
  */
2006
- listInspectTemplatesAsync(request, options) {
955
+ listInspectTemplatesStream(request, options) {
2007
956
  request = request || {};
2008
957
  options = options || {};
2009
958
  options.otherArgs = options.otherArgs || {};
@@ -2012,16 +961,15 @@ class DlpServiceClient {
2012
961
  gax.routingHeader.fromParams({
2013
962
  parent: request.parent || '',
2014
963
  });
2015
- options = options || {};
2016
- const callSettings = new gax.CallSettings(options);
964
+ const defaultCallSettings = this._defaults['listInspectTemplates'];
965
+ const callSettings = defaultCallSettings.merge(options);
2017
966
  this.initialize();
2018
- return this.descriptors.page.listInspectTemplates.asyncIterate(this.innerApiCalls['listInspectTemplates'], request, callSettings);
967
+ return this.descriptors.page.listInspectTemplates.createStream(this.innerApiCalls.listInspectTemplates, request, callSettings);
2019
968
  }
2020
969
  /**
2021
- * Lists DeidentifyTemplates.
2022
- * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
2023
- * more.
970
+ * Equivalent to `listInspectTemplates`, but returns an iterable object.
2024
971
  *
972
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
2025
973
  * @param {Object} request
2026
974
  * The request object that will be sent.
2027
975
  * @param {string} request.parent
@@ -2047,7 +995,7 @@ class DlpServiceClient {
2047
995
  * parent=projects/example-project/locations/europe-west3
2048
996
  * @param {string} request.pageToken
2049
997
  * Page token to continue retrieval. Comes from previous call
2050
- * to `ListDeidentifyTemplates`.
998
+ * to `ListInspectTemplates`.
2051
999
  * @param {number} request.pageSize
2052
1000
  * Size of the page, can be limited by server. If zero server returns
2053
1001
  * a page of max size 100.
@@ -2069,17 +1017,31 @@ class DlpServiceClient {
2069
1017
  * Deprecated. This field has no effect.
2070
1018
  * @param {object} [options]
2071
1019
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2072
- * @returns {Promise} - The promise which resolves to an array.
2073
- * The first element of the array is Array of [DeidentifyTemplate]{@link google.privacy.dlp.v2.DeidentifyTemplate}.
2074
- * The client library will perform auto-pagination by default: it will call the API as many
2075
- * times as needed and will merge results from all the pages into this array.
2076
- * Note that it can affect your quota.
2077
- * We recommend using `listDeidentifyTemplatesAsync()`
2078
- * method described below for async iteration which you can stop as needed.
1020
+ * @returns {Object}
1021
+ * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).
1022
+ * When you iterate the returned iterable, each element will be an object representing
1023
+ * [InspectTemplate]{@link google.privacy.dlp.v2.InspectTemplate}. The API will be called under the hood as needed, once per the page,
1024
+ * so you can stop the iteration when you don't need more results.
2079
1025
  * Please see the
2080
1026
  * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
2081
1027
  * for more details and examples.
1028
+ * @example <caption>include:samples/generated/v2/dlp_service.list_inspect_templates.js</caption>
1029
+ * region_tag:dlp_v2_generated_DlpService_ListInspectTemplates_async
2082
1030
  */
1031
+ listInspectTemplatesAsync(request, options) {
1032
+ request = request || {};
1033
+ options = options || {};
1034
+ options.otherArgs = options.otherArgs || {};
1035
+ options.otherArgs.headers = options.otherArgs.headers || {};
1036
+ options.otherArgs.headers['x-goog-request-params'] =
1037
+ gax.routingHeader.fromParams({
1038
+ parent: request.parent || '',
1039
+ });
1040
+ const defaultCallSettings = this._defaults['listInspectTemplates'];
1041
+ const callSettings = defaultCallSettings.merge(options);
1042
+ this.initialize();
1043
+ return this.descriptors.page.listInspectTemplates.asyncIterate(this.innerApiCalls['listInspectTemplates'], request, callSettings);
1044
+ }
2083
1045
  listDeidentifyTemplates(request, optionsOrCallback, callback) {
2084
1046
  request = request || {};
2085
1047
  let options;
@@ -2168,7 +1130,8 @@ class DlpServiceClient {
2168
1130
  gax.routingHeader.fromParams({
2169
1131
  parent: request.parent || '',
2170
1132
  });
2171
- const callSettings = new gax.CallSettings(options);
1133
+ const defaultCallSettings = this._defaults['listDeidentifyTemplates'];
1134
+ const callSettings = defaultCallSettings.merge(options);
2172
1135
  this.initialize();
2173
1136
  return this.descriptors.page.listDeidentifyTemplates.createStream(this.innerApiCalls.listDeidentifyTemplates, request, callSettings);
2174
1137
  }
@@ -2231,11 +1194,8 @@ class DlpServiceClient {
2231
1194
  * Please see the
2232
1195
  * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
2233
1196
  * for more details and examples.
2234
- * @example
2235
- * const iterable = client.listDeidentifyTemplatesAsync(request);
2236
- * for await (const response of iterable) {
2237
- * // process response
2238
- * }
1197
+ * @example <caption>include:samples/generated/v2/dlp_service.list_deidentify_templates.js</caption>
1198
+ * region_tag:dlp_v2_generated_DlpService_ListDeidentifyTemplates_async
2239
1199
  */
2240
1200
  listDeidentifyTemplatesAsync(request, options) {
2241
1201
  request = request || {};
@@ -2246,96 +1206,11 @@ class DlpServiceClient {
2246
1206
  gax.routingHeader.fromParams({
2247
1207
  parent: request.parent || '',
2248
1208
  });
2249
- options = options || {};
2250
- const callSettings = new gax.CallSettings(options);
1209
+ const defaultCallSettings = this._defaults['listDeidentifyTemplates'];
1210
+ const callSettings = defaultCallSettings.merge(options);
2251
1211
  this.initialize();
2252
1212
  return this.descriptors.page.listDeidentifyTemplates.asyncIterate(this.innerApiCalls['listDeidentifyTemplates'], request, callSettings);
2253
1213
  }
2254
- /**
2255
- * Lists job triggers.
2256
- * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
2257
- *
2258
- * @param {Object} request
2259
- * The request object that will be sent.
2260
- * @param {string} request.parent
2261
- * Required. Parent resource name.
2262
- *
2263
- * The format of this value varies depending on whether you have [specified a
2264
- * processing
2265
- * location](https://cloud.google.com/dlp/docs/specifying-location):
2266
- *
2267
- * + Projects scope, location specified:<br/>
2268
- * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
2269
- * + Projects scope, no location specified (defaults to global):<br/>
2270
- * `projects/`<var>PROJECT_ID</var>
2271
- *
2272
- * The following example `parent` string specifies a parent project with the
2273
- * identifier `example-project`, and specifies the `europe-west3` location
2274
- * for processing data:
2275
- *
2276
- * parent=projects/example-project/locations/europe-west3
2277
- * @param {string} request.pageToken
2278
- * Page token to continue retrieval. Comes from previous call
2279
- * to ListJobTriggers. `order_by` field must not
2280
- * change for subsequent calls.
2281
- * @param {number} request.pageSize
2282
- * Size of the page, can be limited by a server.
2283
- * @param {string} request.orderBy
2284
- * Comma separated list of triggeredJob fields to order by,
2285
- * followed by `asc` or `desc` postfix. This list is case-insensitive,
2286
- * default sorting order is ascending, redundant space characters are
2287
- * insignificant.
2288
- *
2289
- * Example: `name asc,update_time, create_time desc`
2290
- *
2291
- * Supported fields are:
2292
- *
2293
- * - `create_time`: corresponds to time the JobTrigger was created.
2294
- * - `update_time`: corresponds to time the JobTrigger was last updated.
2295
- * - `last_run_time`: corresponds to the last time the JobTrigger ran.
2296
- * - `name`: corresponds to JobTrigger's name.
2297
- * - `display_name`: corresponds to JobTrigger's display name.
2298
- * - `status`: corresponds to JobTrigger's status.
2299
- * @param {string} request.filter
2300
- * Allows filtering.
2301
- *
2302
- * Supported syntax:
2303
- *
2304
- * * Filter expressions are made up of one or more restrictions.
2305
- * * Restrictions can be combined by `AND` or `OR` logical operators. A
2306
- * sequence of restrictions implicitly uses `AND`.
2307
- * * A restriction has the form of `{field} {operator} {value}`.
2308
- * * Supported fields/values for inspect jobs:
2309
- * - `status` - HEALTHY|PAUSED|CANCELLED
2310
- * - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
2311
- * - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by
2312
- * quotation marks. Nanoseconds are ignored.
2313
- * - 'error_count' - Number of errors that have occurred while running.
2314
- * * The operator must be `=` or `!=` for status and inspected_storage.
2315
- *
2316
- * Examples:
2317
- *
2318
- * * inspected_storage = cloud_storage AND status = HEALTHY
2319
- * * inspected_storage = cloud_storage OR inspected_storage = bigquery
2320
- * * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY)
2321
- * * last_run_time > \"2017-12-12T00:00:00+00:00\"
2322
- *
2323
- * The length of this field should be no more than 500 characters.
2324
- * @param {string} request.locationId
2325
- * Deprecated. This field has no effect.
2326
- * @param {object} [options]
2327
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2328
- * @returns {Promise} - The promise which resolves to an array.
2329
- * The first element of the array is Array of [JobTrigger]{@link google.privacy.dlp.v2.JobTrigger}.
2330
- * The client library will perform auto-pagination by default: it will call the API as many
2331
- * times as needed and will merge results from all the pages into this array.
2332
- * Note that it can affect your quota.
2333
- * We recommend using `listJobTriggersAsync()`
2334
- * method described below for async iteration which you can stop as needed.
2335
- * Please see the
2336
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
2337
- * for more details and examples.
2338
- */
2339
1214
  listJobTriggers(request, optionsOrCallback, callback) {
2340
1215
  request = request || {};
2341
1216
  let options;
@@ -2408,7 +1283,7 @@ class DlpServiceClient {
2408
1283
  * * Restrictions can be combined by `AND` or `OR` logical operators. A
2409
1284
  * sequence of restrictions implicitly uses `AND`.
2410
1285
  * * A restriction has the form of `{field} {operator} {value}`.
2411
- * * Supported fields/values for inspect jobs:
1286
+ * * Supported fields/values for inspect triggers:
2412
1287
  * - `status` - HEALTHY|PAUSED|CANCELLED
2413
1288
  * - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
2414
1289
  * - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by
@@ -2424,6 +1299,8 @@ class DlpServiceClient {
2424
1299
  * * last_run_time > \"2017-12-12T00:00:00+00:00\"
2425
1300
  *
2426
1301
  * The length of this field should be no more than 500 characters.
1302
+ * @param {google.privacy.dlp.v2.DlpJobType} request.type
1303
+ * The type of jobs. Will use `DlpJobType.INSPECT` if not set.
2427
1304
  * @param {string} request.locationId
2428
1305
  * Deprecated. This field has no effect.
2429
1306
  * @param {object} [options]
@@ -2447,7 +1324,8 @@ class DlpServiceClient {
2447
1324
  gax.routingHeader.fromParams({
2448
1325
  parent: request.parent || '',
2449
1326
  });
2450
- const callSettings = new gax.CallSettings(options);
1327
+ const defaultCallSettings = this._defaults['listJobTriggers'];
1328
+ const callSettings = defaultCallSettings.merge(options);
2451
1329
  this.initialize();
2452
1330
  return this.descriptors.page.listJobTriggers.createStream(this.innerApiCalls.listJobTriggers, request, callSettings);
2453
1331
  }
@@ -2505,7 +1383,7 @@ class DlpServiceClient {
2505
1383
  * * Restrictions can be combined by `AND` or `OR` logical operators. A
2506
1384
  * sequence of restrictions implicitly uses `AND`.
2507
1385
  * * A restriction has the form of `{field} {operator} {value}`.
2508
- * * Supported fields/values for inspect jobs:
1386
+ * * Supported fields/values for inspect triggers:
2509
1387
  * - `status` - HEALTHY|PAUSED|CANCELLED
2510
1388
  * - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
2511
1389
  * - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by
@@ -2521,6 +1399,8 @@ class DlpServiceClient {
2521
1399
  * * last_run_time > \"2017-12-12T00:00:00+00:00\"
2522
1400
  *
2523
1401
  * The length of this field should be no more than 500 characters.
1402
+ * @param {google.privacy.dlp.v2.DlpJobType} request.type
1403
+ * The type of jobs. Will use `DlpJobType.INSPECT` if not set.
2524
1404
  * @param {string} request.locationId
2525
1405
  * Deprecated. This field has no effect.
2526
1406
  * @param {object} [options]
@@ -2533,11 +1413,8 @@ class DlpServiceClient {
2533
1413
  * Please see the
2534
1414
  * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
2535
1415
  * for more details and examples.
2536
- * @example
2537
- * const iterable = client.listJobTriggersAsync(request);
2538
- * for await (const response of iterable) {
2539
- * // process response
2540
- * }
1416
+ * @example <caption>include:samples/generated/v2/dlp_service.list_job_triggers.js</caption>
1417
+ * region_tag:dlp_v2_generated_DlpService_ListJobTriggers_async
2541
1418
  */
2542
1419
  listJobTriggersAsync(request, options) {
2543
1420
  request = request || {};
@@ -2548,99 +1425,11 @@ class DlpServiceClient {
2548
1425
  gax.routingHeader.fromParams({
2549
1426
  parent: request.parent || '',
2550
1427
  });
2551
- options = options || {};
2552
- const callSettings = new gax.CallSettings(options);
1428
+ const defaultCallSettings = this._defaults['listJobTriggers'];
1429
+ const callSettings = defaultCallSettings.merge(options);
2553
1430
  this.initialize();
2554
1431
  return this.descriptors.page.listJobTriggers.asyncIterate(this.innerApiCalls['listJobTriggers'], request, callSettings);
2555
1432
  }
2556
- /**
2557
- * Lists DlpJobs that match the specified filter in the request.
2558
- * See https://cloud.google.com/dlp/docs/inspecting-storage and
2559
- * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
2560
- *
2561
- * @param {Object} request
2562
- * The request object that will be sent.
2563
- * @param {string} request.parent
2564
- * Required. Parent resource name.
2565
- *
2566
- * The format of this value varies depending on whether you have [specified a
2567
- * processing
2568
- * location](https://cloud.google.com/dlp/docs/specifying-location):
2569
- *
2570
- * + Projects scope, location specified:<br/>
2571
- * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
2572
- * + Projects scope, no location specified (defaults to global):<br/>
2573
- * `projects/`<var>PROJECT_ID</var>
2574
- *
2575
- * The following example `parent` string specifies a parent project with the
2576
- * identifier `example-project`, and specifies the `europe-west3` location
2577
- * for processing data:
2578
- *
2579
- * parent=projects/example-project/locations/europe-west3
2580
- * @param {string} request.filter
2581
- * Allows filtering.
2582
- *
2583
- * Supported syntax:
2584
- *
2585
- * * Filter expressions are made up of one or more restrictions.
2586
- * * Restrictions can be combined by `AND` or `OR` logical operators. A
2587
- * sequence of restrictions implicitly uses `AND`.
2588
- * * A restriction has the form of `{field} {operator} {value}`.
2589
- * * Supported fields/values for inspect jobs:
2590
- * - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED
2591
- * - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY
2592
- * - `trigger_name` - The resource name of the trigger that created job.
2593
- * - 'end_time` - Corresponds to time the job finished.
2594
- * - 'start_time` - Corresponds to time the job finished.
2595
- * * Supported fields for risk analysis jobs:
2596
- * - `state` - RUNNING|CANCELED|FINISHED|FAILED
2597
- * - 'end_time` - Corresponds to time the job finished.
2598
- * - 'start_time` - Corresponds to time the job finished.
2599
- * * The operator must be `=` or `!=`.
2600
- *
2601
- * Examples:
2602
- *
2603
- * * inspected_storage = cloud_storage AND state = done
2604
- * * inspected_storage = cloud_storage OR inspected_storage = bigquery
2605
- * * inspected_storage = cloud_storage AND (state = done OR state = canceled)
2606
- * * end_time > \"2017-12-12T00:00:00+00:00\"
2607
- *
2608
- * The length of this field should be no more than 500 characters.
2609
- * @param {number} request.pageSize
2610
- * The standard list page size.
2611
- * @param {string} request.pageToken
2612
- * The standard list page token.
2613
- * @param {google.privacy.dlp.v2.DlpJobType} request.type
2614
- * The type of job. Defaults to `DlpJobType.INSPECT`
2615
- * @param {string} request.orderBy
2616
- * Comma separated list of fields to order by,
2617
- * followed by `asc` or `desc` postfix. This list is case-insensitive,
2618
- * default sorting order is ascending, redundant space characters are
2619
- * insignificant.
2620
- *
2621
- * Example: `name asc, end_time asc, create_time desc`
2622
- *
2623
- * Supported fields are:
2624
- *
2625
- * - `create_time`: corresponds to time the job was created.
2626
- * - `end_time`: corresponds to time the job ended.
2627
- * - `name`: corresponds to job's name.
2628
- * - `state`: corresponds to `state`
2629
- * @param {string} request.locationId
2630
- * Deprecated. This field has no effect.
2631
- * @param {object} [options]
2632
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2633
- * @returns {Promise} - The promise which resolves to an array.
2634
- * The first element of the array is Array of [DlpJob]{@link google.privacy.dlp.v2.DlpJob}.
2635
- * The client library will perform auto-pagination by default: it will call the API as many
2636
- * times as needed and will merge results from all the pages into this array.
2637
- * Note that it can affect your quota.
2638
- * We recommend using `listDlpJobsAsync()`
2639
- * method described below for async iteration which you can stop as needed.
2640
- * Please see the
2641
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
2642
- * for more details and examples.
2643
- */
2644
1433
  listDlpJobs(request, optionsOrCallback, callback) {
2645
1434
  request = request || {};
2646
1435
  let options;
@@ -2754,7 +1543,8 @@ class DlpServiceClient {
2754
1543
  gax.routingHeader.fromParams({
2755
1544
  parent: request.parent || '',
2756
1545
  });
2757
- const callSettings = new gax.CallSettings(options);
1546
+ const defaultCallSettings = this._defaults['listDlpJobs'];
1547
+ const callSettings = defaultCallSettings.merge(options);
2758
1548
  this.initialize();
2759
1549
  return this.descriptors.page.listDlpJobs.createStream(this.innerApiCalls.listDlpJobs, request, callSettings);
2760
1550
  }
@@ -2842,11 +1632,8 @@ class DlpServiceClient {
2842
1632
  * Please see the
2843
1633
  * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
2844
1634
  * for more details and examples.
2845
- * @example
2846
- * const iterable = client.listDlpJobsAsync(request);
2847
- * for await (const response of iterable) {
2848
- * // process response
2849
- * }
1635
+ * @example <caption>include:samples/generated/v2/dlp_service.list_dlp_jobs.js</caption>
1636
+ * region_tag:dlp_v2_generated_DlpService_ListDlpJobs_async
2850
1637
  */
2851
1638
  listDlpJobsAsync(request, options) {
2852
1639
  request = request || {};
@@ -2857,75 +1644,11 @@ class DlpServiceClient {
2857
1644
  gax.routingHeader.fromParams({
2858
1645
  parent: request.parent || '',
2859
1646
  });
2860
- options = options || {};
2861
- const callSettings = new gax.CallSettings(options);
1647
+ const defaultCallSettings = this._defaults['listDlpJobs'];
1648
+ const callSettings = defaultCallSettings.merge(options);
2862
1649
  this.initialize();
2863
1650
  return this.descriptors.page.listDlpJobs.asyncIterate(this.innerApiCalls['listDlpJobs'], request, callSettings);
2864
1651
  }
2865
- /**
2866
- * Lists stored infoTypes.
2867
- * See https://cloud.google.com/dlp/docs/creating-stored-infotypes to
2868
- * learn more.
2869
- *
2870
- * @param {Object} request
2871
- * The request object that will be sent.
2872
- * @param {string} request.parent
2873
- * Required. Parent resource name.
2874
- *
2875
- * The format of this value varies depending on the scope of the request
2876
- * (project or organization) and whether you have [specified a processing
2877
- * location](https://cloud.google.com/dlp/docs/specifying-location):
2878
- *
2879
- * + Projects scope, location specified:<br/>
2880
- * `projects/`<var>PROJECT_ID</var>`/locations/`<var>LOCATION_ID</var>
2881
- * + Projects scope, no location specified (defaults to global):<br/>
2882
- * `projects/`<var>PROJECT_ID</var>
2883
- * + Organizations scope, location specified:<br/>
2884
- * `organizations/`<var>ORG_ID</var>`/locations/`<var>LOCATION_ID</var>
2885
- * + Organizations scope, no location specified (defaults to global):<br/>
2886
- * `organizations/`<var>ORG_ID</var>
2887
- *
2888
- * The following example `parent` string specifies a parent project with the
2889
- * identifier `example-project`, and specifies the `europe-west3` location
2890
- * for processing data:
2891
- *
2892
- * parent=projects/example-project/locations/europe-west3
2893
- * @param {string} request.pageToken
2894
- * Page token to continue retrieval. Comes from previous call
2895
- * to `ListStoredInfoTypes`.
2896
- * @param {number} request.pageSize
2897
- * Size of the page, can be limited by server. If zero server returns
2898
- * a page of max size 100.
2899
- * @param {string} request.orderBy
2900
- * Comma separated list of fields to order by,
2901
- * followed by `asc` or `desc` postfix. This list is case-insensitive,
2902
- * default sorting order is ascending, redundant space characters are
2903
- * insignificant.
2904
- *
2905
- * Example: `name asc, display_name, create_time desc`
2906
- *
2907
- * Supported fields are:
2908
- *
2909
- * - `create_time`: corresponds to time the most recent version of the
2910
- * resource was created.
2911
- * - `state`: corresponds to the state of the resource.
2912
- * - `name`: corresponds to resource name.
2913
- * - `display_name`: corresponds to info type's display name.
2914
- * @param {string} request.locationId
2915
- * Deprecated. This field has no effect.
2916
- * @param {object} [options]
2917
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2918
- * @returns {Promise} - The promise which resolves to an array.
2919
- * The first element of the array is Array of [StoredInfoType]{@link google.privacy.dlp.v2.StoredInfoType}.
2920
- * The client library will perform auto-pagination by default: it will call the API as many
2921
- * times as needed and will merge results from all the pages into this array.
2922
- * Note that it can affect your quota.
2923
- * We recommend using `listStoredInfoTypesAsync()`
2924
- * method described below for async iteration which you can stop as needed.
2925
- * Please see the
2926
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
2927
- * for more details and examples.
2928
- */
2929
1652
  listStoredInfoTypes(request, optionsOrCallback, callback) {
2930
1653
  request = request || {};
2931
1654
  let options;
@@ -3015,7 +1738,8 @@ class DlpServiceClient {
3015
1738
  gax.routingHeader.fromParams({
3016
1739
  parent: request.parent || '',
3017
1740
  });
3018
- const callSettings = new gax.CallSettings(options);
1741
+ const defaultCallSettings = this._defaults['listStoredInfoTypes'];
1742
+ const callSettings = defaultCallSettings.merge(options);
3019
1743
  this.initialize();
3020
1744
  return this.descriptors.page.listStoredInfoTypes.createStream(this.innerApiCalls.listStoredInfoTypes, request, callSettings);
3021
1745
  }
@@ -3079,11 +1803,8 @@ class DlpServiceClient {
3079
1803
  * Please see the
3080
1804
  * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
3081
1805
  * for more details and examples.
3082
- * @example
3083
- * const iterable = client.listStoredInfoTypesAsync(request);
3084
- * for await (const response of iterable) {
3085
- * // process response
3086
- * }
1806
+ * @example <caption>include:samples/generated/v2/dlp_service.list_stored_info_types.js</caption>
1807
+ * region_tag:dlp_v2_generated_DlpService_ListStoredInfoTypes_async
3087
1808
  */
3088
1809
  listStoredInfoTypesAsync(request, options) {
3089
1810
  request = request || {};
@@ -3094,8 +1815,8 @@ class DlpServiceClient {
3094
1815
  gax.routingHeader.fromParams({
3095
1816
  parent: request.parent || '',
3096
1817
  });
3097
- options = options || {};
3098
- const callSettings = new gax.CallSettings(options);
1818
+ const defaultCallSettings = this._defaults['listStoredInfoTypes'];
1819
+ const callSettings = defaultCallSettings.merge(options);
3099
1820
  this.initialize();
3100
1821
  return this.descriptors.page.listStoredInfoTypes.asyncIterate(this.innerApiCalls['listStoredInfoTypes'], request, callSettings);
3101
1822
  }
@@ -3844,8 +2565,7 @@ class DlpServiceClient {
3844
2565
  * @returns {Promise} A promise that resolves when the client is closed.
3845
2566
  */
3846
2567
  close() {
3847
- this.initialize();
3848
- if (!this._terminated) {
2568
+ if (this.dlpServiceStub && !this._terminated) {
3849
2569
  return this.dlpServiceStub.then(stub => {
3850
2570
  this._terminated = true;
3851
2571
  stub.close();