google-cloud-dlp-v2 1.18.0 → 1.19.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.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/README.md +2 -6
  4. data/lib/google/cloud/dlp/v2/dlp_service/client.rb +546 -52
  5. data/lib/google/cloud/dlp/v2/dlp_service/credentials.rb +1 -1
  6. data/lib/google/cloud/dlp/v2/dlp_service/paths.rb +20 -1
  7. data/lib/google/cloud/dlp/v2/dlp_service/rest/client.rb +511 -52
  8. data/lib/google/cloud/dlp/v2/dlp_service/rest/service_stub.rb +308 -1
  9. data/lib/google/cloud/dlp/v2/dlp_service/rest.rb +2 -2
  10. data/lib/google/cloud/dlp/v2/dlp_service.rb +2 -2
  11. data/lib/google/cloud/dlp/v2/rest.rb +1 -1
  12. data/lib/google/cloud/dlp/v2/version.rb +1 -1
  13. data/lib/google/cloud/dlp/v2.rb +1 -1
  14. data/lib/google/privacy/dlp/v2/dlp_pb.rb +20 -1
  15. data/lib/google/privacy/dlp/v2/dlp_services_pb.rb +48 -38
  16. data/lib/google/privacy/dlp/v2/storage_pb.rb +5 -1
  17. data/lib/google-cloud-dlp-v2.rb +1 -1
  18. data/proto_docs/README.md +1 -1
  19. data/proto_docs/google/api/client.rb +1 -1
  20. data/proto_docs/google/api/field_behavior.rb +1 -1
  21. data/proto_docs/google/api/launch_stage.rb +1 -1
  22. data/proto_docs/google/api/resource.rb +1 -1
  23. data/proto_docs/google/privacy/dlp/v2/dlp.rb +453 -141
  24. data/proto_docs/google/privacy/dlp/v2/storage.rb +76 -20
  25. data/proto_docs/google/protobuf/any.rb +1 -1
  26. data/proto_docs/google/protobuf/duration.rb +1 -1
  27. data/proto_docs/google/protobuf/empty.rb +1 -1
  28. data/proto_docs/google/protobuf/field_mask.rb +1 -1
  29. data/proto_docs/google/protobuf/timestamp.rb +8 -7
  30. data/proto_docs/google/rpc/status.rb +1 -1
  31. data/proto_docs/google/type/date.rb +1 -1
  32. data/proto_docs/google/type/dayofweek.rb +1 -1
  33. data/proto_docs/google/type/timeofday.rb +1 -1
  34. metadata +6 -5
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2020 Google LLC
3
+ # Copyright 2026 Google LLC
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -32,7 +32,7 @@ module Google
32
32
  # inspection, classification, and de-identification platform that works
33
33
  # on text, images, and Google Cloud storage repositories.
34
34
  # To learn more about concepts and find how-to guides see
35
- # https://cloud.google.com/sensitive-data-protection/docs/.
35
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/.
36
36
  #
37
37
  class Client
38
38
  # @private
@@ -404,9 +404,9 @@ module Google
404
404
  # be all types, but may change over time as detectors are updated.
405
405
  #
406
406
  # For how to guides, see
407
- # https://cloud.google.com/sensitive-data-protection/docs/inspecting-images
407
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-images
408
408
  # and
409
- # https://cloud.google.com/sensitive-data-protection/docs/inspecting-text,
409
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-text,
410
410
  #
411
411
  # @overload inspect_content(request, options = nil)
412
412
  # Pass arguments to `inspect_content` via a request object, either of type
@@ -428,7 +428,7 @@ module Google
428
428
  #
429
429
  # The format of this value varies depending on whether you have [specified a
430
430
  # processing
431
- # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
431
+ # location](https://docs.cloud.google.com/sensitive-data-protection/docs/specifying-location):
432
432
  #
433
433
  # + Projects scope, location specified:
434
434
  # `projects/{project_id}/locations/{location_id}`
@@ -522,7 +522,7 @@ module Google
522
522
  # Redacts potentially sensitive info from an image.
523
523
  # This method has limits on input size, processing time, and output size.
524
524
  # See
525
- # https://cloud.google.com/sensitive-data-protection/docs/redacting-sensitive-data-images
525
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/redacting-sensitive-data-images
526
526
  # to learn more.
527
527
  #
528
528
  # When no InfoTypes or CustomInfoTypes are specified in this request, the
@@ -552,7 +552,7 @@ module Google
552
552
  #
553
553
  # The format of this value varies depending on whether you have [specified a
554
554
  # processing
555
- # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
555
+ # location](https://docs.cloud.google.com/sensitive-data-protection/docs/specifying-location):
556
556
  #
557
557
  # + Projects scope, location specified:
558
558
  # `projects/{project_id}/locations/{location_id}`
@@ -661,7 +661,7 @@ module Google
661
661
  # De-identifies potentially sensitive info from a ContentItem.
662
662
  # This method has limits on input size and output size.
663
663
  # See
664
- # https://cloud.google.com/sensitive-data-protection/docs/deidentify-sensitive-data
664
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/deidentify-sensitive-data
665
665
  # to learn more.
666
666
  #
667
667
  # When no InfoTypes or CustomInfoTypes are specified in this request, the
@@ -688,7 +688,7 @@ module Google
688
688
  #
689
689
  # The format of this value varies depending on whether you have [specified a
690
690
  # processing
691
- # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
691
+ # location](https://docs.cloud.google.com/sensitive-data-protection/docs/specifying-location):
692
692
  #
693
693
  # + Projects scope, location specified:
694
694
  # `projects/{project_id}/locations/{location_id}`
@@ -799,7 +799,7 @@ module Google
799
799
  ##
800
800
  # Re-identifies content that has been de-identified.
801
801
  # See
802
- # https://cloud.google.com/sensitive-data-protection/docs/pseudonymization#re-identification_in_free_text_code_example
802
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/pseudonymization#re-identification_in_free_text_code_example
803
803
  # to learn more.
804
804
  #
805
805
  # @overload reidentify_content(request, options = nil)
@@ -822,7 +822,7 @@ module Google
822
822
  #
823
823
  # The format of this value varies depending on whether you have [specified a
824
824
  # processing
825
- # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
825
+ # location](https://docs.cloud.google.com/sensitive-data-protection/docs/specifying-location):
826
826
  #
827
827
  # + Projects scope, location specified:
828
828
  # `projects/{project_id}/locations/{location_id}`
@@ -933,7 +933,7 @@ module Google
933
933
  ##
934
934
  # Returns a list of the sensitive information types that the DLP API
935
935
  # supports. See
936
- # https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference
936
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/infotypes-reference
937
937
  # to learn more.
938
938
  #
939
939
  # @overload list_info_types(request, options = nil)
@@ -1027,7 +1027,7 @@ module Google
1027
1027
  # Creates an InspectTemplate for reusing frequently used configuration
1028
1028
  # for inspecting content, images, and storage.
1029
1029
  # See
1030
- # https://cloud.google.com/sensitive-data-protection/docs/creating-templates
1030
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates
1031
1031
  # to learn more.
1032
1032
  #
1033
1033
  # @overload create_inspect_template(request, options = nil)
@@ -1050,7 +1050,7 @@ module Google
1050
1050
  #
1051
1051
  # The format of this value varies depending on the scope of the request
1052
1052
  # (project or organization) and whether you have [specified a processing
1053
- # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
1053
+ # location](https://docs.cloud.google.com/sensitive-data-protection/docs/specifying-location):
1054
1054
  #
1055
1055
  # + Projects scope, location specified:
1056
1056
  # `projects/{project_id}/locations/{location_id}`
@@ -1143,7 +1143,7 @@ module Google
1143
1143
  ##
1144
1144
  # Updates the InspectTemplate.
1145
1145
  # See
1146
- # https://cloud.google.com/sensitive-data-protection/docs/creating-templates
1146
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates
1147
1147
  # to learn more.
1148
1148
  #
1149
1149
  # @overload update_inspect_template(request, options = nil)
@@ -1237,7 +1237,7 @@ module Google
1237
1237
  ##
1238
1238
  # Gets an InspectTemplate.
1239
1239
  # See
1240
- # https://cloud.google.com/sensitive-data-protection/docs/creating-templates
1240
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates
1241
1241
  # to learn more.
1242
1242
  #
1243
1243
  # @overload get_inspect_template(request, options = nil)
@@ -1327,7 +1327,7 @@ module Google
1327
1327
  ##
1328
1328
  # Lists InspectTemplates.
1329
1329
  # See
1330
- # https://cloud.google.com/sensitive-data-protection/docs/creating-templates
1330
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates
1331
1331
  # to learn more.
1332
1332
  #
1333
1333
  # @overload list_inspect_templates(request, options = nil)
@@ -1350,7 +1350,7 @@ module Google
1350
1350
  #
1351
1351
  # The format of this value varies depending on the scope of the request
1352
1352
  # (project or organization) and whether you have [specified a processing
1353
- # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
1353
+ # location](https://docs.cloud.google.com/sensitive-data-protection/docs/specifying-location):
1354
1354
  #
1355
1355
  # + Projects scope, location specified:
1356
1356
  # `projects/{project_id}/locations/{location_id}`
@@ -1462,7 +1462,7 @@ module Google
1462
1462
  ##
1463
1463
  # Deletes an InspectTemplate.
1464
1464
  # See
1465
- # https://cloud.google.com/sensitive-data-protection/docs/creating-templates
1465
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates
1466
1466
  # to learn more.
1467
1467
  #
1468
1468
  # @overload delete_inspect_template(request, options = nil)
@@ -1553,7 +1553,7 @@ module Google
1553
1553
  # Creates a DeidentifyTemplate for reusing frequently used configuration
1554
1554
  # for de-identifying content, images, and storage.
1555
1555
  # See
1556
- # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid
1556
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates-deid
1557
1557
  # to learn more.
1558
1558
  #
1559
1559
  # @overload create_deidentify_template(request, options = nil)
@@ -1576,7 +1576,7 @@ module Google
1576
1576
  #
1577
1577
  # The format of this value varies depending on the scope of the request
1578
1578
  # (project or organization) and whether you have [specified a processing
1579
- # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
1579
+ # location](https://docs.cloud.google.com/sensitive-data-protection/docs/specifying-location):
1580
1580
  #
1581
1581
  # + Projects scope, location specified:
1582
1582
  # `projects/{project_id}/locations/{location_id}`
@@ -1669,7 +1669,7 @@ module Google
1669
1669
  ##
1670
1670
  # Updates the DeidentifyTemplate.
1671
1671
  # See
1672
- # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid
1672
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates-deid
1673
1673
  # to learn more.
1674
1674
  #
1675
1675
  # @overload update_deidentify_template(request, options = nil)
@@ -1764,7 +1764,7 @@ module Google
1764
1764
  ##
1765
1765
  # Gets a DeidentifyTemplate.
1766
1766
  # See
1767
- # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid
1767
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates-deid
1768
1768
  # to learn more.
1769
1769
  #
1770
1770
  # @overload get_deidentify_template(request, options = nil)
@@ -1854,7 +1854,7 @@ module Google
1854
1854
  ##
1855
1855
  # Lists DeidentifyTemplates.
1856
1856
  # See
1857
- # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid
1857
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates-deid
1858
1858
  # to learn more.
1859
1859
  #
1860
1860
  # @overload list_deidentify_templates(request, options = nil)
@@ -1877,7 +1877,7 @@ module Google
1877
1877
  #
1878
1878
  # The format of this value varies depending on the scope of the request
1879
1879
  # (project or organization) and whether you have [specified a processing
1880
- # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
1880
+ # location](https://docs.cloud.google.com/sensitive-data-protection/docs/specifying-location):
1881
1881
  #
1882
1882
  # + Projects scope, location specified:
1883
1883
  # `projects/{project_id}/locations/{location_id}`
@@ -1989,7 +1989,7 @@ module Google
1989
1989
  ##
1990
1990
  # Deletes a DeidentifyTemplate.
1991
1991
  # See
1992
- # https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid
1992
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/creating-templates-deid
1993
1993
  # to learn more.
1994
1994
  #
1995
1995
  # @overload delete_deidentify_template(request, options = nil)
@@ -2081,7 +2081,7 @@ module Google
2081
2081
  # Creates a job trigger to run DLP actions such as scanning storage for
2082
2082
  # sensitive information on a set schedule.
2083
2083
  # See
2084
- # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers
2084
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/creating-job-triggers
2085
2085
  # to learn more.
2086
2086
  #
2087
2087
  # @overload create_job_trigger(request, options = nil)
@@ -2104,7 +2104,7 @@ module Google
2104
2104
  #
2105
2105
  # The format of this value varies depending on whether you have [specified a
2106
2106
  # processing
2107
- # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
2107
+ # location](https://docs.cloud.google.com/sensitive-data-protection/docs/specifying-location):
2108
2108
  #
2109
2109
  # + Projects scope, location specified:
2110
2110
  # `projects/{project_id}/locations/{location_id}`
@@ -2193,7 +2193,7 @@ module Google
2193
2193
  ##
2194
2194
  # Updates a job trigger.
2195
2195
  # See
2196
- # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers
2196
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/creating-job-triggers
2197
2197
  # to learn more.
2198
2198
  #
2199
2199
  # @overload update_job_trigger(request, options = nil)
@@ -2376,7 +2376,7 @@ module Google
2376
2376
  ##
2377
2377
  # Gets a job trigger.
2378
2378
  # See
2379
- # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers
2379
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/creating-job-triggers
2380
2380
  # to learn more.
2381
2381
  #
2382
2382
  # @overload get_job_trigger(request, options = nil)
@@ -2465,7 +2465,7 @@ module Google
2465
2465
  ##
2466
2466
  # Lists job triggers.
2467
2467
  # See
2468
- # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers
2468
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/creating-job-triggers
2469
2469
  # to learn more.
2470
2470
  #
2471
2471
  # @overload list_job_triggers(request, options = nil)
@@ -2488,7 +2488,7 @@ module Google
2488
2488
  #
2489
2489
  # The format of this value varies depending on whether you have [specified a
2490
2490
  # processing
2491
- # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
2491
+ # location](https://docs.cloud.google.com/sensitive-data-protection/docs/specifying-location):
2492
2492
  #
2493
2493
  # + Projects scope, location specified:
2494
2494
  # `projects/{project_id}/locations/{location_id}`
@@ -2627,7 +2627,7 @@ module Google
2627
2627
  ##
2628
2628
  # Deletes a job trigger.
2629
2629
  # See
2630
- # https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers
2630
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/creating-job-triggers
2631
2631
  # to learn more.
2632
2632
  #
2633
2633
  # @overload delete_job_trigger(request, options = nil)
@@ -3290,9 +3290,9 @@ module Google
3290
3290
  ##
3291
3291
  # Creates a new job to inspect storage or calculate risk metrics.
3292
3292
  # See
3293
- # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage
3293
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-storage
3294
3294
  # and
3295
- # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis
3295
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis
3296
3296
  # to learn more.
3297
3297
  #
3298
3298
  # When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the
@@ -3319,7 +3319,7 @@ module Google
3319
3319
  #
3320
3320
  # The format of this value varies depending on whether you have [specified a
3321
3321
  # processing
3322
- # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
3322
+ # location](https://docs.cloud.google.com/sensitive-data-protection/docs/specifying-location):
3323
3323
  #
3324
3324
  # + Projects scope, location specified:
3325
3325
  # `projects/{project_id}/locations/{location_id}`
@@ -3415,9 +3415,9 @@ module Google
3415
3415
  ##
3416
3416
  # Lists DlpJobs that match the specified filter in the request.
3417
3417
  # See
3418
- # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage
3418
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-storage
3419
3419
  # and
3420
- # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis
3420
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis
3421
3421
  # to learn more.
3422
3422
  #
3423
3423
  # @overload list_dlp_jobs(request, options = nil)
@@ -3440,7 +3440,7 @@ module Google
3440
3440
  #
3441
3441
  # The format of this value varies depending on whether you have [specified a
3442
3442
  # processing
3443
- # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
3443
+ # location](https://docs.cloud.google.com/sensitive-data-protection/docs/specifying-location):
3444
3444
  #
3445
3445
  # + Projects scope, location specified:
3446
3446
  # `projects/{project_id}/locations/{location_id}`
@@ -3579,9 +3579,9 @@ module Google
3579
3579
  ##
3580
3580
  # Gets the latest state of a long-running DlpJob.
3581
3581
  # See
3582
- # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage
3582
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-storage
3583
3583
  # and
3584
- # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis
3584
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis
3585
3585
  # to learn more.
3586
3586
  #
3587
3587
  # @overload get_dlp_job(request, options = nil)
@@ -3671,9 +3671,9 @@ module Google
3671
3671
  # no longer interested in the DlpJob result. The job will be canceled if
3672
3672
  # possible.
3673
3673
  # See
3674
- # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage
3674
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-storage
3675
3675
  # and
3676
- # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis
3676
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis
3677
3677
  # to learn more.
3678
3678
  #
3679
3679
  # @overload delete_dlp_job(request, options = nil)
@@ -3763,9 +3763,9 @@ module Google
3763
3763
  # makes a best effort to cancel the DlpJob, but success is not
3764
3764
  # guaranteed.
3765
3765
  # See
3766
- # https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage
3766
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/inspecting-storage
3767
3767
  # and
3768
- # https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis
3768
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis
3769
3769
  # to learn more.
3770
3770
  #
3771
3771
  # @overload cancel_dlp_job(request, options = nil)
@@ -3853,7 +3853,7 @@ module Google
3853
3853
  ##
3854
3854
  # Creates a pre-built stored infoType to be used for inspection.
3855
3855
  # See
3856
- # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes
3856
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes
3857
3857
  # to learn more.
3858
3858
  #
3859
3859
  # @overload create_stored_info_type(request, options = nil)
@@ -3876,7 +3876,7 @@ module Google
3876
3876
  #
3877
3877
  # The format of this value varies depending on the scope of the request
3878
3878
  # (project or organization) and whether you have [specified a processing
3879
- # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
3879
+ # location](https://docs.cloud.google.com/sensitive-data-protection/docs/specifying-location):
3880
3880
  #
3881
3881
  # + Projects scope, location specified:
3882
3882
  # `projects/{project_id}/locations/{location_id}`
@@ -3970,7 +3970,7 @@ module Google
3970
3970
  # Updates the stored infoType by creating a new version. The existing version
3971
3971
  # will continue to be used until the new version is ready.
3972
3972
  # See
3973
- # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes
3973
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes
3974
3974
  # to learn more.
3975
3975
  #
3976
3976
  # @overload update_stored_info_type(request, options = nil)
@@ -4066,7 +4066,7 @@ module Google
4066
4066
  ##
4067
4067
  # Gets a stored infoType.
4068
4068
  # See
4069
- # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes
4069
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes
4070
4070
  # to learn more.
4071
4071
  #
4072
4072
  # @overload get_stored_info_type(request, options = nil)
@@ -4156,7 +4156,7 @@ module Google
4156
4156
  ##
4157
4157
  # Lists stored infoTypes.
4158
4158
  # See
4159
- # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes
4159
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes
4160
4160
  # to learn more.
4161
4161
  #
4162
4162
  # @overload list_stored_info_types(request, options = nil)
@@ -4179,7 +4179,7 @@ module Google
4179
4179
  #
4180
4180
  # The format of this value varies depending on the scope of the request
4181
4181
  # (project or organization) and whether you have [specified a processing
4182
- # location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location):
4182
+ # location](https://docs.cloud.google.com/sensitive-data-protection/docs/specifying-location):
4183
4183
  #
4184
4184
  # + Projects scope, location specified:
4185
4185
  # `projects/{project_id}/locations/{location_id}`
@@ -4288,7 +4288,7 @@ module Google
4288
4288
  ##
4289
4289
  # Deletes a stored infoType.
4290
4290
  # See
4291
- # https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes
4291
+ # https://docs.cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes
4292
4292
  # to learn more.
4293
4293
  #
4294
4294
  # @overload delete_stored_info_type(request, options = nil)
@@ -6242,6 +6242,465 @@ module Google
6242
6242
  raise ::Google::Cloud::Error.from_error(e)
6243
6243
  end
6244
6244
 
6245
+ ##
6246
+ # Create a ContentPolicy.
6247
+ #
6248
+ # @overload create_content_policy(request, options = nil)
6249
+ # Pass arguments to `create_content_policy` via a request object, either of type
6250
+ # {::Google::Cloud::Dlp::V2::CreateContentPolicyRequest} or an equivalent Hash.
6251
+ #
6252
+ # @param request [::Google::Cloud::Dlp::V2::CreateContentPolicyRequest, ::Hash]
6253
+ # A request object representing the call parameters. Required. To specify no
6254
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
6255
+ # @param options [::Gapic::CallOptions, ::Hash]
6256
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
6257
+ #
6258
+ # @overload create_content_policy(parent: nil, content_policy: nil, content_policy_id: nil)
6259
+ # Pass arguments to `create_content_policy` via keyword arguments. Note that at
6260
+ # least one keyword argument is required. To specify no parameters, or to keep all
6261
+ # the default parameter values, pass an empty Hash as a request object (see above).
6262
+ #
6263
+ # @param parent [::String]
6264
+ # Required. Parent resource name.
6265
+ #
6266
+ # The format of this value varies depending on the scope of the request
6267
+ # (project):
6268
+ #
6269
+ # + Projects scope:
6270
+ # `projects/{project_id}/locations/{location_id}`
6271
+ # @param content_policy [::Google::Cloud::Dlp::V2::ContentPolicy, ::Hash]
6272
+ # Required. The content_policy resource.
6273
+ # @param content_policy_id [::String]
6274
+ # Optional. The content policy ID can contain uppercase and lowercase
6275
+ # letters, numbers, and hyphens; that is, it must match the regular
6276
+ # expression:
6277
+ # `[a-zA-Z\d-_]+`.
6278
+ # The maximum length is 100 characters. If empty, the system will generate
6279
+ # a random id.
6280
+ #
6281
+ # @yield [response, operation] Access the result along with the RPC operation
6282
+ # @yieldparam response [::Google::Cloud::Dlp::V2::ContentPolicy]
6283
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
6284
+ #
6285
+ # @return [::Google::Cloud::Dlp::V2::ContentPolicy]
6286
+ #
6287
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
6288
+ #
6289
+ # @example Basic example
6290
+ # require "google/cloud/dlp/v2"
6291
+ #
6292
+ # # Create a client object. The client can be reused for multiple calls.
6293
+ # client = Google::Cloud::Dlp::V2::DlpService::Client.new
6294
+ #
6295
+ # # Create a request. To set request fields, pass in keyword arguments.
6296
+ # request = Google::Cloud::Dlp::V2::CreateContentPolicyRequest.new
6297
+ #
6298
+ # # Call the create_content_policy method.
6299
+ # result = client.create_content_policy request
6300
+ #
6301
+ # # The returned object is of type Google::Cloud::Dlp::V2::ContentPolicy.
6302
+ # p result
6303
+ #
6304
+ def create_content_policy request, options = nil
6305
+ raise ::ArgumentError, "request must be provided" if request.nil?
6306
+
6307
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::CreateContentPolicyRequest
6308
+
6309
+ # Converts hash and nil to an options object
6310
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
6311
+
6312
+ # Customize the options with defaults
6313
+ metadata = @config.rpcs.create_content_policy.metadata.to_h
6314
+
6315
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
6316
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
6317
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
6318
+ gapic_version: ::Google::Cloud::Dlp::V2::VERSION
6319
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
6320
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
6321
+
6322
+ header_params = {}
6323
+ if request.parent
6324
+ header_params["parent"] = request.parent
6325
+ end
6326
+
6327
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
6328
+ metadata[:"x-goog-request-params"] ||= request_params_header
6329
+
6330
+ options.apply_defaults timeout: @config.rpcs.create_content_policy.timeout,
6331
+ metadata: metadata,
6332
+ retry_policy: @config.rpcs.create_content_policy.retry_policy
6333
+
6334
+ options.apply_defaults timeout: @config.timeout,
6335
+ metadata: @config.metadata,
6336
+ retry_policy: @config.retry_policy
6337
+
6338
+ @dlp_service_stub.call_rpc :create_content_policy, request, options: options do |response, operation|
6339
+ yield response, operation if block_given?
6340
+ end
6341
+ rescue ::GRPC::BadStatus => e
6342
+ raise ::Google::Cloud::Error.from_error(e)
6343
+ end
6344
+
6345
+ ##
6346
+ # Update a ContentPolicy.
6347
+ #
6348
+ # @overload update_content_policy(request, options = nil)
6349
+ # Pass arguments to `update_content_policy` via a request object, either of type
6350
+ # {::Google::Cloud::Dlp::V2::UpdateContentPolicyRequest} or an equivalent Hash.
6351
+ #
6352
+ # @param request [::Google::Cloud::Dlp::V2::UpdateContentPolicyRequest, ::Hash]
6353
+ # A request object representing the call parameters. Required. To specify no
6354
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
6355
+ # @param options [::Gapic::CallOptions, ::Hash]
6356
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
6357
+ #
6358
+ # @overload update_content_policy(name: nil, content_policy: nil, update_mask: nil)
6359
+ # Pass arguments to `update_content_policy` via keyword arguments. Note that at
6360
+ # least one keyword argument is required. To specify no parameters, or to keep all
6361
+ # the default parameter values, pass an empty Hash as a request object (see above).
6362
+ #
6363
+ # @param name [::String]
6364
+ # Required. Resource name in the format:
6365
+ # `projects/{project}/locations/{location}/contentPolicies/{content_policy}`.
6366
+ # @param content_policy [::Google::Cloud::Dlp::V2::ContentPolicy, ::Hash]
6367
+ # Required. The content_policy with new values for the relevant fields.
6368
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
6369
+ # Optional. Mask to control which fields get updated.
6370
+ #
6371
+ # @yield [response, operation] Access the result along with the RPC operation
6372
+ # @yieldparam response [::Google::Cloud::Dlp::V2::ContentPolicy]
6373
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
6374
+ #
6375
+ # @return [::Google::Cloud::Dlp::V2::ContentPolicy]
6376
+ #
6377
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
6378
+ #
6379
+ # @example Basic example
6380
+ # require "google/cloud/dlp/v2"
6381
+ #
6382
+ # # Create a client object. The client can be reused for multiple calls.
6383
+ # client = Google::Cloud::Dlp::V2::DlpService::Client.new
6384
+ #
6385
+ # # Create a request. To set request fields, pass in keyword arguments.
6386
+ # request = Google::Cloud::Dlp::V2::UpdateContentPolicyRequest.new
6387
+ #
6388
+ # # Call the update_content_policy method.
6389
+ # result = client.update_content_policy request
6390
+ #
6391
+ # # The returned object is of type Google::Cloud::Dlp::V2::ContentPolicy.
6392
+ # p result
6393
+ #
6394
+ def update_content_policy request, options = nil
6395
+ raise ::ArgumentError, "request must be provided" if request.nil?
6396
+
6397
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::UpdateContentPolicyRequest
6398
+
6399
+ # Converts hash and nil to an options object
6400
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
6401
+
6402
+ # Customize the options with defaults
6403
+ metadata = @config.rpcs.update_content_policy.metadata.to_h
6404
+
6405
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
6406
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
6407
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
6408
+ gapic_version: ::Google::Cloud::Dlp::V2::VERSION
6409
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
6410
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
6411
+
6412
+ header_params = {}
6413
+ if request.name
6414
+ header_params["name"] = request.name
6415
+ end
6416
+
6417
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
6418
+ metadata[:"x-goog-request-params"] ||= request_params_header
6419
+
6420
+ options.apply_defaults timeout: @config.rpcs.update_content_policy.timeout,
6421
+ metadata: metadata,
6422
+ retry_policy: @config.rpcs.update_content_policy.retry_policy
6423
+
6424
+ options.apply_defaults timeout: @config.timeout,
6425
+ metadata: @config.metadata,
6426
+ retry_policy: @config.retry_policy
6427
+
6428
+ @dlp_service_stub.call_rpc :update_content_policy, request, options: options do |response, operation|
6429
+ yield response, operation if block_given?
6430
+ end
6431
+ rescue ::GRPC::BadStatus => e
6432
+ raise ::Google::Cloud::Error.from_error(e)
6433
+ end
6434
+
6435
+ ##
6436
+ # Get a ContentPolicy.
6437
+ #
6438
+ # @overload get_content_policy(request, options = nil)
6439
+ # Pass arguments to `get_content_policy` via a request object, either of type
6440
+ # {::Google::Cloud::Dlp::V2::GetContentPolicyRequest} or an equivalent Hash.
6441
+ #
6442
+ # @param request [::Google::Cloud::Dlp::V2::GetContentPolicyRequest, ::Hash]
6443
+ # A request object representing the call parameters. Required. To specify no
6444
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
6445
+ # @param options [::Gapic::CallOptions, ::Hash]
6446
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
6447
+ #
6448
+ # @overload get_content_policy(name: nil)
6449
+ # Pass arguments to `get_content_policy` via keyword arguments. Note that at
6450
+ # least one keyword argument is required. To specify no parameters, or to keep all
6451
+ # the default parameter values, pass an empty Hash as a request object (see above).
6452
+ #
6453
+ # @param name [::String]
6454
+ # Required. Resource name in the format:
6455
+ # `projects/{project}/locations/{location}/contentPolicies/{content_policy}`.
6456
+ #
6457
+ # @yield [response, operation] Access the result along with the RPC operation
6458
+ # @yieldparam response [::Google::Cloud::Dlp::V2::ContentPolicy]
6459
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
6460
+ #
6461
+ # @return [::Google::Cloud::Dlp::V2::ContentPolicy]
6462
+ #
6463
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
6464
+ #
6465
+ # @example Basic example
6466
+ # require "google/cloud/dlp/v2"
6467
+ #
6468
+ # # Create a client object. The client can be reused for multiple calls.
6469
+ # client = Google::Cloud::Dlp::V2::DlpService::Client.new
6470
+ #
6471
+ # # Create a request. To set request fields, pass in keyword arguments.
6472
+ # request = Google::Cloud::Dlp::V2::GetContentPolicyRequest.new
6473
+ #
6474
+ # # Call the get_content_policy method.
6475
+ # result = client.get_content_policy request
6476
+ #
6477
+ # # The returned object is of type Google::Cloud::Dlp::V2::ContentPolicy.
6478
+ # p result
6479
+ #
6480
+ def get_content_policy request, options = nil
6481
+ raise ::ArgumentError, "request must be provided" if request.nil?
6482
+
6483
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::GetContentPolicyRequest
6484
+
6485
+ # Converts hash and nil to an options object
6486
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
6487
+
6488
+ # Customize the options with defaults
6489
+ metadata = @config.rpcs.get_content_policy.metadata.to_h
6490
+
6491
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
6492
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
6493
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
6494
+ gapic_version: ::Google::Cloud::Dlp::V2::VERSION
6495
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
6496
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
6497
+
6498
+ header_params = {}
6499
+ if request.name
6500
+ header_params["name"] = request.name
6501
+ end
6502
+
6503
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
6504
+ metadata[:"x-goog-request-params"] ||= request_params_header
6505
+
6506
+ options.apply_defaults timeout: @config.rpcs.get_content_policy.timeout,
6507
+ metadata: metadata,
6508
+ retry_policy: @config.rpcs.get_content_policy.retry_policy
6509
+
6510
+ options.apply_defaults timeout: @config.timeout,
6511
+ metadata: @config.metadata,
6512
+ retry_policy: @config.retry_policy
6513
+
6514
+ @dlp_service_stub.call_rpc :get_content_policy, request, options: options do |response, operation|
6515
+ yield response, operation if block_given?
6516
+ end
6517
+ rescue ::GRPC::BadStatus => e
6518
+ raise ::Google::Cloud::Error.from_error(e)
6519
+ end
6520
+
6521
+ ##
6522
+ # Lists ContentPolicies in a parent.
6523
+ #
6524
+ # @overload list_content_policies(request, options = nil)
6525
+ # Pass arguments to `list_content_policies` via a request object, either of type
6526
+ # {::Google::Cloud::Dlp::V2::ListContentPoliciesRequest} or an equivalent Hash.
6527
+ #
6528
+ # @param request [::Google::Cloud::Dlp::V2::ListContentPoliciesRequest, ::Hash]
6529
+ # A request object representing the call parameters. Required. To specify no
6530
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
6531
+ # @param options [::Gapic::CallOptions, ::Hash]
6532
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
6533
+ #
6534
+ # @overload list_content_policies(parent: nil, page_size: nil, page_token: nil)
6535
+ # Pass arguments to `list_content_policies` via keyword arguments. Note that at
6536
+ # least one keyword argument is required. To specify no parameters, or to keep all
6537
+ # the default parameter values, pass an empty Hash as a request object (see above).
6538
+ #
6539
+ # @param parent [::String]
6540
+ # Required. Resource name of the project,
6541
+ # for example, `projects/project-id/locations/asia`.
6542
+ # @param page_size [::Integer]
6543
+ # Optional. Number of results per page, max 1000.
6544
+ # @param page_token [::String]
6545
+ # Optional. Page token from a previous page to return the next set of
6546
+ # results. If set, all other request fields must match the original request.
6547
+ #
6548
+ # @yield [response, operation] Access the result along with the RPC operation
6549
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::ContentPolicy>]
6550
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
6551
+ #
6552
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Dlp::V2::ContentPolicy>]
6553
+ #
6554
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
6555
+ #
6556
+ # @example Basic example
6557
+ # require "google/cloud/dlp/v2"
6558
+ #
6559
+ # # Create a client object. The client can be reused for multiple calls.
6560
+ # client = Google::Cloud::Dlp::V2::DlpService::Client.new
6561
+ #
6562
+ # # Create a request. To set request fields, pass in keyword arguments.
6563
+ # request = Google::Cloud::Dlp::V2::ListContentPoliciesRequest.new
6564
+ #
6565
+ # # Call the list_content_policies method.
6566
+ # result = client.list_content_policies request
6567
+ #
6568
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
6569
+ # # over elements, and API calls will be issued to fetch pages as needed.
6570
+ # result.each do |item|
6571
+ # # Each element is of type ::Google::Cloud::Dlp::V2::ContentPolicy.
6572
+ # p item
6573
+ # end
6574
+ #
6575
+ def list_content_policies request, options = nil
6576
+ raise ::ArgumentError, "request must be provided" if request.nil?
6577
+
6578
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::ListContentPoliciesRequest
6579
+
6580
+ # Converts hash and nil to an options object
6581
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
6582
+
6583
+ # Customize the options with defaults
6584
+ metadata = @config.rpcs.list_content_policies.metadata.to_h
6585
+
6586
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
6587
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
6588
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
6589
+ gapic_version: ::Google::Cloud::Dlp::V2::VERSION
6590
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
6591
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
6592
+
6593
+ header_params = {}
6594
+ if request.parent
6595
+ header_params["parent"] = request.parent
6596
+ end
6597
+
6598
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
6599
+ metadata[:"x-goog-request-params"] ||= request_params_header
6600
+
6601
+ options.apply_defaults timeout: @config.rpcs.list_content_policies.timeout,
6602
+ metadata: metadata,
6603
+ retry_policy: @config.rpcs.list_content_policies.retry_policy
6604
+
6605
+ options.apply_defaults timeout: @config.timeout,
6606
+ metadata: @config.metadata,
6607
+ retry_policy: @config.retry_policy
6608
+
6609
+ @dlp_service_stub.call_rpc :list_content_policies, request, options: options do |response, operation|
6610
+ response = ::Gapic::PagedEnumerable.new @dlp_service_stub, :list_content_policies, request, response, operation, options
6611
+ yield response, operation if block_given?
6612
+ throw :response, response
6613
+ end
6614
+ rescue ::GRPC::BadStatus => e
6615
+ raise ::Google::Cloud::Error.from_error(e)
6616
+ end
6617
+
6618
+ ##
6619
+ # Delete a ContentPolicy.
6620
+ #
6621
+ # @overload delete_content_policy(request, options = nil)
6622
+ # Pass arguments to `delete_content_policy` via a request object, either of type
6623
+ # {::Google::Cloud::Dlp::V2::DeleteContentPolicyRequest} or an equivalent Hash.
6624
+ #
6625
+ # @param request [::Google::Cloud::Dlp::V2::DeleteContentPolicyRequest, ::Hash]
6626
+ # A request object representing the call parameters. Required. To specify no
6627
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
6628
+ # @param options [::Gapic::CallOptions, ::Hash]
6629
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
6630
+ #
6631
+ # @overload delete_content_policy(name: nil)
6632
+ # Pass arguments to `delete_content_policy` via keyword arguments. Note that at
6633
+ # least one keyword argument is required. To specify no parameters, or to keep all
6634
+ # the default parameter values, pass an empty Hash as a request object (see above).
6635
+ #
6636
+ # @param name [::String]
6637
+ # Required. Resource name of the ContentPolicy to be deleted, in the format:
6638
+ # `projects/{project}/locations/{location}/contentPolicies/{content_policy}`.
6639
+ #
6640
+ # @yield [response, operation] Access the result along with the RPC operation
6641
+ # @yieldparam response [::Google::Protobuf::Empty]
6642
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
6643
+ #
6644
+ # @return [::Google::Protobuf::Empty]
6645
+ #
6646
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
6647
+ #
6648
+ # @example Basic example
6649
+ # require "google/cloud/dlp/v2"
6650
+ #
6651
+ # # Create a client object. The client can be reused for multiple calls.
6652
+ # client = Google::Cloud::Dlp::V2::DlpService::Client.new
6653
+ #
6654
+ # # Create a request. To set request fields, pass in keyword arguments.
6655
+ # request = Google::Cloud::Dlp::V2::DeleteContentPolicyRequest.new
6656
+ #
6657
+ # # Call the delete_content_policy method.
6658
+ # result = client.delete_content_policy request
6659
+ #
6660
+ # # The returned object is of type Google::Protobuf::Empty.
6661
+ # p result
6662
+ #
6663
+ def delete_content_policy request, options = nil
6664
+ raise ::ArgumentError, "request must be provided" if request.nil?
6665
+
6666
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dlp::V2::DeleteContentPolicyRequest
6667
+
6668
+ # Converts hash and nil to an options object
6669
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
6670
+
6671
+ # Customize the options with defaults
6672
+ metadata = @config.rpcs.delete_content_policy.metadata.to_h
6673
+
6674
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
6675
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
6676
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
6677
+ gapic_version: ::Google::Cloud::Dlp::V2::VERSION
6678
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
6679
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
6680
+
6681
+ header_params = {}
6682
+ if request.name
6683
+ header_params["name"] = request.name
6684
+ end
6685
+
6686
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
6687
+ metadata[:"x-goog-request-params"] ||= request_params_header
6688
+
6689
+ options.apply_defaults timeout: @config.rpcs.delete_content_policy.timeout,
6690
+ metadata: metadata,
6691
+ retry_policy: @config.rpcs.delete_content_policy.retry_policy
6692
+
6693
+ options.apply_defaults timeout: @config.timeout,
6694
+ metadata: @config.metadata,
6695
+ retry_policy: @config.retry_policy
6696
+
6697
+ @dlp_service_stub.call_rpc :delete_content_policy, request, options: options do |response, operation|
6698
+ yield response, operation if block_given?
6699
+ end
6700
+ rescue ::GRPC::BadStatus => e
6701
+ raise ::Google::Cloud::Error.from_error(e)
6702
+ end
6703
+
6245
6704
  ##
6246
6705
  # Configuration class for the DlpService API.
6247
6706
  #
@@ -6702,6 +7161,31 @@ module Google
6702
7161
  # @return [::Gapic::Config::Method]
6703
7162
  #
6704
7163
  attr_reader :update_connection
7164
+ ##
7165
+ # RPC-specific configuration for `create_content_policy`
7166
+ # @return [::Gapic::Config::Method]
7167
+ #
7168
+ attr_reader :create_content_policy
7169
+ ##
7170
+ # RPC-specific configuration for `update_content_policy`
7171
+ # @return [::Gapic::Config::Method]
7172
+ #
7173
+ attr_reader :update_content_policy
7174
+ ##
7175
+ # RPC-specific configuration for `get_content_policy`
7176
+ # @return [::Gapic::Config::Method]
7177
+ #
7178
+ attr_reader :get_content_policy
7179
+ ##
7180
+ # RPC-specific configuration for `list_content_policies`
7181
+ # @return [::Gapic::Config::Method]
7182
+ #
7183
+ attr_reader :list_content_policies
7184
+ ##
7185
+ # RPC-specific configuration for `delete_content_policy`
7186
+ # @return [::Gapic::Config::Method]
7187
+ #
7188
+ attr_reader :delete_content_policy
6705
7189
 
6706
7190
  # @private
6707
7191
  def initialize parent_rpcs = nil
@@ -6815,6 +7299,16 @@ module Google
6815
7299
  @delete_connection = ::Gapic::Config::Method.new delete_connection_config
6816
7300
  update_connection_config = parent_rpcs.update_connection if parent_rpcs.respond_to? :update_connection
6817
7301
  @update_connection = ::Gapic::Config::Method.new update_connection_config
7302
+ create_content_policy_config = parent_rpcs.create_content_policy if parent_rpcs.respond_to? :create_content_policy
7303
+ @create_content_policy = ::Gapic::Config::Method.new create_content_policy_config
7304
+ update_content_policy_config = parent_rpcs.update_content_policy if parent_rpcs.respond_to? :update_content_policy
7305
+ @update_content_policy = ::Gapic::Config::Method.new update_content_policy_config
7306
+ get_content_policy_config = parent_rpcs.get_content_policy if parent_rpcs.respond_to? :get_content_policy
7307
+ @get_content_policy = ::Gapic::Config::Method.new get_content_policy_config
7308
+ list_content_policies_config = parent_rpcs.list_content_policies if parent_rpcs.respond_to? :list_content_policies
7309
+ @list_content_policies = ::Gapic::Config::Method.new list_content_policies_config
7310
+ delete_content_policy_config = parent_rpcs.delete_content_policy if parent_rpcs.respond_to? :delete_content_policy
7311
+ @delete_content_policy = ::Gapic::Config::Method.new delete_content_policy_config
6818
7312
 
6819
7313
  yield self if block_given?
6820
7314
  end